...
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 | |||
product_name | Product name. See note "d" | Yes | 254 | |||
customerpayer_name | Customer's full name if an individual, or "razão social" if the customer is a company. See note "e" | Yes | 128 | |||
customerpayer_taxid | CPF if an individual, or CNPJ if the customer is a company. See note "f" | 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 "g" | Yes | 2 | |||
pix_rec_description | Text that uniquely identifies the subscription within the customer's banking app. | No | 19 | |||
pix_rec_cycle | Define the recurrence cycle as one the following values: “weekly”, “monthly”, “quarterly”, “semiannual”, “annually”. | Yes | 10 | |||
pix_rec_expiration | Recurrence end date. | No | 10 | |||
pix_rec_first_recurrence | Estimated date of the first future recurring charge. | Yes | 10 | |||
pix_rec_minimum_amount | Minimum amount for recurring charges. This prevents the customer from setting a lower payment limit, but it may also make the customer hesitant to give their consent. Therefore, it should be used cautiously and aligned with the subscription the customer is signing up for. | No | 7.2 | |||
parampix_rec_url | A string that can be concatenated to the URL our server posts the response to. See note "h" | No | 254retry | Set “1” to indicate it’s a recurring charge retry. We strongly recommend setting the parameter “pix_rec_retry” to 1 to enable retry attempts in case of failure. See note “g” | No | 1 |
Notes:
a) All fields are required except when noted otherwise.
...
c) The response will be an XML with the recurrence details, in exactly the same format as a "/api/pix/rec/get" response (see item 89.2).
...
| Anchor | ||||
|---|---|---|---|---|
|
...
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 | ||||
|---|---|---|---|---|
|
State | Abbreviation |
|---|---|
Acre | AC |
Alagoas | AL |
Amapá | AP |
Amazonas | AM |
Bahia | BA |
Ceará | CE |
Distrito Federal | DF |
Espírito Santo | ES |
Goias | GO |
Maranhão | MA |
Mato Grosso | MT |
Mato Grosso do Sul | MS |
Minas Gerais | MG |
Pará | PA |
Paraíba | PB |
Paraná | PR |
Pernambuco | PE |
Piauí | PI |
Rio de Janeiro | RJ |
Rio Grande do Norte | RN |
Rio Grande do Sul | RS |
Rondônia | RO |
Roraima | RR |
Santa Catarina | SC |
São Paulo | SP |
Sergipe | SE |
Tocantins | TO |
Anchor
6.2. Receiving the webhook with the authorization response
You need to login to the PagBrasil Dashboard and specify the URL (webhook) you want PagBrasil to send the notification confirming the recurring was authorized. By default we only allow outgoing connections to HTTPS URLs at standard port 443. If you plan to use a different port number in the IPNwebhook's URL please contact us requesting an exception.
...
Field | Description | Length |
|---|---|---|
secret | Secret phrase as defined in the PagBrasil Dashboard | 128 |
action | Value “consent”. | 7 |
payment_method | X = PagBrasil Pix | 1 |
pix_rec_id | Recurrence identifier to be used when requesting future recurring charges. | 64 |
recurrence_status | A = Authorized | 1 |
Notes:
a) Response format is defined at the PagBrasil Dashboard. API's response format may be defined as XML or JSON, and the webhook may be sent as an XML, a JSON or a POST.
...
b) After processing our IPN webhook, your server needs to acknowledge that it has successfully received it by writing "Received successfully [timestamp]". If your server responds to our IPN with an invalid acknowledgement, the webhook fails our system will e-mail your technical contact a warning notification (subject "Urgent: Error posting IPN - Not Compliantwebhook"). In this case, the IPN will not be resent and you may want to resend the IPN manually at the PagBrasil Dashboard, menu IPN History, after resolving the problem at your end.If we are not able to connect to your server to send an IPN, our system will e-mail your technical contact a warning notification (subject "Urgent: Error posting IPN - Fail") and If you activate the auto resend, our system will then try to resend the IPN failed webhook as follows:
The next 7 attempts will take place every 7 minutes.
The next 23 attempts will take place every 60 minutes. If the last attempt of sending the IPN webhook fails, our system will e-mail another warning notification (subject "Urgent: Error posting IPN - Failwebhook").
Please note that any IPN webhook can be resent manually at any time at the PagBrasil Dashboard.
...
| Anchor | ||||
|---|---|---|---|---|
|