Use this API to delete the stored card token

To provide an API to merchant to delete the tokens(stored cards) of customers stored in Afterpay DB.

Merchant will pass the external token id (card token) of the card to be deleted in the request to Afterpay. The API will delete the token information stored in database so that this card token can not be used for future payments.

HTTP Request

PUT https://<env>/v1/cards/delete

Request body

NameTypeMandatoryDescriptionComment
tokenstringyesExternal payment token ID (card token) provided to merchantThe unique identifier representing the customer's payment card referred to as card token
riskRiskyesInformation to enable risk assessment processRefer Risk Object
requestorstringyesWho requested the delete token requestphone number, employee number etc.

Request headers

ParameterMandatoryDescription
Content-Typeyesapplication/json
Acceptyesapplication/json
AuthorizationyesBearer Access-admin-oauth-token (Refer Authentication)
User-AgentyesAll requests must include information about the Merchant, Platform, Channel and Service. For example Merchant/ABC; Platform/SAP; MerchantId/ABC123; Channel/sms; CountryCode/AU; System Information/Java/8.3; Service/Recharge
Request-Idyesunique identifier for delete request provided by the merchant

Sample Example

curl -v -X PUT https://<env>/v1/cards/delete \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer eygjTYIUIUIUOIfghjkjkWErjhjh" \
-H "User-Agent: Merchant/ABC; Platform/SAP; MerchantId/ABC123; Channel/autopayment; CountryCode/AU System Information/Java/8.3; Service/Auto-recharge"\
-H "Request-Id: 84567324156665656565656565656513" \
-d '{
  "token": "ERTYUIODFG123SERDFGTY1000345RTY",
  "risk": {...},
  "requestor": "6140222333"
}'

Response body

A successful request returns the 200 OK status code

Language
Click Try It! to start a request and see the response here!