PIX
Introduction
The Brazilian Instant Payment System (PIX) is a new payment method created by the Central Bank of Brazil. It is a fast, secure and convenient way to make payments and transfer money. PIX is available 24/7, including weekends and holidays, and it is free for individuals and small businesses. Currently is the most popular payment method in Brazil.
Getting Started
Generate Order
Creating a Pix REDIRECT order:
POST /api/v1/checkout/form
Host: latamgateway.com
Content-Type: application/json
ACCOUNT_TOKEN: "<token>"
{
"order":{
"code":"123", /* Order reference in your system (required) /*
"notification_url":"https://yoursystem.com/postback/", /* Where we'll notify when status changes (required) */
"redirect_url":"https://yoursystem.com/finish_checkout?auto_redirect=true", /* If filled, at the end of checkout we'll automatic redirect to that page (optional) */
"value":50.00, /* (required) */
"additional_info":"A description of your order, as a string", /* (required) */
"payment_method":"pix" /* (required) */
}
}
On a successful request HTTP 200 status code, the response will include the following parameters:
{
"form_id": "dbcedec8-f587-4203-8aa4-a74da83fb32a", /* Order reference in our system. You should save that. */
"url": "https://latamgateway.com/checkout/payment/dbcedec8-f587-4203-8aa4-a74da83fb32a" /* Form URL, redirect your customer to here */
}
Business errors due to incorrect or missing parameters are returned with an HTTP 400 status code. The response will indicate which parameter is invalid or missing.
{
"message": "Payment method not supported"
}
Reverse Order
To reverse an order:
POST /api/v1/order/{order_id}/reverse
Host: latamgateway.com
Content-Type: "application/json"
ACCOUNT_TOKEN: "<token>"
On a successful request HTTP 200 status code, the response will include the following parameters:
{
"message": "message": "Refund requested. Waiting for confirmation from the bank."
}
Business errors are returned with a 400 status code. The response will be:
{
"message": "No order found with the provided ID."
}