Instalments payment
Basic integration
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>
| Parameter | Type | Required | Description |
|---|---|---|---|
| data-amount | decimal | Yes | Quantity to be financed in cents. This field can be omitted if the data-price is used.data-price. |
| data-currency | ISO 4217 | Yes | Currency in which the item will be sold. |
| data-country | ISO 3166-1 | Yes | Country where the sale will apply. |
| data-view | enum | No | The 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
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>
| Parameter | Type | Required | Description |
|---|---|---|---|
| data-type | enum | No | Allows 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-id | text | No | The 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-color | css color | No | Set the colour of the text that is outside the button. |
| data-option-btn-text-color | css color | No | Set the colour of the text of the button. |
| data-option-btn-bg-color | css color | No | Set the colour of the background of the button. |
| data-option-branding | boolean | No | Indicates whether or not to display the Aplazame logo on the bottom of the widget. |
| data-option-downpayment-info | boolean | No | Indicates whether or not the down payment should be shown at the top of the widget. |
| data-option-title-smart | boolean | No | Indicates 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-default | text | No | This option allows you to customize the text that appears above the widget when there are no active interest-free campaigns. |
| data-option-title-zero-interest | text | No | This option allows you to customize the text that appears above the widget when there are active interest-free campaigns. |
| data-option-custom-styles | boolean | No | Indicates whether the styles are inherited from the true store or whether the Aplazame false styles are used. |
| data-option-disable-modal | boolean | No | Indicates whether you should stop displaying the information for the 'text' and 'button’ modal types. The default value is false. |
| data-option-legal-advice | boolean | No | Indicates whether you should displaying the legal text after the widget. The default value is false. |
| data-option-legal-text | text | No | This option allows you to customize the legal text that appears after the widget. |
| data-option-url-more-info | text | No | This option allows you to customize the landing page of the button ‘¿Quieres saber más?’ |
| data-option-url-more-info-hide-mobile | boolean | No | This option allows you to hide the ‘¿Quieres saber más?’ button. Only in mobile version. |
| data-option-default-instalments | decimal | No | Allows you to configure the number of instalments that the widget will display by default. |
| data-option-out-of-limits | text | No | Allows 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'. |
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" >
| Parameter | Type | Required | Description |
|---|---|---|---|
| article_id | text | Yes | The article identifier. It cannot have spaces. |
| price | decimal | Yes | Amount to be financed in cents. |
| qty | decimal | No | The 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:
| Parameter | Type | Required | Description |
|---|---|---|---|
| amount | decimal | Sí | Amount to be financed in cents. |
| currency | ISO 4217 | No | Currency in which the item will be sold. Defaults to EUR. |
| country | ISO 3166-1 | No | Country where the sale will take place. Defaults to ES. |
| view | enum | No | View where the widget is included, corresponds to the customization tab in the control panel. Possible values: product, cart. Defaults to product. |
| payday | decimal | No | The 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"}}'