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

Yes

64

payment_method

B = Boleto Bancário

Yes

1

product_name

Product name. See Note "e"

Yes

254

customer_name

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

Yes

128

customer_taxid

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

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

Yes

2

amount_brl

Amount in Brazilian Real

Yes

5.2

bol_expiration

Number of days (0 - 999) the Boleto Bancário 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 date of an already issued boleto using the API function "/api/order/extend" (see item 7).

No

3.0

param_url

A string that will be included in the XML with the list of the orders paid (See item 4.2).

It may contain any information the merchant wants to.

No

254

store_code

Code defined by the merchant per store to identify a set consisting of a customized message and a logo that will be displayed on each boleto.

Shall not be used when the merchant has only one store associated to the supplied merchant account credentials (pbtoken and secret).

No

32

Notes:

Aa) All fields are required except when noted otherwise.

...

Bb) If a parameter is sent with a size greater than the maximum allowed, process will not be aborted but the value will be truncated.

...

Anchor
ParametersC
ParametersC
Cc) 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).

...

Anchor
ParametersD
ParametersD
Dd) The order number must be unique for a specific customer.

...

Anchor
ParametersE
ParametersE
Ee) The parameter product_name must contain the name of the product or service purchased, and it is required for compliance purposes.

...

Anchor
ParametersF
ParametersF
Ff) You need to let the customer to select if they are a "pessoa física" (individual) or a "pessoa jurídica" (company).

...

Anchor
ParametersG
ParametersG
Gg) There are two types of tax IDs in Brazil: CPF (used by individuals) and CNPJ (used by companies). You must validate the tax ID to prevent sending to PagBrasil invalid values. Please find below the format for each type of tax ID.

...

The last 2 digits of the CPF/CNPJ are check digits, and you will need to use them to validate the tax ID entered by the customer. You will find examples of CPF/CNPJ validation routines in different languages at the PagBrasil Dashboard, menu Resources. For testing purposes, please use CPF 91051605962 and CNPJ 78797547000157.

...

Anchor
ParametersH
ParametersH
Hh) The parameter address_state must be the official abbreviation used in Brazil. To prevent customer from entering an invalid state, please see table below to create a select object (drop-down list).

...

Example for payment on a holiday: If the holiday is on a Wednesday, banks will consider the payment date as Thursday, hence the Boleto Bancário will be processed on Friday.

If the merchant has activated Boleto Flash®, any Boleto Bancário is automatically generated with the Flash feature. Boleto Flash® is compatible with traditional Boletos Bancários, so that one can pay a Boleto Bancário as Boleto Flash® and vice-versa – as long as the merchant has activated this exclusive feature. Payment confirmations for Boleto Flash® are sent within the same day. For more information about this product please read the Merchant Guide for Boleto Flash®, available at the PagBrasil Dashboard, menu Resources.