­7. Deleting a previously saved credit card

When working with recurring payments, the customer may request you to not charging their credit card again. In that case, you must request us to delete their credit card information from the recurring payments database.

Your POST must be sent to https://sandbox.pagbrasil.com/api/order/creditcard/delete 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.

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

order

Original order number. See note "c"   

Yes

64

customer_taxid

CPF if an individual, or CNPJ if the customer is a company. See note "d"   

Yes

14

Notes:

a) To learn more about how to work with recurring payments please refer to item 4.1, parameters cc_save and cc_prevsaved.


b) A successful response for the credit card information being deleted will be "Credit card information successfully deleted".


c) If the order was not previously saved or it was already deleted the response will be "Order not found".


d) If the parameter customer_taxid doesn't match the original order's the response will be "Parameter customer_taxid doesn't match the information previously saved".

CONFIDENTIAL