delete https://api-uat.payments.paynow.afterpaytouch.dev/v1/cards/delete
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
Name | Type | Mandatory | Description | Comment |
---|---|---|---|---|
token | string | yes | External payment token ID (card token) provided to merchant | The unique identifier representing the customer's payment card referred to as card token |
risk | Risk | yes | Information to enable risk assessment process | Refer Risk Object |
requestor | string | yes | Who requested the delete token request | phone number, employee number etc. |
Request headers
Parameter | Mandatory | Description |
---|---|---|
Content-Type | yes | application/json |
Accept | yes | application/json |
Authorization | yes | Bearer Access-admin-oauth-token (Refer Authentication) |
User-Agent | yes | All 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-Id | yes | unique 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