> This page is for version v2 (default).
> For other versions, use one of these documentation indexes:
> - v2 (default): https://developers.clearpay.co.uk/v-2/llms.txt
> - v1: https://developers.clearpay.co.uk/v-1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.clearpay.co.uk/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.clearpay.co.uk/_mcp/server.

# Draft Get Billing Agreement

> Retrieve a Billing Agreement at this endpoint

This step retrieves the Billing Agreement to an endpoint, once the Billing Agreement has been setup and created.

The process starts with the following GET:

`GET /v2/billing-agreements/{token}`

This endpoint retrieves a billing agreement. A sample request is:

```http
GET https://api-sandbox.afterpay.com/v2/billing-agreements/{token} HTTP/1.1
Host: api-sandbox.afterpay.com
Accept: application/json
```

Request Parameters

| Name  | In   | Type   | Required | Description                                 |
| :---- | :--- | :----- | :------- | :------------------------------------------ |
| token | path | string | true     | The token of the agreement to be retrieved. |

Responses

| Status | Meaning               | Description                                                                                                                                                                                                     | Schema    |
| :----- | :-------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------- |
| 200    | OK                    | Successful                                                                                                                                                                                                      | Agreement |
| 401    | Unauthorized          | Invalid Merchant API credentials were passed in the Authorization header.                                                                                                                                       | Error     |
| 404    | Not Found             | The agreement with this ID could not be found.                                                                                                                                                                  | Error     |
| 405    | Method Not Allowed    | The request was made using an unacceptable HTTP method. Depending on the endpoint, only PUT or POST requests are allowed. Use the OPTIONS HTTP method to determine which methods are allowed for each endpoint. | Error     |
| 406    | Not Acceptable        | The request included an Accept header for something other than application/json or */*.                                                                                                                         | Error     |
| 500    | Internal Server Error | Commonly this response from PUT/POST endpoints is caused by the request body that is missing or empty.                                                                                                          | Error     |

Example Responses

200 Response

```json
{
  "token": "_7IgXzApNiRoxpEb04LbAFQShsvdE_H3",
  "type": "BILLING",
  "status": "ACTIVE",
  "merchantReference": "merchant-billing-agreement-1234",
  "created": "2021-04-16T02:49:04.740Z",
  "cancelled": null,
  "expires": null
}
```

401 Response

```json
{
  "errorCode": "unauthorized",
  "errorId": "16628d4fb02900d4",
  "message": "Credentials are required to access this resource.",
  "httpStatusCode": 401
}
```

404 Response

```json
{
  "errorCode": "not_found",
  "errorId": "16628d4fb02900d4",
  "message": "Not found",
  "httpStatusCode": 404
}
```

405 Response

```json
{
  "errorCode": "method_not_allowed",
  "errorId": "16628d4fb02900d4",
  "message": "Method not allowed",
  "httpStatusCode": 405
}
```

406 Response

```json
{
  "errorCode": "error",
  "errorId": "16628d4fb02900d4",
  "message": "Not acceptable",
  "httpStatusCode": 406
}
```

500 Response

```json
{
  "errorCode": "error",
  "errorId": "16628d4fb02900d4",
  "message": "Internal server error",
  "httpStatusCode": 500
}
```

> **Note**
>
> To handle the response, you must be authenticated by MerchantAuthentication.

Sometimes a Billing Agreement has to be cancelled. For information on this, see the [Cancel Billing Agreement]() topic.

## Recurring Payments - More Information

* [Recurring Payments](/recurring-payments)
  * [Store Clearpay as a Payment Method](/store-clearpay-as-a-payment-method)
  * [Checkout and Store Clearpay as Payment Method](/checkout-and-store-clearpay-as-payment-method)
  * [Create Recurring Payment](/create-recurring-payment)
  * [Recurring Payments Flow](/draft-recurring-payments-flow)
  * [Setup Billing Agreement Approval](/draft-setup-billing-agreement-approval)
  * [Create Billing Agreement](/draft-create-billing-agreement)
  * [Cancel Billing Agreement](/draft-cancel-billing-agreement)
  * [Create Recurring Payment (Immediate Capture)](/draft-create-recurring-payment-immediate-capture)
  * [Authorise Recurring Payment (Deferred Capture)](/draft-authorise-recurring-payment-deferred-capture)