...
Please see below the request parameters for specific actions.
4.1. Adding a payee
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 |
action | Action to be performed. Value "addpayee". | Yes | 11 |
payee_name | Payee's full name if an individual, or "razão social" if the payee is a company. See note "c" | Yes | 128 |
payee_taxid | CPF if an individual, or CNPJ if the payee is a company. See note "d" | Yes | 14 |
payee_bank | Identification of the bank in the Brazilian Central Bank. See note "e" | Yes | 4 |
payee_branch | Payee's account branch number (do not include the verification digit; for example: 1234). | Yes | 12 |
payee_account | Payee's account number (must include the hyphen and the verification digit; for example: 1234568-0). | Yes | 12 |
payee_account_type | Type of the payee's account. "1" = Checking (conta corrente) or "2" = Savings (poupança). | Yes | 1 |
payee_document_link | URL where the payee's scanned documents are stored. See note "f" | Yes | 250 |
payee_description | Description to be registered as the product name when a payout is sent. | Yes | 250 |
payee_email | Payee's e-mail address | Yes | 128 |
payee_phone | Payee's phone number (including the 2-digit area code) | Yes | 40 |
payee_street | Payee's street address | Yes | 200 |
payee_zip | Payee's postal code (in Brazil called CEP). Only digits, do not include the dash. | Yes | 8 |
payee_city | Payee's city | Yes | 40 |
payee_state | Payee's state (official abbreviation). See note "j" | Yes | 2 |
4.2. Updating a payee
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 |
action | Action to be performed. Value "updatepayee". | Yes | 11 |
payee_name | Payee's full name if an individual, or "razão social" if the payee is a company. See note "c" | No | 128 |
payee_taxid | CPF/CNPJ of the payee being updated. Must be the same as the payee_taxid submitted on "addpayee" action. See note "d" | Yes | 14 |
payee_bank | Identification of the bank in the Brazilian Central Bank. See note "e" | No | 4 |
payee_branch | Payee's account branch number (do not include the verification digit; for example: 1234). | No | 12 |
payee_account | Payee's account number (must include the hyphen and the verification digit; for example: 1234568-0). | No | 12 |
payee_account_type | Type of the payee's account. "1" = Checking (conta corrente) or "2" = Savings (poupança). | No | 1 |
payee_document_link | URL where the payee's scanned documents are stored. See note "f" | No | 250 |
payee_description | Description to be registered as the product name when a payout is sent. | No | 250 |
payee_email | Payee's e-mail address | No | 128 |
payee_phone | Payee's phone number (including the 2-digit area code) | No | 40 |
payee_street | Payee's street address | No | 200 |
payee_zip | Payee's postal code (in Brazil called CEP). Only digits, do not include the dash. | No | 8 |
payee_city | Payee's city | No | 40 |
payee_state | Payee's state (official abbreviation). See note "j" | No | 2 |
4.3. Deleting a payee
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 |
action | Action to be performed. Value "deletepayee". | Yes | 11 |
payee_taxid | CPF/CNPJ of the payee being deleted. Must be the same as the payee_taxid submitted on "addpayee" action. See note "d" | Yes | 14 |
4.4. Requesting information about a payee
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 |
action | Action to be performed. Value "getpayee". | Yes | 11 |
payee_taxid | CPF/CNPJ of the payee you want information about. Must be the same as the payee_taxid submitted on "addpayee" action. See note "d" | Yes | 14 |
When a payee is successfully registered in our database, PagBrasil's response has the following structure:
Field | Child Field | Description | Length |
---|---|---|---|
action | Value "getpayee". | 8 | |
success | Value "true" indicates the payee was successfully included in our database. To verify if the payee is active, you need to check the parameter payee->status. | 5 | |
payee | taxid | CPF/CNPJ of the payee being updated. Must be the same as the payee_taxid submitted on "addpayee" action. See note "d" | 14 |
bank | Identification of the bank in the Brazilian Central Bank. See note "e" | 4 | |
branch | Payee's account branch number (do not include the verification digit; for example: 1234). | 12 | |
account | Payee's account number (must include the hyphen and the verification digit; for example: 1234568-0). | 12 | |
account_type | Type of the payee's account. "1" = Checking (conta corrente) or "2" = Savings (poupança). | 1 | |
status | 0 = Pending | 1 | |
name | Payee's full name if an individual, or "razão social" if the payee is a company. See note "c" | 128 | |
Payee's e-mail address | 128 | ||
phone | Payee's phone number | 40 | |
street | Payee's street address | 200 | |
zip | Payee's postal code (in Brazil called CEP). Only digits, do not include the dash. | 8 | |
city | Payee's city | 40 | |
state | Payee's state (official abbreviation). See note "j" | 2 | |
document_link | URL where the payee's scanned documents are stored. See note "f" | 250 |
When a payee failed to be registered in our database, PagBrasil's response has the following structure:
Field | Description | Length |
---|---|---|
action | Value "getpayee". | 8 |
success | Value "false" indicates the payee failed to be included in our database. | 5 |
error_message | Error message(s), separated by semicolons. | Unlimited |
internal_message | PagBrasil's internal use information. | Unlimited |
4.5. Receiving the webhook
...
Webhook content has the following structure:
Field | Description | Length |
---|---|---|
secret | Secret phrase as defined in the PagBrasil Dashboard | 128 |
action | Action performed ("addpayee", "updatepayee" or "deletepayee"). | 11 |
taxid | CPF if an individual, or CNPJ if the payee is a company. See note "d" | 14 |
bank | Identification of the bank in the Brazilian Central Bank. See note "e" | 4 |
branch | Payee's account branch number (do not include the verification digit; for example: 1234). | 12 |
account | Payee's account number (must include the hyphen and the verification digit; for example: 1234568-0). | 12 |
account_type | Type of the payee's account. "1" = Checking (conta corrente) or "2" = Savings (poupança). | 1 |
status | 0 = Pending | 1 |
name | Payee's full name if an individual, or "razão social" if the payee is a company. See note "c" | 128 |
Payee's e-mail address | 128 | |
phone | Payee's phone number | 40 |
street | Payee's street address | 200 |
zip | Payee's postal code (in Brazil called CEP). Only digits, do not include the dash. | 8 |
city | Payee's city | 40 |
state | Payee's state (official abbreviation). See note "j" | 2 |
document_link | URL where the payee's scanned documents are stored. See note "f" | 250 |
signature | HMAC-MD5 hash that authenticates the webhook. | 32 |
Notes:
a) All fields are required except when noted otherwise.
...