For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
GuidesAPI Reference
GuidesAPI Reference
  • Reference
    • Introduction
      • POSTCreate Grant Approval
      • POSTCreate Grant
      • GETRetrieve Grant
      • POSTRevoke Grant
      • POSTCreate Grant Alias
      • POSTStart Grant Link Flow
      • POSTGrant status updated
LogoLogo
ReferenceGrants - Afterpay

Revoke Grant

POST
/v2/grants/:grantId/revoke
POST
/v2/grants/:grantId/revoke
$curl -X POST https://global-api-sandbox.afterpay.com/v2/grants/grantId/revoke \
> -u "<username>:<password>"
1{
2 "grant": {
3 "id": "005.2fkv5o963b132z8ppa34srlh60987y87d55re237wsg9tr4q2",
4 "type": "ON_FILE",
5 "status": "ACTIVE",
6 "created": "2024-03-04T12:00:00Z",
7 "merchantReference": "merchant_ref_123",
8 "cancelled": "2024-03-05T12:00:00Z",
9 "expires": "2025-03-04T12:00:00Z",
10 "consumerReference": "cust_12345",
11 "email": "j***@e***.com",
12 "requestId": "req_abc123def456"
13 }
14}
Revokes a grant, rendering it unusable. Other endpoints will no longer be able to use the grant to perform its associated action.
Was this page helpful?
Previous

Create Grant Alias

Next
Built with

Authentication

AuthorizationBasic

Basic authentication of the form Basic <base64(username:password)>.

Path parameters

grantIdstringRequired
The unique identifier id of the grant to revoke

Response

OK
grantobject

Errors

403
Forbidden Error
404
Not Found Error