cimplify
API reference

Subscriptions

Read and manage the authenticated customer’s subscriptions. All endpoints require an active customer session (cookie set by `/auth/verify-otp`).

GET /api/v1/subscriptions

List subscriptions belonging to the authenticated customer (max 100).

Request

cURL
curl https://api.cimplify.io/api/v1/subscriptions \
  -H "X-Public-Key: pk_test_your_publishable_key"

Response

{
  "success": true,
  "data": [
    {
      "id": "sub_01H…",
      "customer_id": "cus_01H…",
      "status": "active",
      "billing_plan_id": "bp_monthly",
      "current_period_start": "2026-05-01T00:00:00Z",
      "current_period_end": "2026-06-01T00:00:00Z",
      "cancel_at_period_end": false,
      "amount": "29.99",
      "currency": "GHS"
    }
  ]
}

GET /api/v1/subscriptions/{subscription_id}

Subscription detail with the underlying billing plan, items, and the next renewal preview.

cURL
curl https://api.cimplify.io/api/v1/subscriptions/sub_01H… \
  -H "X-Public-Key: pk_test_your_publishable_key"

Response

{
  "success": true,
  "data": {
    "subscription": { "id": "sub_01H…", "status": "active", "amount": "29.99" },
    "plan": { "id": "bp_monthly", "name": "Monthly", "interval": "month" },
    "items": [
      { "product_id": "prod_box", "quantity": 1, "unit_price": "29.99" }
    ],
    "next_invoice": {
      "scheduled_at": "2026-06-01T00:00:00Z",
      "amount_due": "29.99"
    }
  }
}

POST /api/v1/subscriptions/{subscription_id}/cancel

Cancel the subscription at the end of the current period. Optional reason in the body (max 500 chars). Returns an empty success envelope.

cURL
curl -X POST https://api.cimplify.io/api/v1/subscriptions/sub_01H…/cancel \
  -H "X-Public-Key: pk_test_your_publishable_key" \
  -H "Content-Type: application/json" \
  -d '{"reason": "switching plans"}'

POST /api/v1/subscriptions/{subscription_id}/pause

Pause renewals indefinitely. The current period continues until its end.

cURL
curl -X POST https://api.cimplify.io/api/v1/subscriptions/sub_01H…/pause \
  -H "X-Public-Key: pk_test_your_publishable_key"

POST /api/v1/subscriptions/{subscription_id}/resume

Resume a paused subscription on its existing schedule.

cURL
curl -X POST https://api.cimplify.io/api/v1/subscriptions/sub_01H…/resume \
  -H "X-Public-Key: pk_test_your_publishable_key"

POST /api/v1/subscriptions/{subscription_id}/skip

Skip the next renewal cycle. Subsequent renewals carry on as scheduled.

cURL
curl -X POST https://api.cimplify.io/api/v1/subscriptions/sub_01H…/skip \
  -H "X-Public-Key: pk_test_your_publishable_key" \
  -H "Idempotency-Key: 5b1f9d80-2c70-4f2c-bf61-a0e6fa6b02a1"

Errors

  • 401 UNAUTHORIZED: no customer session.

  • 404 NOT_FOUND: subscription doesn’t exist or belongs to a different customer (returned in both cases to avoid existence leaks).

  • Auth Get a customer session via OTP.

  • Orders Each renewal materialises a new order.

On this page