Revoke Link Token API

API to revoke a previously created link token. Once revoked, the link token can no longer be used to access the WebView.


API Endpoint

POST
https://bankhub-api-sandbox.sepay.vn/v1/link-token/revoke

Request Parameters

link_token_xidstringrequired

ID of the link token to revoke (xid format)

Note
  • This API requires a Bearer Token in the Authorization header
  • Once revoked, the link token can no longer be used
  • Any user currently accessing that link token will be disconnected

Error Handling

404Not Found

The link token does not exist or does not belong to this merchant

401Unauthorized

Invalid or expired access token

400Validation Error

Invalid link_token_xid (wrong format or missing)

API Response

Response 200 - Revoked Successfully
{
  "message": "Liên kết đã được thu hồi thành công"
}
messagestring

Code Examples

1
2
3
4
5
curl --request POST \
--url https://bankhub-api-sandbox.sepay.vn/v1/link-token/revoke \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"link_token_xid":"80655c97-e9d8-4e76-adb7-652c3fbef58c"}'

Important Notes
  • Revocation is irreversible. A revoked link token cannot be restored
  • Any user currently using the link token will be disconnected immediately
  • If the link token was already revoked previously, the API still returns 404
  • It is recommended to revoke the link token immediately when suspicious activity is detected or the user cancels