Skip to content

Loterica

Introduction

Loterica is a payment method that allows customers to pay for their orders in cash at a local lottery agency in Brazil. This payment method is available on weekdays, at any time during the lottery agency's working hours.

Getting Started

Generate Orders

Creating a Loterica TRANSPARENT order:

POST /api/v1/order
Host: latamgateway.com
Content-Type: "application/json"
ACCOUNT_TOKEN: "<token>"

{
  "customer": {
    "name": "Customer’s full name",
    "document": "111.222.333-44", # Note 1 below (required)
    "email": "[email protected]", # (required)
    "phone": "11999999999", # (required)
    "birth": "1996-03-09" # (required)
  },
  "order":{
    "code": "123", # Order reference in your system (required)
    "notification_url": "your_payback_notification_url.com", # Where we'll notify when status changes (required)
    "value": 50.00, # (required)
    "additional_info": "Some description of your order as String", # (required)
    "payment_method": "pec" # (required)
  }
}

The response will contain the following parameters:

{
  "latam_id": "7c0b8129-f556-4357-bb6e-8189c2943024",
  "code": "order_id_in_your_system",
  "confirmation_url": "https://latamgateway.com/7c0b8129-f556-4357-bb6e-8189c2943024", # Redirect customer to see and pay the boleto.
  "qrcode_link": "https://latamgateway.com/qrcode/7c0b8129-f556-4357-bb6e-8189c2943024" # Link to the qrcode
}

Business errors are returned with a 403 status code. The response will contain the following parameters:

{
  "latam_id": "7c0b8129-f556-4357-bb6e-8189c2943024",
  "message": "kyc message table below",
  "code": "kyc code table below"
}

KYC RESPONSE CODES DESCRIPTIONS

Code Message
KYC110 Invalid CPF, please verify your date of birth and CPF number.
KYC111 Invalid CNPJ, please verify your CNPJ number.
KYC112 Different name from the federal revenue register of natural persons.

Get PEC payment info

To get the PEC payment info, you need to send a GET request to the following endpoint:

GET /api/v1/qrcode/{latam_id}
Host: latamgateway.com
Content-Type: "application/json"
ACCOUNT_TOKEN: "<token>"

The response will contain the following parameters:

{
  "id": "dd446b78-4ebd-438f-b923-a16d47ff2574",
  "code": "the order id in your system",
  "description": "100x Rubies",
  "value": 10.00,
  "payment_number": "16877105372"
}