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

Create Grant Alias

POST
/v2/grants/alias
POST
/v2/grants/alias
$curl -X POST https://global-api-sandbox.afterpay.com/v2/grants/alias \
> -H "Content-Type: application/json" \
> -u "<username>:<password>" \
> -d '{
> "token": "005.2fkv5o963b132z8ppa34srlh60987y87d55re237wsg9tr4q2"
>}'
1{
2 "token": "ba_alias_def789ghi012",
3 "expiry": "2025-03-04T22:13:45Z"
4}
Creates an alias for an existing grant to help load the payment schedule widget.
Was this page helpful?
Previous

Start Grant Link Flow

Next
Built with

Authentication

AuthorizationBasic

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

Headers

AcceptstringOptionalDefaults to application/json

Request

This endpoint expects an object.
tokenstringRequired
Token of the grant to create an alias for
durationstring or nullOptionalformat: "duration"

Duration of the grant in ISO-8601 period format

Response

OK
tokenstring
Token representing the grant alias
expirystringformat: "date-time"
Timestamp when the alias token expires

Errors

403
Forbidden Error
415
Unsupported Media Type Error