Skip to main content

Loterica logo

Loterica is a Brazilian alternative payment method that enables customers to make payments at lottery retailers. This method is popular among those who prefer not to use credit cards or want a more straightforward way to pay without online transactions. When a customer chooses Loterica as a payment method, they receive a payment slip containing a unique barcode and reference number. The slip can be printed and taken to a lottery retailer to complete the payment, or the customer can use a compatible mobile application to scan the barcode and pay electronically.

There are two ways to integrate it: by redirection or push payment.

Integration by redirection

To integrate by redirection, the user must be present at the time of payment, which must be processed through a browser. First we must generate a payment order.

  "extra_data": {
"profile": {
"first_name": "Carlos",
"last_name": "Moreno",
"email": "test@gmail.com",
"document_identification_number": "11032341882"
},
"phone": {
"number": "700000000",
"prefix": "351"
}
}

As service identifier, the service_uuid of the PAGSMILE service you have activated in your Paylands Backend → Manage → Payment Services → Listing must be indicated.

Once the order is generated, the user must be redirected to the payment screen indicating the token of the order and in the query, the name of the APM:

We construct the redirection URL by replacing the token with the value returned in the previous call.

https://api.paylands.com/v1/sandbox/payment/process/{token}?apm=LOTERICA

Once the user is redirected to this screen, they will be able to view the payment slip containing the unique reference code and barcode for Loterica. They can print the slip or copy the bank number and take it to a lottery retailer, or use a compatible mobile application to scan the barcode and complete the payment electronically.

Push payment integration

If the merchant prefers to send the reference to the user through a channel other than the browser, it is possible to integrate the push payment method, which will return the reference to the server so that it can be sent to the user.

To do this, we must first generate a payment order. Mandatory with the user's first name, email, document identification number and phone number.

  "extra_data": {
"profile": {
"first_name": "Carlos",
"last_name": "Moreno",
"email": "test@gmail.com",
"document_identification_number": "11032341882",
"phone": {
"number": "700000000",
"prefix": "351"
}
},
}

Then we must launch the push payment request indicating the UUID of the order. The response will contain the payment barcode and bank_no. These fields are included within the payment transaction, in the field payment_data. An example is included below:

"payment_data": {
"bank_no": "10850221",
"barcode": "10499647359216218774123156548721787200000011649"
}

Once the payment is completed, the merchant will receive the payment notification to the URL indicated in the `url_post' field when generating the payment order.

Testing

For more information on how to test this payment method, visit the PAGSMILE documentation.

Custom fields

Optionally, within the extra_data we can include the payment_reason field, which allows us to indicate a description of the payment.

  "extra_data": {
"payment": {
"payment_reason": "Payment description"
}
}