Create order
Optionally, customers can use a pre-qualifier link to get pre-qualified before the order exists. It is a custom aCuotaz link we provide your store; you can request it from us. After the customer completes the pre-qualifier, you create the order and the usual flow continues.
To authenticate your requests see our authentication
URL: /pos/order/create
Method: POST
Data constraints
amount(Float/Required)
Total amount of the purchase to finance
acuotaz_send_sms(Bool/Optional/Default=False)
Boolean parameter to specify whether aCuotaz is responsible for sending the credit assessment application link to the customer after the order is created.
order_id(String/Required/Unique)
Order id generated by your store which will be used to identify the order when we send information back to you
expiration_ts(String(offset=utc0)/Optional)
Format: YYYY-MM-DD hh:mm:ss.mmm
Exact date on which the order will no longer be valid.
IMPORTANT: Make sure that the timezone is UTC-0. To get the correct time, you can reduce 5 hours to peru timezone.
pos_client_id(String/Required)
Client id provided by us to identify your store
description(String/Optional)
Field to specify what is being purchased in this order.
url_redir_on_canceled(URL/Required)
URL of your store to redirect when the aCuotaz application is canceled so the customer can select another payment method
url_redir_on_rejected(URL/Required)
URL of your store to redirect when the aCuotaz application is rejected so the customer can select another payment method
url_redir_on_success(URL/Required)
URL of your store to redirect when the aCuotaz application is successful. This is usually the order paid details.
url_redir_on_downpayment(URL/Required)
Merchant URL to redirect the customer when he wants to pay the down payment in the e-commerce.
url_redir_on_order_detail(URL/Optional)
Merchant URL to redirect the customer when he wants to see the purchased order details. This is usually the profile tab that shows paid orders.
-
financed_products(List of objects/Optional)
List of products being financed. If sent at order creation, the same list can be used later in the in-house downpayment flow (verify/paid) without resending. Required for some merchants (seerequire_financed_products). Each item has the same structure as in the in-house downpayment v4 product object:sku,name,unit_price_after_discount,quantity,discount,brand,category,warranty_months,product_stage(one of"new","used","refurbished"). -
customer_6m_payments(List of Dict/Optional)
Here you must send the customer's last 6 month payments to your store. Each item has the following parameters:-
dni(String/Required) -
amount(String/Required) -
payment_time(String(offset=utc0)/Required) -
payment_detail(String/Required) -
subscription_plan(Bool/Required)
-
-
customer_data(Dict/Optional)
Dictionary with user data. The fields available to use are described below.
NOTE: The following parameters are to facilitate data entry in the steps of our funnel. It is important to send all the fields you have available.-
address(String/Optional) -
dni(String/Optional) -
email(String/Optional) -
name(String/Optional) -
phone(String/Optional) -
billing_address_1(String/Optional) -
billing_address_2(String/Optional) -
billing_city(String/Optional) -
billing_company(String/Optional) -
billing_first_name(String/Optional) -
billing_last_name(String/Optional) -
shipping_address_1(String/Optional) -
shipping_address_2(String/Optional) -
shipping_city(String/Optional) -
shipping_company(String/Optional) -
shipping_first_name(String/Optional) -
shipping_last_name(String/Optional)
-
Success Response:
Code: 200 OK
{
redirect_to: "https://apurata.com/pos?client={client_id}&acuotaz_order={ObjectId()}",
status: "new_order"|"already_created"
}
If a new id is sent, the order will be created and the "new_order" status will be returned. In case you try to create an order with an existing id, the status "already_created" will be returned. In both cases the "redirect_to" field will be returned.
Sample curl:
curl -X POST 'https://apurata.com/pos/order/create' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {secret_token}' \
--data-raw '{
"amount": 300,
"order_id": "001",
"pos_client_id": "tecno-tiendaz",
"description": "name:product x, total:300",
"url_redir_on_canceled": "https://tecnotiendaz.com/checkout",
"url_redir_on_rejected": "https://tecnotiendaz.com/checkout",
"url_redir_on_success": "https://tecnotiendaz.com/order_paid",
"url_redir_on_downpayment": "https://tecnotiendaz.com/checkout",
"customer_data": {
"address": "Dir. 123",
"dni": "14159265",
"email": "example@example.com",
"name": "Example",
"phone": "99999999",
"billing_city": "Lima"
},
"financed_products": [
{
"sku": "SKU-1",
"name": "Product name",
"unit_price_after_discount": 300.00,
"quantity": 1,
"discount": 0.0,
"brand": "Brand",
"category": "category",
"warranty_months": 12,
"product_stage": "new"
}
]
}'
Error Responses:
Code: 401 UNAUTHORIZED
{ error: "Wrong or missing client token" }
Code: 400 BAD REQUEST
{ error: "Validation error, field XXXX required, etc." }
Code: 400 BAD REQUEST
{ error: "Client not registered" }
Code: 400 BAD REQUEST
{ error: "Cannot modify order" }