Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 "e"   

Yes

64

payment_method

X = PagBrasil Pix

Yes

1

product_name

Product name. See note "f"   

Yes

254

customer_name

Customer's full name if an individual, or "razão social" if the customer is a company. See note "g"   

Yes

128

customer_taxid

CPF if an individual, or CNPJ if the customer is a company. See note "h"   

Yes

14

customer_email

Customer's e-mail address

Yes

128

customer_phone

Customer's phone number (including the 2-digit area code)

Yes

40

address_street

Customer's street address

Yes

200

address_zip

Customer's postal code (in Brazil called CEP). Only digits, do not include the dash.

Yes

8

address_city

Customer's city

Yes

40

address_state

Customer's state. See note "i"   

Yes

2

amount_brl

Amount in Brazilian Real. See note "c"   

Yes

5.2

pix_expiration

Number of minutes the PagBrasil Pix is valid for. If you don't use this parameter, our system will use the default value set at the PagBrasil Dashboard, menu Account > Settings. You may extend the expiration of an already issued PagBrasil Pix using the API function "/api/order/extend" (see item 7).

No

5.0

param_url

A string that can be concatenated to the URL our server posts the response to. See note "j"   

No

254

...

d) The response for the "/api/order/add" call will be an XML with the order details, in exactly the same format as a "/api/order/get" response (see item 5.2). Elements "pix_image" and "pix_code" in the XML contain the URL of the Pix QR Code image and the alternative code for mobile users to copy and paste when they cannot scan the code. Please refer to item 5.2 for further information on the XML elements of the response.

...

Anchor
PixNoteE
PixNoteE
e) The order number must be unique for a specific customer. If you try to submit two different transactions with the same order number but a different customer_taxid, our server will respond with the message "Duplicated order.". Our server will also respond with "Duplicated order." if you try to re-submit an order that is already paid. If parameters order and customer_taxid are equal to a previously submitted unpaid order, the previous order will be updated with the new information provided and the response will be the URL that you will need to redirect the customer to (see note "d").
Characters allowed in the parameter order (regular expression): [a-zA-Z0-9\.\-\_\/]

...