Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Webhook content has the following structure:

Field

Description

Length

secret

Secret phrase as defined in the PagBrasil Dashboard

128

subscription

Subscription identification

9

status

0 = Waiting for first payment
1 = Active
2 = Pending payment
3 = Inactive/Cancelled
4 = Expired
5 = Paused

1

amount_brl

Amount in Brazilian Real of the recurring charge

5

7.2

next_billing_date

Start date for the first recurring charge.
Format: YYYY-MM-DD

10

signature

HMAC-MD5 hash that authenticates the webhook.

See note "c"   

32

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.

...

Please note that any webhook can be resent manually at any time at the PagBrasil Dashboard.

...

Anchor
7.c
7.c
c) To authenticate the legitimacy of the webhook, you may check the parameter secret and/or the parameter signature, which is a HMAC-MD5 hash based on the values of all elements (except the secret) and a key defined at the PagBrasil Dashboard, menu Account > Settings. The HMAC-MD5 source string is the concatenation of all the elements that are present in the structure and its total length.