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.
HomeGuidesAPI Reference
HomeGuidesAPI Reference
  • Reference
    • Introduction
      • POSTCreate Billing Agreement
      • POSTCreate Billing Agreement Alias
      • POSTStart Billing Agreement Approval Process
      • PUTCancel Billing Agreement (Alternative)
      • POSTRetrieve Billing Agreement Offers
      • POSTRetrieve Billing Agreement
      • POSTStart Billing Agreement Link Flow
      • GETGet Billing Agreement Details
      • DELCancel Billing Agreement
      • POSTCapture Full Recurring Payment
      • POSTAuthorize Recurring Payment
LogoLogo
ReferenceBilling Agreements (Deprecated)

Create Billing Agreement Alias

POST
/v2/billing-agreements/alias
POST
/v2/billing-agreements/alias
$curl -X POST https://global-api-sandbox.afterpay.com/v2/billing-agreements/alias \
> -H "User-Agent: User-Agent" \
> -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 billing agreement to help load payment schedule widget. *Deprecated. For new integrations, see [Grants](https://afterpay.docs.buildwithfern.com/afterpay-online-developer/api-reference/reference/grants/start-grant-approval).*
Was this page helpful?
Previous

Start Billing Agreement Approval Process

Next
Built with

Creates an alias for an existing billing agreement to help load payment schedule widget.

Deprecated. For new integrations, see Grants.

Authentication

AuthorizationBasic

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

Headers

User-AgentstringRequired
AcceptstringOptionalDefaults to application/json

Request

The request containing the billing agreement token and optional duration
tokenstringRequired
Token of the billing agreement to create an alias for
durationstring or nullOptionalformat: "duration"

Duration of the billing agreement in ISO-8601 period format

Response

Alias created successfully
tokenstring
Token representing the billing agreement alias
expirystringformat: "date-time"
Timestamp when the alias token expires

Errors

403
Forbidden Error
415
Unsupported Media Type Error