Checkout creation

The creation of the checkout will be done by means of a POST request to the Aplazame server.

If you are starting the integration you may be interested in how to set the test mode as well as test data available for the integration.

Installment payment

POST https://api.aplazame.com/checkout
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Content-Type: application/json

{
  "merchant": {...},
  "order": {...},
  "customer": {...},
  "billing": {...},
  "shipping": {...}
}
Parameter Type Required Description
merchant object yes Merchant data
order object yes Your order data
customer object yes Customer data
billing object no Billing address
shipping object yes Shipping info

Pay in 15 days

POST https://api.aplazame.com/checkout
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Content-Type: application/json

{
  "merchant": {...},
  "order": {...},
  "customer": {...},
  "billing": {...},
  "shipping": {...},
  "product": {
        "type": "pay_later"
  }
}
Parameter Type Required Description
merchant object yes Merchant data
order object yes Your order data
customer object yes Customer data
billing object no Billing address
shipping object yes Shipping info
product object no Product type. If this parameter is not indicated, the type is installments by default

Pay in 4

POST https://api.aplazame.com/checkout
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Content-Type: application/json

{
  "merchant": {...},
  "order": {...},
  "customer": {...},
  "billing": {...},
  "shipping": {...},
  "product": {
    "type": "pay_in_4"
  }
}
Parameter Type Required Description
merchant object yes Merchant data
order object yes Your order data
customer object yes Customer data
billing object no Billing address
shipping object yes Shipping info
product object no Product type. If this parameter is not indicated, the type is installments by default

merchant

{
  "merchant": {
    "notification_url": "https://merchant.com/order/confirm",
    "success_url": "/success",
    "pending_url": "/pending",
    "error_url": "/error",
    "dismiss_url": "/",
    "ko_url": "/ko",
    "close_on_success": false,
    "timeout_checkout": 60,
    "timeout_extra": 2880
  },
  // ...
}
Parameter Type Required Description
notification_url url yes URL to be notified of changes to the status of the order and which will serve to complete the final confirmation.
success_url url yes URL (relating to the store) to which the user will be redirected when payment has been completed.
pending_url url yes URL (relating to the store) to which the user will be redirected when the payment is pending confirmation.
error_url url yes URL (relating to the store) to which the user will be redirected when an error has occurred.
dismiss_url url no URL (relating to the store) to which the user will be redirected when they choose to return to the store (by default '/').
ko_url url no URL (relating to the store) to which the user will be redirected when payment has been denied.
close_on_success boolean no Indicates whether the checkout automatically redirects you to the success_url in case of success. ( by default: false )
timeout_checkout integer no It establishes the maximum time, in minutes, that the user has to complete the checkout process. (by default 60; min. 1; max. 120 )
timeout_extra integer no It establishes the additional time, in minutes, that the user has to complete the identity validation task once the checkout process is finished. ( by default 2880; min. 0; max. 2880 )

order

{
  "id": "28475648233786783165",
  "articles": [
    {
      "id": "89793238462643383279",
      "name": "18 ct white gold watch with diamonds",
      "quantity": 2,
      "price": 402000,
      "tax_rate": 2100,
      "discount_rate": 200,
      "description": "High-precision quartz movement",
      "url": "http://www.chanel.com/fragrance-beauty/Fragrance-N05-88145/sku/138083",
      "image_url": "http://www.chanel.com/fragrance-beauty/Fragrance-N05-88145/sku/138083/product_01.jpg"
    },
    ...
  ],
  "discount": 16000,
  "currency": "EUR",
  "total_amount": 462000,
  "options": {...},
}
Parameter Type Required Description
id string yes Your order ID.
discount decimal no Discount amount of the order
discount_rate decimal no Discount rate on the price of the order
cart_discount decimal no Discount amount of the cart
cart_discount_rate decimal no Discount rate of the cart
currency ISO 4217 yes Currency code of the order
tax_rate decimal yes Order tax rate
total_amount decimal yes Total order amount
options object no It allows defining specific options for this order, for example, the date of the first payment.
articles collection yes Articles in cart

tax_rate

All order items must have a tax rate tax_rate. You can include this rate globally in order.tax_rate or you can choose to apply the rate to each individual item and shipping.

options

