Custom integration steps
Step 1 - Request credentials to aCuotaz:
Your store must request:
client_id
, Alphanumeric string that identifies each application uniquely. e.g.yourecommerce
secret_token
, Alphanumeric string (uuid4) used to transfer data securely between aCuotaz and your application. You should never reveal this token on your frontend. e.g.a76c63052c654b6cb331444b261523bc
Step 2 - Enable your store checkout to create orders
Your store must assign a unique order alphanumeric string (uuid4) to identify the order through the whole process. This identifier will be the order_id
Then your store will call the create order API to obtain an order URL to redirect the customer to aCuotaz website
URL: /pos/order/create
Method: POST
You must send the following information: amount, order_id, client_id, redirection URLs (canceled order, rejected order, successful order). In addition, you can send customer data such as address, dni, email, name, and phone to reduce your customer´s effort when filling the credit application form.
Success Response:
Code: 200 OK
{
redirect_to: "https://apurata.com/pos?client={client_id}&acuotaz_order={ObjectId()}",
status: "new_order"|"already_created"
}
For more information, please visit: Create order API
💡 Best practice
To ensure a smooth user experience, we recommend hiding aCuotaz as a payment option when the total amount is outside the financing limits (either too low or too high).
Step 3 - Consider webhook events
Webhook events represent the status of orders.
Order statuses
- initial: The order is created (We do not notify this via the webhook, but it is the first status when the order is created)
- created: The customer selected the number of installments and initiated his credit request.
- approved: Successful credit evaluation.
- onhold: The initial payment was successful. If there is no down payment, the identity validation photos were uploaded successfully.
- validated: Successful identity validation.
- funded: Disbursement made.
- canceled: Credit request canceled.
FUNDED and VALIDATED Events
It is important to note that the VALIDATED and FUNDED events can occur simultaneously in the processing flow. The FUNDED event implies that identity validation has already been completed successfully, but the event VALIDATED will be sent anyways
aCuotaz process flow
To know more about the process customers have to follow when using aCuotaz and event details, check the following link: flow tutorial
Step 4 - Create webhook
You must create a webhook so aCuotaz can inform you about your order statuses. Once created, you must provide the URL to aCuotaz team.
Your webhook URL should have the following format: http://yourecommerce.com/api/v1/webhooks/acuotaz/
Webhook:
-
Authentication: On every request, we send the following header with the unique token we provided to you in step 1. For security reasons, your system must validate it matches the one provided in step 1:
Apurata-Auth: Bearer [secret_token]
-
Order statuses: In every communication, we will use the order_id provided by your store. You will receive the information in the following format:
{ "order_id": "123", "event": "approved" }
How you manage each event depends on your internal processes. However, the most important event to pay attention to is when the order status changes to ¨funded¨
. This event signals that the order was paid and that it is safe to deliver the product. All orders with statuses ¨funded¨
are billable to aCuotaz.
It is important to highlight that capturing these events is your responsibility, in order to avoid possible errors.
For more information, please visit: Webhooks
Step 5 - Snippets
A high number of aCuotaz orders is directly correlated with how much awareness of the product your store can create. To maximize awareness, we use snippets to allow you to show relevant information about aCuotaz in 3 key pages: product page, cart page, and checkout.
For more information, please visit: Snippets
Step 6 - Testing
To test the whole process, you can use the information provided in the following link: Testing
Process flow summary
- The customer becomes aware of aCuotaz financing through a
banner, aCuotaz add-on or info-steps
(check snippets) - At the checkout, he selects aCuotaz financing to purchase a product/products
- Then, your store will send aCuotaz data from the transaction to create an order. The data includes
order_id, amount, and redirection URLs
. We highly recommend your store to also send relevant customer data such asDNI, name, phone number, email, and address
(check create order API) - With the data provided, we will create an order. Then, we will send you the order URL so you can redirect your customer to our website to continue the application process
- During the application process, we will send order statuses updates to your webhook. The order status can change to
created, approved, onhold, validated, funded, and canceled
depending on the funnel stage and credit assessment result - Key events include:
- When the customer pays the down payment through a bank transfer, digital wallet, or debit/credit card, we will send to your webhook that the order status changed to
¨onhold¨
- When the customer successfully validated his identity, we will send to your webhook that the order status changed to
¨validated¨
- When aCuotaz verifies all the customer requirements are fulfilled, we will send to your webook that the order status changed to
¨funded¨
- When the customer pays the down payment through a bank transfer, digital wallet, or debit/credit card, we will send to your webhook that the order status changed to
- When the order status is
¨funded¨
, aCuotaz will redirect the customer back to your website where you will inform the customer that the purchase was successful and you can also show him a summary of the order details. At this point, it is safe to issue an invoice and deliver the product. That is why it is very important that your webhook is well configured and making sure that it is capturing the events. - Only orders with status ¨funded¨ informed by aCuotaz will be billable to aCuotaz