Skip to main content

Instalments payment

Basic integration

tip

If you use the basic configuration, you will be able to customize it from the control panel, in the customisation view of the widget in the tab corresponding to the data-view value.

<div data-aplazame-widget-instalments
data-amount="15900"
data-currency="EUR"
data-country="ES"
data-view="product"></div>
ParameterTypeRequiredDescription
data-amountdecimalYesQuantity to be financed in cents. This field can be omitted if the data-price is used.data-price.
data-currencyISO 4217YesCurrency in which the item will be sold.
data-countryISO 3166-1YesCountry where the sale will apply.
data-viewenumNoThe view where the widget is included corresponds to the customisation tab of the control panel. The possible values are: product (by default) and cart.

Simulation

<div data-aplazame-widget-instalments
data-amount="15900"
data-currency="EUR"
data-country="ES"
data-view="product"></div>

Advanced integration

note

In addition to the mandatory parameters of the basic integration, the advanced configuration will be automatically used when any data-option-* is included.

The default values in this case are those shown in this documentation.

Note that when you change the values in the form it will be updated in the sample code.

<div data-aplazame-widget-instalments
data-amount="5900"
data-currency="EUR"
data-country="ES"
data-type="button"
data-article-id="l33t"
data-option-text-color="#333A3E"
data-option-btn-text-color="#FFFFFF"
data-option-btn-bg-color="#267BBD"
data-option-branding="true"
data-option-downpayment-info="true"
data-option-title-smart="true"
data-option-disable-modal="false"
data-option-legal-advice="true"
data-option-url-more-info-hide-mobile="true"
data-option-title-default="Págalo a plazos"
data-option-title-zero-interest="Consíguelo sin intereses"
data-option-legal-text="${ simulator_legal_text }"
data-option-url-more-info="https://www.aplazame.com"
data-option-default-instalments="6"
data-option-out-of-limits="hide">
</div>
ParameterTypeRequiredDescription
data-typeenumNoAllows you to choose the type of widget. The options are: text, button, select, big-button. By default, the one defined in the control panel will be used.
data-article-idtextNoThe article identifier. It cannot have spaces. In case of having a partial campaign that includes it, the widget may indicate said campaign. You can include multuple articles if required.
data-option-text-colorcss colorNoSet the colour of the text that is outside the button.
data-option-btn-text-colorcss colorNoSet the colour of the text of the button.
data-option-btn-bg-colorcss colorNoSet the colour of the background of the button.
data-option-brandingbooleanNoIndicates whether or not to display the Aplazame logo on the bottom of the widget.
data-option-downpayment-infobooleanNoIndicates whether or not the down payment should be shown at the top of the widget.
data-option-title-smartbooleanNoIndicates whether or not the text should be shown at the top of the widget. This text will change depending on whether there is a campaign with no active interests. Normal text: Pay it in instalments Text interest free: Get it interest free!.
data-option-title-defaulttextNoThis option allows you to customize the text that appears above the widget when there are no active interest-free campaigns.
data-option-title-zero-interesttextNoThis option allows you to customize the text that appears above the widget when there are active interest-free campaigns.
data-option-custom-stylesbooleanNoIndicates whether the styles are inherited from the true store or whether the Aplazame false styles are used.
data-option-disable-modalbooleanNoIndicates whether you should stop displaying the information for the 'text' and 'button’ modal types. The default value is false.
data-option-legal-advicebooleanNoIndicates whether you should displaying the legal text after the widget. The default value is false.
data-option-legal-texttextNoThis option allows you to customize the legal text that appears after the widget.
data-option-url-more-infotextNoThis option allows you to customize the landing page of the button ‘¿Quieres saber más?’
data-option-url-more-info-hide-mobilebooleanNoThis option allows you to hide the ‘¿Quieres saber más?’ button. Only in mobile version.
data-option-default-instalmentsdecimalNoAllows you to configure the number of instalments that the widget will display by default.
data-option-out-of-limitstextNoAllows you to show an alternative widget if the cart total does not meet the requirements to display the widget. If we want the alternative widget to appear, the value must be 'show', the value by default is: 'hide'.
tip

If you want to configure the widget according to your requirements you can use the advanced settings and decide which values you want to apply and with what look and feel

  • Configure the different parameters according to your requirements. Apply the colours you want, choose the alignment and decide whether you want your widget to use the smart title functionality and the Aplazame branding or not.

  • The example code of your widget will be updated according to the values you define. Once you have the design you are looking for, you just have to copy the code to take it to your online store, and that's it!

Include multuple articles

In the case of including the widget in the cart or in the order summary, it's possible that you want to indicate if any of the articles is in the campaign period. The data-article-id parameter can be used for this purpose.

<div data-aplazame-widget-instalments
...
data-article-id="article_id: price*qty" >
ParameterTypeRequiredDescription
article_idtextYesThe article identifier. It cannot have spaces.
pricedecimalYesAmount to be financed in cents.
qtydecimalNoThe quantity of a certain item.

Example of the snippet with values:

<div data-aplazame-widget-instalments
...
data-article-id="art46: 12495, art1337: 5600*2" >

Configurator

<div 
data-aplazame-widget-instalments
data-country="ES"
data-amount="12900"
data-type="button"
data-option-text-color="#ff0000"
data-option-btn-text-color="#00ff00"
data-option-btn-bg-color="#267BBD"
data-option-align="center"
data-option-branding="true"
data-downpayment-info="true"
data-option-title-smart="true"
data-option-disable-modal="false"
data-option-title-default="Págalo a plazos"
data-option-title-zero-interest="Consíguelo sin intereses"
></div>

API-based Simulation

You can request a simulation of the available installment plans by making a call to the API. You must include the Authorization header with the merchant's public_key as its value.

Example:

GET /instalment-plan-simulator HTTP/1.1
Authorization: Bearer api_public_key
Host: api.aplazame.com
curl 'https://api.aplazame.com/instalment-plan-simulator?amount=12345' \
-H 'authorization: Bearer 12093289b594f50d3971e4719eedd5c314ceb6ba'

The supported parameters are:

ParameterTypeRequiredDescription
amountdecimalAmount to be financed in cents.
currencyISO 4217NoCurrency in which the item will be sold. Defaults to EUR.
countryISO 3166-1NoCountry where the sale will take place. Defaults to ES.
viewenumNoView where the widget is included, corresponds to the customization tab in the control panel. Possible values: product, cart. Defaults to product.
paydaydecimalNoThe payday. Defaults to the one configured in the merchant settings.

All combinations of payday and number of installments are returned.

If it's necessary to send items during a campaign, the POST method can be used:

curl -X POST 'https://api.aplazame.com/instalment-plan-simulator?view=product' \
-H 'accept-language: pt-PT,es;q=0.9,en;q=0.8' \
-H 'authorization: Bearer 12093289b594f50d3971e4719eedd5c314ceb6ba' \
-H 'content-type: application/json' \
--data-raw '{"order":{"articles":[{"id":"10870079","price":"109900"}],"currency":"EUR","total_amount":"109900"}}'