Boleto
This endpoint allows you to submit a payin by Boleto in Brazil.
POST https://gateway-test.pagsmile.com/trade/pay
Headers
Content-Type
string
Yes
Fixed value: application/json; charset=UTF-8.
Authorization
string
Yes
Basic authentication using Base64(app_id:security_key).
Request Body
app_id
string
Yes
Use the App ID assigned by Pagsmile.
Merchant application ID.
region
string
Conditional
Fixed value: BRA. Required when using a Global app.
ISO 3166-1 alpha-3 country code for Brazil.
out_trade_no
string
Yes
Maximum length: 64 characters. Must be unique for the merchant application.
Merchant order number.
method
string
Yes
Fixed value: Boleto.
Payment method.
order_amount
decimal
Yes
Minimum amount: 20 BRL in the sandbox environment and 2 BRL in the production environment. Supports up to 2 decimal places.
Payment amount in BRL.
order_currency
string
Yes
Fixed value: BRL.
Payment currency.
subject
string
Yes
Maximum length: 128 characters.
Payment subject or order title.
content
string
Yes
Maximum length: 255 characters.
Payment description displayed on the Boleto.
notify_url
string
Yes
Must be a valid URL. HTTPS is recommended.
Merchant endpoint that receives asynchronous payment notifications.
return_url
string
No
Must be a valid URL. HTTPS is recommended.
URL to which the customer is redirected after the payment flow.
buyer_id
string
Yes
Maximum length: 128 characters.
Merchant-side customer ID.
timestamp
string
Yes
Format: yyyy-MM-dd HH:mm:ss. Maximum length: 19 characters.
Time at which the request is sent.
timeout_express
string
No
Supported formats: <number>m (minutes), <number>h (hours), <number>d (days), or 1c (end of the current day). A number without a unit is treated as minutes. Default: 90m. Minimum: 1m. Maximum: 15d.
Controls how long the order may remain in the initial stage before it is submitted for processing. It does not change the 3-day validity period of the generated Boleto.
customer.identify.type
string
Yes
One of: CPF, CNPJ.
Customer identification type.
customer.identify.number
string
Yes
CPF: 11 digits. CNPJ: 14 digits. Maximum API length: 64 characters.
Customer identification number.
customer.name
string
Yes
—
Customer's full name.
customer.email
string
Yes
Maximum length: 64 characters. Must be a valid email address.
Customer's email address.
customer.phone
string
No
—
Customer's phone number.
address.zip_code
string
Yes
8 digits.
Customer's Brazilian postal code (CEP).
Responses
Example
Third-party CPF/CNPJ validators
Last updated