Add item to subscription

Add a new line item to an existing subscription. This is used for multi-product subscriptions where items share the same billing interval. --- **Related endpoints** - `POST /subscriptions` — Create a new subscription - `GET /subscriptions` — List subscriptions - `GET /subscriptions/{id}` — Get subscription by ID - `PATCH /subscriptions/{id}` — Update subscription details - `DELETE /subscriptions/{id}` — Delete subscription - `POST /subscriptions/{id}/change-plan` — Change subscription plan - `POST /subscriptions/{id}/change-quantity` — Change subscription quantity - `POST /subscriptions/{id}/preview-renewal` — Preview subscription renewal **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).

POST
/subscriptions/{subscriptionId}/items

Add a new line item to an existing subscription. This is used for multi-product subscriptions where items share the same billing interval.


Related endpoints

  • POST /subscriptions — Create a new subscription
  • GET /subscriptions — List subscriptions
  • GET /subscriptions/{id} — Get subscription by ID
  • PATCH /subscriptions/{id} — Update subscription details
  • DELETE /subscriptions/{id} — Delete subscription
  • POST /subscriptions/{id}/change-plan — Change subscription plan
  • POST /subscriptions/{id}/change-quantity — Change subscription quantity
  • POST /subscriptions/{id}/preview-renewal — Preview subscription renewal

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.

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

Path Parameters

subscriptionId*string

Subscription UUID

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Parameters for adding a new line item to an existing subscription.

Response Body

application/json

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/subscriptions/00000000-0000-0000-0000-000000000000/items" \
  -H "x-api-key: $REVKEEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "product_id": "00000000-0000-0000-0000-000000000000",
    "price_id": "00000000-0000-0000-0000-000000000000",
    "description": "string",
    "quantity": 1,
    "currency": "USD",
    "unit_amount_minor": 2999,
    "fulfillment_type": "none",
    "metadata": {}
  }'
{  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "subscription_id": "aa11a4c2-a467-43db-b413-c4ab0f5cf627",    "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",    "price_id": "5eff5d89-979e-4e4f-aa76-6cbbbf11362c",    "description": "string",    "quantity": 1,    "currency": "string",    "unit_amount_minor": 0,    "fulfillment_type": "none",    "metadata": {      "property1": null,      "property2": null    },    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z"  }}

Get storefront integration status GET

Readiness report for the Cart/headless-storefront setup: activation, managed keys, registered origins, product-read readiness, webhook health, and availability tracking. CART_DISABLED / KEYS_MISSING / ORIGIN_MISSING / PRODUCT_READ_UNAVAILABLE are fail-level; WEBHOOK_MISSING / WEBHOOK_UNREACHABLE are warn-level. Never returns key material. --- **Related endpoints** - `GET /storefront/products` — List storefront products - `GET /storefront/products/{productId}` — Get a storefront product - `GET /storefront/origins` — List storefront origins - `POST /storefront/origins` — Register a storefront origin - `DELETE /storefront/origins/{originId}` — Remove a storefront origin **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. - `403 authorization_error` — the caller is identified but the action is denied. Codes include `insufficient_permissions`, `ip_not_allowed`, `merchant_mismatch`, and `origin_not_allowed`.

Remove item from subscription DELETE

Remove a line item from a subscription. Cannot remove the last item - cancel the subscription instead. --- **Related endpoints** - `POST /subscriptions` — Create a new subscription - `GET /subscriptions` — List subscriptions - `GET /subscriptions/{id}` — Get subscription by ID - `PATCH /subscriptions/{id}` — Update subscription details - `DELETE /subscriptions/{id}` — Delete subscription - `POST /subscriptions/{id}/change-plan` — Change subscription plan - `POST /subscriptions/{id}/change-quantity` — Change subscription quantity - `POST /subscriptions/{id}/preview-renewal` — Preview subscription renewal **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).