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

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.1.a
5.1.a
a) To retrieve subscription info, you can use either the subscription identifier or the recurrence identifier, but only one should be sent in the request.

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 = Active
2 = Pending payment
3 = Inactive/Cancelled
4 = Expired
5 = Paused

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.
Format: YYYY-MM-DD

10

effective_cancellation_date

Date the subscription was effectively canceled.
Format: YYYY-MM-DD

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
5.2.a
5.2.a
a) Recurrences are included in multiple item notes with the following structure:

Field

Description

Length

order

Order number

64

payment_method

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

1

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

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.
Format: MM/DD/YYYY.

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
5.2.b
5.2.b
b) The products are included in multiple item notes with the following structure:

...