{
  "event_date": "2021-06-15"
}
Parameter Type Required Description
event_date ISO 8601 no It allows defining the date on which the purchased product will be enjoyed, for example: date of a trip or start of a course.

article

{
  "id": "89793238462643383279",
  "name": "18 ct white gold watch with diamonds",
  "quantity": 2,
  "price": 402000,
  "tax_rate": 2100,
  "discount_rate": 200,
  "description": "High-precision quartz movement",
  "url": "http://www.chanel.com/fragrance-beauty/Fragrance-N05-88145/sku/138083",
  "image_url": "http://www.chanel.com/fragrance-beauty/Fragrance-N05-88145/sku/138083/product_01.jpg"
}
Parameter Type Required Description
id string yes ID
name string yes Name
description string no Description
url URL yes Article absolute URL
image_url URL yes Article image absolute URL
quantity integer yes Quantity
price decimal yes Price (tax not included)
tax_rate decimal no Tax rate
discount decimal no Discount amount
discount_rate decimal no Discount rate

customer

{
  "id": "1618",
  "email": "customer@address.com",
  "type": "e",
  "gender": 0,
  "first_name": "John",
  "last_name": "Coltrane",
  "birthday": "1980-01-01",
  "phone": "601234567",
  "language": "en",
  "date_joined": "2014-08-21T13:56:45+0000",
  "last_login": "2020-08-27T19:57:56+0000",
  "address": {
    "phone": "601234567",
    "street": "Plaza del Valle Boreal nº10",
    "address_addition": "Near Pontiff Sulyvahn's Plaza",
    "city": "Madrid",
    "state": "Madrid",
    "country": "ES",
    "postcode": "28080"
  }
}
Parameter Type Required Description
id string no Customer ID
email string yes Customer email
type char no Customer type; the choices are g guest, n new, e existing.
gender integer no Gender; the choices are 0 not known, 1 male, 2 female, 3 not applicable.
first_name string no First name
last_name string no Last name
phone string no Phone number
birthday ISO 8601 no Date of birth
language ISO 639-1 no Language preferences
date_joined ISO 8601 no Date designating when the customer account was created.
last_login ISO 8601 no Date of the customer's last login.
address object no Address

customer.address

{
  "phone": "601234567",
  "street": "Plaza del Valle Boreal nº10",
  "address_addition": "Near Pontiff Sulyvahn's Plaza",
  "city": "Madrid",
  "state": "Madrid",
  "country": "ES",
  "postcode": "28080"
}
Parameter Type Required Description
phone string no Phone number
alt_phone string no Alternative phone number
street string yes Address
address_addition string no Additional line
city string yes Town/city
state string yes State/province
country ISO 3166-1 yes Country code
postcode string yes Post code

billing

{
  "first_name": "Bill",
  "last_name": "Evans",
  "phone": "601765432",
  "street": "Calle Central Yharnam 92",
  "address_addition": "Near Great Bridge",
  "city": "Madrid",
  "state": "Madrid",
  "country": "ES",
  "postcode": "28080"
}
Parameter Type Required Description
first_name string yes First name
last_name string yes Last name
phone string no Phone number
alt_phone string no Alternative phone number
street string yes Address
address_addition string no Additional line
city string yes Town/city
state string yes State/province
country ISO 3166-1 yes Country code
postcode string yes Post code

shipping

{
  "first_name": "Django",
  "last_name": "Reinhard",
  "phone": "601234567",
  "street": "Plaza del Valle Boreal nº10",
  "address_addition": "Near Pontiff Sulyvahn's Plaza",
  "city": "Madrid",
  "state": "Madrid",
  "country": "ES",
  "postcode": "28080",
  "price": 500,
  "tax_rate": 2100,
  "name": "Planet Express",
  "discount": 100,
  "method": "postal"
}
Parameter Type Required Description
first_name string yes First name
last_name string yes Last name
phone string no Phone number
alt_phone string no Alternative phone number
street string yes Address
address_addition string no Additional line
city string yes Town/city
state string yes State/province
country ISO 3166-1 yes Country code
postcode string yes Post code
name string yes Shipping name
price decimal yes Shipping price (tax is not included)
tax_rate decimal no Shipping tax rate
discount decimal no Discount amount of the shipping
discount_rate decimal no Discount rate of the shipping
method string no Shipping method; choices are pickup_store, pickup_point, postal