POS Integration
This service offers the possibility to provide instant financing from your store’s physical Point of Sale (POS). Before starting please contact our team at hola@aplazame.com and we will guide you through the implementation process.
Create a checkout
POST https://api.aplazame.com/checkout/offline HTTP/1.1
Authorization: Bearer api_private_key
Accept: application/vnd.aplazame.v3+json
Content-Type: application/json
{
"order": {},
"customer": {},
"billing": {},
"shipping": {},
"merchant": {
"ipn_url": "https://..."
}
}Response
HTTP/1.1 201 OK
X-Aplazame-Media-Type: aplazame.v3
{
"id": ":checkoutId"
}| Parameter | Type | Description |
|---|---|---|
| :checkoutId | string | Checkout ID set by Aplazame |
HTTP/1.1 403 Forbidden
X-Aplazame-Media-Type: aplazame.v3Checkout status
The status of a checkout can be queried using its ID
GET https://api.aplazame.com/checkout/:checkoutId/status
Authorization: Bearer api_private_key
Accept: application/vnd.aplazame.v3+json| Parameter | Type | Description |
|---|---|---|
| :checkoutId | string | Checkout ID set by Aplazame |
Response
HTTP/1.1 200 OK
X-Aplazame-Media-Type: aplazame.v3
Content-Type: application/json
{
"id": ":checkoutId",
"mid": "28475648233786783165",
"total_amount": 12050,
"currency": {
"name": "Euro",
"code": "EUR",
"numeric": "978"
},
"status": "pending",
"status_reason": "confirmation_required",
"sandbox": false
}| Parameter | Type | Description |
|---|---|---|
| :checkoutId | string | Checkout ID set by Aplazame |
| mid | string | Order identifier generated by the store or generated automatically by Aplazame. |
| total_amount | decimal | Quantity to be financed. |
| currency | ISO 4217 | Order currency. |
| status | string | Order status (ok, pending or ko). |
| status_reason | string | Order status reason. |
| sandbox | boolean | This order was placed in the sandbox environment. |
IPN (Instant Payment Notification)
Changes in checkout status will be notified at the URL given on creating the checkout
Notification content
{
"id": ":checkoutId",
"mid": "28475648233786783165",
"total_amount": 12050,
"currency": {
"name": "Euro",
"code": "EUR",
"numeric": "978"
},
"status": "pending",
"status_reason": "confirmation_required",
"sandbox": false
}| Parameter | Type | Description |
|---|---|---|
| :checkoutId | string | Checkout ID set by Aplazame |
| mid | string | Order identifier generated by the store or generated automatically by Aplazame. |
| total_amount | decimal | Quantity to be financed |
| currency | ISO 4217 | Order currency. |
| status | string | Order status (ok, pending or ko). |
| status_reason | string | Order status reason. |
| sandbox | boolean | The order was placed in the test environment. |
Status codes
Depending on the status field of the order, the status_reason field provides specific information regarding Aplazame’s reasons for determining the order status.
| Status | Status reason | Cause |
|---|---|---|
| pending | in_process | The buyer has initiated the payment process but has not yet completed it. |
| pending | confirmation_required | The financing request has been accepted by Aplazame which is now waiting for final confirmation from the store. |
| pending | challenge_required | Aplazame is waiting for the buyer to complete an identity validation challenge after completing the financing request. |
| ko | expired | The financing request has expired. |
| ko | expired_challenge | The buyer has not passed the identity validation challenge within the allocated time. |
| ko | ko_generic | The financing request has not passed the Aplazame admission criteria. |
| ko | failed_challenge | The buyer has not passed the identity validation task. |
| ko | confirmation_rejected_by_merchant | The store has rejected the order. |
| ko | merchant_failed_to_confirm | Confirmation with the store was not possible. |
| ok | The financing request has been completed and accepted by the store. |