Cancel Billing Agreement (Alternative)

Alternative endpoint to cancel a billing agreement using a request body instead of path parameter. Functionally equivalent to DELETE /v2/billing-agreements/{token}. *Deprecated. For new integrations, see [Grants](https://afterpay.docs.buildwithfern.com/afterpay-online-developer/api-reference/reference/grants/start-grant-approval).*

Authentication

AuthorizationBasic

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

Headers

User-AgentstringRequired
Accept"application/json"Required

Request

This endpoint expects an object.
tokenstringRequired
The billing agreement token to cancel

Response

Billing agreement cancelled successfully
tokenstring
Unique token identifying the agreement
type"BILLING"
Type of agreement
statusenum
Current status of the agreement
createddatetime
Timestamp when the agreement was created
merchantReferencestringOptional
Merchant's reference for this agreement
cancelleddatetimeOptional
If present, indicates when the agreement was cancelled
expiresdatetimeOptional
If present, indicates when the agreement's status will become EXPIRED, preventing a client from using it to create payments
eventslist of objectsOptional
List of events associated with this agreement
requestIdstringOptional
Unique identifier for the request
consumerReferencestringOptional
Reference identifier for the consumer
emailstringOptional
Masked email address of the consumer

Errors

403
Cancel Billing Agreement Alt Request Forbidden Error
404
Cancel Billing Agreement Alt Request Not Found Error