Versions Compared

Key

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

...

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

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

Yes

64

...

PagBrasil's response will be an XML with the following elements. For further information about the parameters, please refer to the documentation of each specific payment method available at the Payment Link.

Field

Description

Length

order

Order number

64

payment_method

C = Credit card
D = Debit card
B = Boleto Bancário
F = Boleto Flash®
P = PEC Flash®
X = PagBrasil Pix

This parameter is not present when the customer has not selected a payment method yet.

1

submission_date

Date the order was submitted to PagBrasil.
Format: MM/DD/YYYY.

10

url_boleto

URL to view/print the Boleto Bancário. Only available when payment_method equals to "B" or "F".

80

url_payment

URL that redirects the customer to the bank's page to complete the payment. Only available when payment_method equals to "R", "E", "U" or "S".

80

company_code

Company code. Only available when payment_method equals to "P".

10

payment_id

Payment identification. Only available when payment_method equals to "P".

17

payment_instructions

Payment instructions in Portuguese. Only available when payment_method equals to "P".

254

expiration_date

Last date to pay the PagBrasil Pix.
Format: MM/DD/YYYY.
Only available when payment_method equals to "X".

10

expiration_time

Maximum time within the expiration date the PagBrasil Pix will be allowed to be paid.
Format: HH:MM.
Only available when payment_method equals to "X"

5

pix_image

Pix QR Code image link.
Only available when payment_method equals to "X"

80

pix_code

Alternative code for mobile users to complete the payment when they cannot scan the code.
Only available when payment_method equals to "X"

254

order_status

WP = Payment requested but not processed yet
PA = Payment pre-authorized but not captured yet
PC = Payment Completed
PF = Payment Failed
PR = Payment Rejected
RR = Refund Requested
RP = Refund Processed
CB = Chargeback

2

authorization_code

Authorization code provided by the card issuer. Only available when payment_method equals to "C" or "D" and order has been authorized.

9

payment_date

Date the payment was completed.
Format: MM/DD/YYYY.

10

product_name

Product name

254

customer_name

Customer's name

128

customer_taxid

CPF if an individual, or CNPJ if the customer is a company

14

customer_email

Customer's e-mail address

128

customer_phone

Customer's phone number

40

address_street

Customer's street address

200

address_zip

Customer's postal code (in Brazil called CEP)

8

address_city

Customer's city

40

address_state

Customer's state (official abbreviation)

2

amount_brl

Amount in Brazilian Real

5.2

amount_paid

Amount paid by the customer in Brazilian Real

5.2

cc_installments

Number of installments (1 to 12). Only available when payment_method equals to "C" or "D".

2

cc_brand

Card brand. Only available when payment_method equals to "C" or "D".

See note "f"   

1

cc_holder

Card holder's name. Only available when payment_method equals to "C" or "D".

30

cc_number

Card number truncated. Only available when payment_method equals to "C" or "D".

14 - 19

soft_descriptor

Text identification that will appear on the customer's credit card statement next to the payee name (PB). Only available when payment_method equals to "C" or "D".

13

amount_refunded

Used when order_status equals to RR or RP. Amount requested to be refunded (Brazilian Real).

5.2

refund_date

Used when order_status equals to RP.
Date the refund requested was completed.
Format: MM/DD/YYYY.

10

refund_info

Used when order_status equals to RR or RP. See item 6.2, note "c".

128

error_code

Used when order_status equals to PF or PR, and payment_method equals to "C" or "D". See table in item 7.

2

signature

HMAC-MD5 hash that authenticates the response.

See note "a"   

32

...

f) Current accepted credit card brands:

Brand

Code

CC Length

CVV Length

Sample

Mastercard

M

16

3

5555666677778884

Visa

V

16

3

4984123412341234

Diners

D

14

3

30111122223331

Amex

A

15

4

376411112222331

Hipercard

H

16

3

6062111122223339

Elo

E

16

3

6362970000457013

...