> ## Documentation Index
> Fetch the complete documentation index at: https://developers.paychoice.com.au/llms.txt
> Use this file to discover all available pages before exploring further.

# Subscriptions

> Link a customer to a membership from a start date; archive to cancel.

A subscription puts a customer on a membership from a given date. Creating one generates the [payment schedule](https://developers.paychoice.com.au/billing/payment-schedule.md); PayChoice charges the customer's default payment method as each item falls due.

| Action | Request |
| - | - |
| Create | `POST /subscription` |
| Retrieve | `GET /subscription/{subscription}` |
| List | `GET /subscription?page[number]=1&page[items]=5` |
| Archive (cancel) | `DELETE /subscription/{subscription}` |

## Create

```bash theme={null}
curl https://api-sandbox.paychoice.com.au/api/v4/subscription \
  -u "$PAYCHOICE_USERNAME:$PAYCHOICE_PASSWORD" \
  -H "Accept: application/json" \
  -d customer_id=8c34513b-61e0-4f8a-b007-af4fe9479bf4 \
  -d membership_id=3f2a9c1e-7b64-4d8a-9e21-5c0d8f7a1b23 \
  -d start_date=2026-11-10
```

**customer\_id** `uuid` *required*

The customer's GUID (`customer.id`), not the numeric `customer_id`.

**membership\_id** `uuid`

The membership's GUID. If omitted, an adhoc membership is assumed.

**start\_date** `date` *required*

When the subscription starts.

```json theme={null}
{
  "status": "Success",
  "code": 201,
  "messages": [ { "message_text": "Data created", "message_type": "success" } ],
  "subscription": {
    "id": "6d1f8b2a-4c73-4e95-b8a0-2f9e7c1d3b46",
    "reference_id": 265,
    "name": "Personal50 Plan",
    "start_date": "2026-11-10 00:00:00",
    "customer_guid": "8c34513b-61e0-4f8a-b007-af4fe9479bf4",
    "membership_id": "3f2a9c1e-7b64-4d8a-9e21-5c0d8f7a1b23",
    "currency": "AUD",
    "setup_fee": 99.00,
    "cancellation_fee": "$150.99",
    "fixed_term": false,
    "charge_remain": "Remaining Amount",
    "billing_cycle": { "amount": 48.00, "interval": 3, "length": 1, "unit": "Monthly" },
    "trial_period": false,
    "status": true,
    "link": { "href": "/api/v4/subscription/6d1f8b2a-4c73-4e95-b8a0-2f9e7c1d3b46", "rel": "self" }
  },
  "object_type": "subscription",
  "link": { "href": "/api/v4/subscription", "rel": "self" }
}
```

**id** `uuid`

The subscription ID.

**customer\_guid** `uuid`

The customer.

**membership\_id** `uuid`

The membership.

**start\_date** `string`

`YYYY-MM-DD HH:MM:SS`.

**status** `boolean`

`true` while active, `false` once cancelled. The Archive response itself returns `0`.

The remaining fields (`setup_fee`, `billing_cycle`, `trial_period`, `fixed_term`, `charge_remain`, `cancellation_fee`) are copied from the [membership](https://developers.paychoice.com.au/billing/memberships.md) at the time the subscription was created.

## Archive

`DELETE /subscription/{subscription}` cancels it. Returns the subscription with `status: 0`, or `422` with `"Subscription not found or not active."` if it doesn't exist or is already cancelled.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.