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)

Start Billing Agreement Link Flow

POST
/v2/billing-agreements/start
POST
/v2/billing-agreements/start
$curl -X POST https://global-api-sandbox.afterpay.com/v2/billing-agreements/start \
> -H "User-Agent: User-Agent" \
> -H "Content-Type: application/json" \
> -u "<username>:<password>" \
> -d '{
> "alias": "my-afterpay-email@gmail.com",
> "requestId": "123e4567-e89b-12d3-a456-426614174000"
>}'
1{
2 "token": "005.2fkv5o963b132z8ppa34srlh60987y87d55re237wsg9tr4q2",
3 "requestId": "123e4567-e89b-12d3-a456-426614174000",
4 "expiresAt": "2025-03-22T12:00:00Z",
5 "deliveryType": "SMS"
6}
Initiates the headless billing agreement link flow process. *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

Get Billing Agreement Details

Next
Built with

Initiates the headless billing agreement link flow process.

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 details needed to start the billing agreement link flow
aliasstringRequired
Email or phone number associated with the consumer's afterpay account
requestIdstringRequired
A unique identifier for this request

Response

Link flow started successfully
tokenstring
Token identifying the billing agreement to be created
requestIdstring
The unique identifier from the request
expiresAtstringformat: "date-time"
When this link attempt will expire
deliveryTypeenum
How the verification code was delivered to the consumer
Allowed values:

Errors

404
Not Found Error
412
Precondition Failed Error
429
Too Many Requests Error