Brazil. Pix payments
To make local payments in Brazil, you can use Brazil's electronic payment system Pix. Such instantaneous payments can only be made in Brazilian real (BRL). If you specify any other currency, the amount will be automatically converted into BRL.
Making a one-time Pix payment
-
Create a session using the
session/createmethod.Alternatively, you can use the
session/init/paymentmethod. In this case, specify all the payment parameters right away and skip the next step. -
Send a
session/start/paymentrequest. Specify the following parameters:pixininternet_banking.type- the payer's
name,emailand CPF or CNPJdocumentinpix country_iso2inparticipant_details.sender
Optionally, you can add a return URL to redirect the customer back after the payment (payment_options.return_url).
To make later recurring payments, send
"recurrent": truein thepayment_optionsobject.Request example
curl -X POST \https://demo.smart-glocal.com/api/v1/session/start/payment \-H 'content-type: application/json' \-H 'X-PARTNER-PROJECT: your_project_name' \-H 'X-PARTNER-SIGN: signature' \-d '{"session_id": "ps_5666","payment_details": {"type": "internet_banking","internet_banking": {"type": "pix","pix": {"name": "Name Surname","email": "email@example.com","document": "12333315123"}}},"amount_details": {"amount": 8007,"currency": "BRL"},"customer": {"reference": "qwiqwi"},"participant_details": {"sender": {"country_iso2": "BR"}},"payment_options": {"return_url": "https://smart-glocal.com/","recurrent": true}}'Response example
curl -X POST \https://partner.com \-H 'content-type: application/json' \-H 'X-PARTNER-SIGN: signature' \-d '{"status": "ok","session": {"id": "ps_5666","status": "in_progress","created_at": "2025-12-04T19:28:58.077701Z","updated_at": "2025-12-04T19:29:23.216667Z","acquiring_payments": [{"id": "pm_566184419","status": "in_progress","created_at": "2025-12-04T19:29:23.217101Z","customer": {"reference": "qwiqwi"},"payment_details": {"type": "internet_banking","internet_banking": {"type": "pix","pix": {"document": "12333315123","name": "Name Surname","email": "email@example.com"}}},"amount_details": {"amount": 8007,"currency": "BRL"},"participant_details": {"sender": {"country_iso2": "BR"}},"payment_options": {"return_url": "https://smart-glocal.com/","recurrent": true}}]}}' -
Wait for a
ready_to_confirmwebhook. When you receive it, it means that Smart Glocal is ready to make the payment and is waiting for your confirmation.Webhook example
curl -X POST \https://partner.com \-H 'content-type: application/json' \-H 'X-PARTNER-SIGN: signature' \-d '{"type": "ready_to_confirm","status": "ok","session": {"id": "ps_5666","status": "in_progress","created_at": "2025-12-04T19:28:58.077701Z","updated_at": "2025-12-04T19:29:23.216667Z","acquiring_payments": [{"id": "pm_566184419","status": "in_progress","created_at": "2025-12-04T19:29:23.217101Z","customer": {"reference": "qwiqwi"},"payment_details": {"type": "internet_banking","internet_banking": {"type": "pix","pix": {"document": "12333315123","name": "Name Surname","email": "email@example.com"}}},"amount_details": {"amount": 8007,"currency": "BRL"},"participant_details": {"sender": {"country_iso2": "BR"}},"payment_options": {"return_url": "https://smart-glocal.com/","recurrent": true}}],"actions": {"confirm": "2025-12-04T07:48:28.275964Z"}}}' -
Send a
session/confirmrequest to confirm the operation or asession/cancelrequest to cancel it.Request example
curl -X POST \https://demo.smart-glocal.com/api/v1/session/confirm \-H 'content-type: application/json' \-H 'X-PARTNER-PROJECT: your_project_name' \-H 'X-PARTNER-SIGN: signature' \-d '{"session_id":"ps_5666"}' -
Wait for an
action_requiredwebhook. Thecustomer_interaction.redirect.urlparameter contains a deeplink to Pix QR.Webhook example
curl -X POST \https://partner.com \-H 'content-type: application/json' \-H 'X-PARTNER-SIGN: signature' \-d '{"type": "action_required","status": "ok","session": {"id": "ps_5666","status": "in_progress","created_at": "2025-12-04T07:48:28.296138Z","updated_at": "2025-12-04T07:48:28.958891Z","acquiring_payments": [{"id": "pm_566184419","status": "pending","created_at": "2025-12-04T07:48:28.296138Z","customer": {"reference": "qwiqwi"},"participant_details": {"sender": {"country_iso2": "BR"}},"payment_details": {"type": "internet_banking","internet_banking": {"type": "pix","pix": {"document": "12333315123","name": "Name Surname","email": "email@example.com"}}},"amount_details": {"amount": 8007,"currency": "BRL"},"customer_interaction": {"type": "redirect","redirect": {"url": "https://redirect-url-example.com/12345","base_url": "https://redirect-url-example.com/12345","method": "GET","params": {}}},"payment_options": {"return_url": "https://smart-glocal.com/","recurrent": true}}]}}' -
After the customer makes the payment, you will receive a
payment_finishedwebhook containing the payment result from Smart Glocal. Thesucceededstatus indicates a successful payment. If you passed"recurrent": true, you wll get a a recurring token in therecurrentobject.Webhook example
curl -X POST \https://partner.com \-H 'content-type: application/json' \-H 'X-PARTNER-SIGN: signature' \-d '{"type": "payment_finished","status": "ok","session": {"id": "ps_5666","status": "accepted","created_at": "2025-12-04T07:48:28.275964Z","updated_at": "2025-12-04T07:49:43.022068Z","acquiring_payments": [{"id": "pm_566184419","status": "succeeded","created_at": "2025-12-04T07:48:28.296138Z","finished_at": "2025-12-04T07:49:43.002789Z","customer": {"reference": "qwiqwi"},"participant_details": {"sender": {"country_iso2": "BR"}},"payment_details": {"type": "internet_banking","internet_banking": {"type": "pix","pix": {"document": "12333315123","name": "Name Surname","email": "email@example.com"}}},"amount_details": {"amount": 8007,"currency": "BRL"},"payment_options": {"return_url": "https://smart-glocal.com","recurrent": true},"recurrent": {"token": "6a6a29c4193a8e1049231e1497a3c5f180e120b20db81b39f53ec478029b53cf","created_at": "2025-12-04T07:48:28.275964Z","finished_at": "2035-12-04T07:48:28.275964Z","is_active": true,"type": "recurrent_token"}}],"actions": {"confirm": "2025-12-04T07:48:28.327146Z","capture": "2025-12-04T07:49:42.965552Z"}}}'
Sequence diagram of QR code payments

Making a recurring Pix MIT payment
Once you made a one-time payment with "recurrent": true and received a recurring token in the recurrent object, you can make recurring payments.
To make a recurring payment, complete the steps above, but send the received token in the session/start/payment request instead of Pix details.
Request example
curl -X POST \
https://demo.smart-glocal.com/api/v1/session/start/payment \
-H 'Content-Type: application/json' \
-H 'X-PARTNER-PROJECT: your_project_name' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"session_id":"ps_3230",
"payment_details": {
"type": "recurrent",
"recurrent": {
"token": "6a6a29c4193a8e1049231e1497a3c5f180e120b20db81b39f53ec478029b53cf"
}
},
"amount_details": {
"amount": 10000,
"currency": "brl"
},
"customer": {
"reference": "lucky"
}
}'
Learn how to manage recurring tokens