4. Updating a subscription

4.1. Sending the request

Your POST must be sent to https://sandbox.pagbrasil.com/api/pagstream/subscription/update setting the content-type of the request header and body as "x-www-form-urlencoded".

Please note that this URL shall only be used for integration and testing procedures. Once the Payment Service Agreement is signed, you will receive the production environment's URL when you request your account to go live.

You may update either the amount of the recurring charge or cancel the subscription (set the status as inactive).

Request parameters:

Field

Description

Required

Length

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

Yes

9

amount_brl

Amount in Brazilian Real of the recurring charge

No

7.2

status

3 = Inactive

No

1

4.2. Reading the response

PagBrasil's response will be an XML or JSON with the following structure:

Field

Description

Length

Field

Description

Length

subscription

Subscription identification

9

status

3 = Inactive

1

amount_brl

Amount in Brazilian Real of the recurring charge

7.2

 

CONFIDENTIAL