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.

put/v2/billing-agreements/cancel

Request

  • Base URL: https://global-api-sandbox.afterpay.com
  • URL: https://global-api-sandbox.afterpay.com/v2/billing-agreements/cancel
  • Auth: HTTP basic

Headers

User-Agentstring required
Accept'application/json' required

Request body

tokenstring required

The billing agreement token to cancel

Response

Billing agreement cancelled successfully

tokenstring required

Unique token identifying the agreement

type'BILLING' required

Type of agreement

status'ACTIVE' | 'CANCELLED' | 'EXPIRED' | 'PENDING_RENEWAL' | 'PENDING_RENEWAL_EXPIRED' required

Current status of the agreement

merchantReferencestring

Merchant's reference for this agreement

createdstring date-time required

Timestamp when the agreement was created

cancelledstring date-time

If present, indicates when the agreement was cancelled

expiresstring date-time

If present, indicates when the agreement's status will become EXPIRED, preventing a client from using it to create payments

requestIdstring

Unique identifier for the request

consumerReferencestring

Reference identifier for the consumer

emailstring

Masked email address of the consumer

Changes

No recorded changes to this operation across all 1 revision of this API.