5. 1-Click Pix

5. 1-Click Pix

5.1. Sending the request

Your POST must be sent to https://sandbox.pagbrasil.com/api/pix/1click setting the content-type of the request header and body as "x-www-form-urlencoded".

Please note that this URL shall only be used for integration and testing procedures. Once the Payment Service Agreement is signed, you will receive the production environment's URL when you request your account to go live.

Request parameters:

Field

Description

Required

Length

Field

Description

Required

Length

secret

Secret phrase as defined in the PagBrasil Dashboard

Yes

128

pbtoken

Token assigned to your merchant account. Your token is displayed at the PagBrasil Dashboard, menu Account > Settings.

Yes

32

order

Order number. See note “b"

Yes

64

Notes:

a) All fields are required except when noted otherwise.


b) The 1-Click Pix can only be created if an order has been previously generated with the payment method set as Pix. It is also required that this original order includes the url_return parameter containing the redirect URL, which will be used to redirect the customer after the order payment. If an error occurs, the system will concatenate the parameter pb_error=1 to the url_return. For example, if the url_return is https://pagbrasil.com/ and an error happens, the customer will be redirected to https://pagbrasil.com/?pb_error=1, allowing you to handle it on your side as needed.


c) The response of the request will be a JSON structure with the parameter url_payment as shown below, and you must redirect the customer to this URL.

{ url_payment: "https://... }

 

 

CONFIDENTIAL