...
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 |
subscription | Subscription identification. See note “a“ | Yes | 64 |
recurring_order | Recurring identification. See note “a“ | Yes | 932 |
page | Selected page. When page is not provided, the page with the last 50 results is returned. | No | Unlimited |
response_type | XML (default) or JSON. | No | 4 |
Notes:
Anchor | ||||
---|---|---|---|---|
|
5.2. Reading the response
PagBrasil's response will be an XML or JSON with information about the subscription and the recurrences, with the following structure:
Field | Description | Length |
---|---|---|
subscription | Subscription identification | 9 |
status | 0 = Waiting for first payment | 1 |
frequency | Interval between the subscription renewals. | 1 |
amount_brl | Amount in Brazilian Real of the recurring charge | 7.2 |
number_recurrences | Number of recurrences existing in the subscription. | Unlimited |
limit | Maximum subscription renewals (0 is unlimited). | 3 |
view_future_charges | Number of the visible future charges | 4 |
next_billing_date | Next billing date. Format: YYYY-MM-DD | 10 |
cancellation_date | Date the subscription will be cancelled if not paid. | 10 |
effective_cancellation_date | Date the subscription was effectively canceled. | 10 |
order_token | Tokenized order number | 80 |
customer_email | Customer's e-mail address | 128 |
recurrences | JSON structure with the list of recurrences. See note "a" | |
products | JSON structure with the list of products or service set defined for the subscription. See note "b" | Unlimited |
Notes:
Anchor | ||||
---|---|---|---|---|
|
Field | Description | Length |
---|---|---|
order | Order number | 64 |
payment_method | C = Credit card | 1 |
order_status | WP = Payment requested but not processed yet | 2 |
link | Payment link for that recurrence if it was created. | 80 |
product_name | Product name. | 254 |
amount_brl | Amount in Brazilian Real. | 7.2 |
amount_original | Original amount in Brazilian Real before any discount. | 7.2 |
payment_date | Date the payment was completed. | 10 |
customer_email | Customer's e-mail address. | 128 |
products | JSON structure with the list of products or service for that specific recurrence. See note “a“ | Unlimited |
Anchor | ||||
---|---|---|---|---|
|
...