Process Boleto Payments
https://api-sandbox.letpay.io/payment/MY_PAYMENT_TOKEN/sendPayment
Processes a Boleto payment order that were already created using the Create Payment Order
method.
Request Fields
method
(required/string): Payment method. Valid option:BOLETO
.expiration_date
(optional/date/YYYY-MM-DD): Expiration date (if not informed system will assume 5 days of current date).boleto_line1
(optional/string): First line string to introduce as instructions to cashier and final client.boleto_line2
(optional/string): Second line string to introduce as instructions to cashier and final client.boleto_line3
(optional/string): Third line string to introduce as instructions to cashier and final client.boleto_logo
(optional/string): The HTTP/Data URL of your logo (must be JPG or PNG format and it is recommended to be proportional to 200 x 45 pixels). If omitted, the bank logo will be used.
Response Fields
payment_token
(string): Token to identify this payment.refresh_token
(string): Updated access token for next calls.transaction_status
(string): Status of this payment.boleto_amount
(string): Amount of this payment.boleto_duedate
(date/YYYY-MM-DD): Expiration date of the boleto.boleto_code
(string): Numbered string containing code to pay the boleto.boleto_html
(string): Base64 zipped HTML representation of the boleto.
AUTHORIZATION | API Key |
---|---|
Key | X-Auth-Token |
Value | MY_ACCESS_TOKEN |
Body Raw(json)
json
{
"method": "BOLETO",
"expiration_date": "2024-12-31",
"boleto_line1": "NÃO RECEBER APÓS VENCIMENTO",
"boleto_line2": "PAGÁVEL EM TODA A REDE BANCÁRIA ATÉ O VENCIMENTO",
"boleto_line3": "PAGADOR: CPF 123.456.789-09",
"boleto_logo": "data:image/png;base64,BASE64_ENCODED_IMAGE"
}
Example Request
- 200 - Success
- 401 - Unauthorized
- 502 - Bad Gateway
Example Request
200 - Success
curl --location 'https://api-sandbox.letpay.io/payment/MY_PAYMENT_TOKEN/sendPayment' \
--header 'X-Auth-Token: MY_ACCESS_TOKEN' \
--data '{
"method": "BOLETO",
"expiration_date": "2024-12-31",
"boleto_line1": "NÃO RECEBER APÓS VENCIMENTO",
"boleto_line2": "PAGÁVEL EM TODA A REDE BANCÁRIA ATÉ O VENCIMENTO",
"boleto_line3": "PAGADOR: CPF 123.456.789-09",
"boleto_logo": "data:image/png;base64,BASE64_ENCODED_IMAGE"
}'
Example Response
Header
Content-Type: application/json
Body
{
"transaction_status": "PROCESSING",
"payment_token": "8c5a94c7-8ee6-449e-97b1-8308288fc68e",
"boleto_html": "BASE64_ZIPPED_HTML",
"boleto_code": "03399853012970000024227020901016278150000015630",
"boleto_duedate": "2024-12-31",
"boleto_amount": "123.45",
"refresh_token": "MY_ACCESS_TOKEN"
}
Example Request
401 - Unauthorized
curl --location 'https://api-sandbox.letpay.io/payment/MY_PAYMENT_TOKEN/sendPayment' \
--header 'X-Auth-Token: INVALID_ACCESS_TOKEN' \
--data '{
"method": "BOLETO",
"expiration_date": "2024-12-31",
"boleto_line1": "NÃO RECEBER APÓS VENCIMENTO",
"boleto_line2": "PAGÁVEL EM TODA A REDE BANCÁRIA ATÉ O VENCIMENTO",
"boleto_line3": "PAGADOR: CPF 123.456.789-09"
}'
Example Response
Header
Content-Type: application/json
Body
{
"timestamp": "2024-01-16T15:35:10.131+0000",
"status": 401,
"error": "Unauthorized",
"message": "Access Denied",
"path": "/payment/c6b2ff38-b53d-42dc-b11a-bce5cc05c253/sendPayment"
}
Example Request
502 - Bad Gateway
curl --location 'https://api-sandbox.letpay.io/payment/MY_PAYMENT_TOKEN/sendPayment' \
--header 'X-Auth-Token: MY_ACCESS_TOKEN' \
--data '{
"method": "BOLETO",
"expiration_date": "2024-12-31",
"boleto_line1": "NÃO RECEBER APÓS VENCIMENTO",
"boleto_line2": "PAGÁVEL EM TODA A REDE BANCÁRIA ATÉ O VENCIMENTO",
"boleto_line3": "PAGADOR: CPF 123.456.789-09"
}'
Example Response
Header
Content-Type: application/json
Body
{
"timestamp": "2024-01-16T20:12:28.156+0000",
"status": 502,
"error": "Bad Gateway",
"message": "There was an issue when contacting an external API, please contact support",
"path": "/payment/2f1c0103-b6fe-4e99-864c-d20c68b97a85/sendPayment",
"errors": [
{
"code": "00.03.0001",
"description": "There was an issue when contacting an external API, please contact support"
}
],
"refresh_token": "MY_ACCESS_TOKEN"
}