Create Installments Plan

WHITELABEL allows you to create installment plans to offer to your customers. These plans can be used based on factors such as the amount to pay, currency, and card used, as described below:

  • Filtered by Amount Range (mandatory): The system checks if the installment plan is suitable for the specific amount of your transaction. Only plans that can handle that amount are considered.
  • Card BIN: The system verifies if the BIN of your card matches those allowed for certain installment plans. If there’s a match, that plan is considered.
  • Specific Currency: Only plans that work with the currency you are using are considered.
  • Plan Availability: The system checks if the installment plan is active. Only plans that have not expired and are available are considered.

Defining the Plan ID

The plan_id is only necessary when applying a fixed installment plan that doesn’t change during the purchase. If the installment.plan_id is not provided, the SDK will automatically search through all available installment plans associated with that account and select the one it considers most suitable. You should include the plan_id to ensure that a specific plan is applied.

Merchants Installments

This endpoint is only required for Merchant installments integration. For Provider defined installments, we use the installment plan defined by your payment provider.

For merchant-created installments, you also have the possibility of specifying the plan for every checkout session by using the plan_id while creating the session. If you do not send it, we will use the installment plan that matches the conditions set for the checkout session.

POST/installments-plans

Body application/json

namestringrequired

The installment plan name (MAX 255; MIN 3)

account_idstring[]required

The unique identifier(s) of the account(s) that will have the installment plan (UUID; 36 chars).

merchant_referencestringrequired

Identification of the installment plan (MAX 255; MIN 3)

installments_planobject[]required

Definition of installments available for each scenario

Show installments_plan properties
installmentinteger<int32>required

The number of monthly installments shoppers can choose

ratenumber<float>

The rate applied to the final amount of the transaction by the payment provider after using installments. The value should be entered as a multiplier, not a percentage. For example, to apply a 20% rate, enter 1.20 instead of 20.

financial_costsobject[]

Optional financial costs details for this installment option.

Show financial_costs properties
typestringrequired

The financial cost type identifier (MIN 3; MAX 255).


Example: CFT, TEA, CET, CAT

ratenumber<float>required

The financial cost rate as a decimal number (e.g., 45.25 for 45.25%).

type"MERCHANT_INSTALLMENTS" | "ISSUER_INSTALLMENTS"

Installment’s type. Only available for Ecuador and Mexico. Merchant refers to payments deferred with interest, and Issuer refer to payments deferred without interest

country_codestring

The issuer’s country (ISO 3166-1 MAX 2; MIN 2)

brandstring[]

Card’s brand information (MAX 255; MIN 3).

issuerstring

Card issuer (MAX 255; MIN 3)

iinstring[]

The issuer identification number (IIN) refers to the first few digits of a payment card number issued by a financial institution (MAX 8; MIN 6)

first_installment_deferralinteger<int32>

The amount of months to wait to debit the first installment (MAX: 3).

amountobject

The amounts that the installment plan will be available for. If null, available for any amount.

Show amount properties
currencystringrequired

The currency used to make the payment (ISO 4217 MAX 3; MIN 3)

min_valuenumber<float>

The minimum amount the installment plan will be available to use (multiple of 0.0001).

max_valuenumber<float>

The maximum amount the installment plan will be available to use (multiple of 0.0001).

availabilityobject

The dates that the installment plan will be available for. If null then it does not have a finish date

Show availability properties
start_atstring<date-time>

The start date that the installment plan will be available to use (UTC format)

finish_atstring<date-time>

The end date until the installment plan will be available to use (UTC format)

payment_method_type"CARD" | "NU_PAY_ENROLLMENT" | "APPLE_PAY"

Allows specifying the payment method type when creating an installment plan. CARD matches by card IIN, while NU_PAY_ENROLLMENT and APPLE_PAY match without one. Plans are only offered to the payment method they were created for.

Response

200

idstring
namestring
account_idstring[]
merchant_referencestring
installments_planobject[]
Show installments_plan properties
installmentinteger
rateinteger
provider_idstring
financial_costsobject[]
Show financial_costs properties
type"CFT" | "TEA" | "CET" | "CAT"
ratenumber<float>
formatted_valuestring
typestring
sourcestring
provider_idstring
schemestring
brandstring[]
issuerstring
issuer_idstring
iinany
country_codestring
first_installment_deferralinteger
amountobject
Show amount properties
currencystring
min_valueinteger
max_valueinteger
availabilityobject
Show availability properties
start_atstring
finish_atstring
created_atstring
updated_atstring
payment_method_type"CARD" | "NU_PAY_ENROLLMENT" | "APPLE_PAY"

400

Request
curl -X POST "https://api-sandbox.whitelabel.com/v1/installments-plans" \
  -H "Content-Type: application/json" \
  -H "public-api-key: <public-api-key>" \
  -H "private-secret-key: <private-secret-key>" \
  -d '{
  "name": "string",
  "account_id": "{{account_id}}",
  "merchant_reference": "string",
  "installments_plan": [
    {
      "installment": 0,
      "rate": 0,
      "financial_costs": [
        {
          "type": "string",
          "rate": 0
        }
      ],
      "type": "MERCHANT_INSTALLMENTS"
    }
  ],
  "country_code": "string",
  "brand": [
    "string"
  ],
  "issuer": "string",
  "iin": [
    "string"
  ],
  "first_installment_deferral": 0,
  "amount": {
    "currency": "string",
    "min_value": 0,
    "max_value": 0
  },
  "availability": {
    "start_at": "1970-01-01T00:00:00.000Z",
    "finish_at": "1970-01-01T00:00:00.000Z"
  },
  "payment_method_type": "CARD"
}'
Response
{
  "id": "4d573425-33f9-4c46-b009-2c7e749b0ec7",
  "name": "plan_007",
  "account_id": [
    "f7c5fe77-721b-49c2-84d3-957748df3c2c"
  ],
  "merchant_reference": "Test",
  "installments_plan": [
    {
      "installment": 1,
      "rate": 1,
      "provider_id": "",
      "financial_costs": [
        {
          "type": "CFT",
          "rate": 0,
          "formatted_value": "string"
        }
      ]
    }
  ],
  "type": "",
  "source": "",
  "provider_id": "",
  "scheme": "",
  "brand": [
    "VISA"
  ],
  "issuer": "",
  "issuer_id": "",
  "iin": null,
  "country_code": "US",
  "first_installment_deferral": 0,
  "amount": {
    "currency": "USD",
    "min_value": 0,
    "max_value": 100000000
  },
  "availability": {
    "start_at": "2023-09-12T00:00:00Z",
    "finish_at": "2030-09-20T00:00:00Z"
  },
  "created_at": "2023-10-11T17:52:31.886178246Z",
  "updated_at": "2023-10-11T17:52:31.886178246Z",
  "payment_method_type": "NU_PAY_ENROLLMENT"
}