Create a subscription schedule

Creates a subscription schedule to manage future subscription changes. Schedules define phases with different pricing/plans that transition automatically. --- **Related endpoints** - `GET /subscription-schedules` — List subscription schedules - `GET /subscription-schedules/{id}` — Retrieve a subscription schedule - `POST /subscription-schedules/{id}` — Update a subscription schedule - `POST /subscription-schedules/{id}/cancel` — Cancel a subscription schedule - `POST /subscription-schedules/{id}/release` — Release a subscription schedule **Common errors** - `400 invalid_request` — malformed payload or failed validation. - `401 authentication_error` — missing, invalid, expired, or revoked credential. Codes: `authentication_failed`, `invalid_api_key`, `expired_api_key`, `api_key_revoked`, `session_invalid`, `merchant_required`. Carries a `WWW-Authenticate: Bearer` challenge. **Idempotency** Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).

POST
/subscription-schedules

Creates a subscription schedule to manage future subscription changes. Schedules define phases with different pricing/plans that transition automatically.


Related endpoints

  • GET /subscription-schedules — List subscription schedules
  • GET /subscription-schedules/{id} — Retrieve a subscription schedule
  • POST /subscription-schedules/{id} — Update a subscription schedule
  • POST /subscription-schedules/{id}/cancel — Cancel a subscription schedule
  • POST /subscription-schedules/{id}/release — Release a subscription schedule

Common errors

  • 400 invalid_request — malformed payload or failed validation.
  • 401 authentication_error — missing, invalid, expired, or revoked credential. Codes: authentication_failed, invalid_api_key, expired_api_key, api_key_revoked, session_invalid, merchant_required. Carries a WWW-Authenticate: Bearer challenge.

Idempotency

Pass an Idempotency-Key header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see the idempotency guide.

x-api-key<token>

Your RevKeen merchant API key. Create and manage keys in Dashboard → Settings → Developer. Use rk_sandbox_* for staging/test and rk_live_* for production. The same key may be sent as Authorization: Bearer <key> if that suits your HTTP client better. A missing, invalid, expired, or revoked key returns 401 with a WWW-Authenticate: Bearer challenge; a valid key without the required scope returns 403.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Parameters for creating a subscription schedule with one or more phases of pricing and billing changes.

Response Body

application/json

application/json

application/json

application/json

Stuck on an error response? Ask the RevKeen assistant to explain it.
curl -X POST "https://api.revkeen.com/v2/subscription-schedules" \
  -H "x-api-key: $REVKEEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "customer": "00000000-0000-0000-0000-000000000000",
    "subscription": "00000000-0000-0000-0000-000000000000",
    "start_date": "now",
    "phases": [
      {
        "items": null,
        "start_date": null,
        "end_date": null,
        "proration_behavior": null,
        "billing_cycle_anchor": null,
        "default_payment_method": null,
        "collection_method": null,
        "coupon": null,
        "trial_end": null,
        "metadata": null
      }
    ],
    "end_behavior": "cancel",
    "metadata": {}
  }'
{  "id": "string",  "object": "subscription_schedule",  "status": "not_started",  "customer": "0ac6320b-fa4d-4235-8d23-413a2b863bad",  "subscription": "da7489c5-d730-47b7-9958-07300ef9d3d8",  "current_phase": {    "start_date": 0,    "end_date": 0  },  "phases": [    {      "items": [        {          "price_id": "5eff5d89-979e-4e4f-aa76-6cbbbf11362c",          "quantity": 1        }      ],      "start_date": "string",      "end_date": "string",      "proration_behavior": "create_prorations",      "billing_cycle_anchor": "string",      "default_payment_method": "ef3a4459-d1f8-4959-ac0e-6345ea87aaf5",      "collection_method": "charge_automatically",      "coupon": "string",      "trial_end": "string",      "metadata": {}    }  ],  "end_behavior": "cancel",  "released_at": 0,  "released_subscription": "d4d0aecc-c2f2-4fb2-b3fc-45d324d3f58f",  "metadata": {},  "created": 0,  "livemode": true}

Cancel a subscription schedule POST

Cancels a subscription schedule. Only schedules in 'not_started' or 'active' status can be canceled. --- **Related endpoints** - `POST /subscription-schedules` — Create a subscription schedule - `GET /subscription-schedules` — List subscription schedules - `GET /subscription-schedules/{id}` — Retrieve a subscription schedule - `POST /subscription-schedules/{id}` — Update a subscription schedule - `POST /subscription-schedules/{id}/release` — Release a subscription schedule **Common errors** - `400 invalid_request` — malformed payload or failed validation. - `401 authentication_error` — missing, invalid, expired, or revoked credential. Codes: `authentication_failed`, `invalid_api_key`, `expired_api_key`, `api_key_revoked`, `session_invalid`, `merchant_required`. Carries a `WWW-Authenticate: Bearer` challenge. - `404 resource_missing` — the referenced resource does not exist or is not visible to your key. **Idempotency** Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).

Retrieve a subscription schedule GET

Retrieves a subscription schedule by its ID. --- **Related endpoints** - `POST /subscription-schedules` — Create a subscription schedule - `GET /subscription-schedules` — List subscription schedules - `POST /subscription-schedules/{id}` — Update a subscription schedule - `POST /subscription-schedules/{id}/cancel` — Cancel a subscription schedule - `POST /subscription-schedules/{id}/release` — Release a subscription schedule **Common errors** - `401 authentication_error` — missing, invalid, expired, or revoked credential. Codes: `authentication_failed`, `invalid_api_key`, `expired_api_key`, `api_key_revoked`, `session_invalid`, `merchant_required`. Carries a `WWW-Authenticate: Bearer` challenge. - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.