Credit Card
Introduction
Credit cards in Brazil offer a convenient way for consumers to handle their payments, widely accepted across both online and physical stores. They provide flexibility for diverse purchases and the option of installment payments, a popular feature in the Brazilian market.
Getting Started
Generate Orders
Creating a Credit Card REDIRECT order:
POST /api/v1/checkout/form
Host: latamgateway.com
Content-Type: application/json
ACCOUNT_TOKEN: "<token>"
{
  "order": {
    "code": "123",
    "notification_url": "https://yoursystem.com/postback/",
    "redirect_url": "https://yoursystem.com/finish_checkout?auto_redirect=true",
    "value": 50.00,
    "additional_info": "A description of your order, as a string",
    "payment_method": "paypal_card"
  },
  "risk": {
    "ip": "73.250.17.249",
    "fingerprint": "9d16d111d9e1a8fba7f87239f20feeef",
    "browser": "Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0"
  },
  "installments": 2,
  "customer": {
    "name": "Customer’s full name",
    "document": "111.222.333-44",
    "email": "[email protected]",
    "phone": "11999999999",
    "birth": "1996-03-09"
  },
  "address": {
    "street": "Example Avenue",
    "number": "123",
    "neighborhood": "Downtown",
    "complement": "Apt 101",
    "zip": "12345-678",
    "city": "Sample City",
    "state": "PR"
  }
}
Params descriptions
| Field | Description | Value Type | Requirement | 
|---|---|---|---|
order.code | 
Order reference in your system | String | Required | 
order.notification_url | 
URL to notify when status changes | String | Required | 
order.redirect_url | 
URL for automatic redirection after checkout ends | String | Optional | 
order.value | 
Total order value | Number (decimal) | Required | 
order.additional_info | 
Additional description of the order | String | Required | 
order.payment_method | 
Payment method | String | Required | 
risk.ip | 
Customer's IP address | String | Optional | 
risk.fingerprint | 
Fingerprint ID for risk analysis | String | Optional | 
risk.browser | 
Customer's browser User-Agent | String | Optional | 
installments | 
Number of payment installments | Integer | Optional | 
customer.name | 
Customer's full name | String | Optional | 
customer.document | 
Customer's document | String | Optional | 
customer.email | 
Customer's email address | String | Optional | 
customer.phone | 
Customer's phone number | String | Optional | 
customer.birth | 
Customer's date of birth | String | Optional | 
address.street | 
Street name of the address | String | Optional | 
address.number | 
Number of the address | String | Optional | 
address.neighborhood | 
Neighborhood of the address | String | Optional | 
address.complement | 
Address complement | String | Optional | 
address.zip | 
ZIP code of the address | String | Optional | 
address.city | 
City of the address | String | Optional | 
address.state | 
State abbreviation of the address | String | Optional | 
Note 1: If you provide the customer’s data and address, the checkout form will be automatically populated, improving the customer’s checkout experience.he name parameter.
Note 2: If you don't provide the “installments” field, a default value of 1 will be applied.
On a successful request HTTP 200 status code, the response will include the following parameters:
{
  "form_id": "dbcedec8-f587-4203-8aa4-a74da83fb32a", 
  "url": "https://latamgateway.com/checkout/payment/dbcedec8-f587-4203-8aa4-a74da83fb32a"
}
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."
}