CreddotDocsCreddot Docs
API referenceSubscription plans

Create a subscription plan

POST
/api/v1/subscription-plans

Authorization

api-key
headerx-api-key<token>

Your API key: ck_test_... for test mode, ck_live_... for live. Send it with x-api-secret (or Authorization: Bearer ).

Header Parameters

x-api-secret?string

Recommended: API secret sent over HTTPS. You may send it as Authorization: Bearer instead. If supplied, x-timestamp and x-signature are not required.

x-timestamp?string

Legacy signed mode: Unix time in milliseconds; maximum clock skew five minutes.

x-signature?string

Legacy signed mode: HMAC-SHA256(secret, timestamp.METHOD.url.idempotencyKey.bodyHash).

x-idempotency-key*string

1–128 letters/digits or ._:-. Same key and payload replay for 24 hours; conflicting, in-flight, or expired keys return 409. Never change a key to retry an uncertain payment.

Request Body

application/json
  1. body
name*string
Lengthlength <= 120
description?string
Lengthlength <= 5000
amountMinor*string

Positive integer minor units.

currency?string
Default"NGN"
billingCycle*string
Value in"WEEKLY""MONTHLY""QUARTERLY""BIANNUALLY""ANNUALLY"
features?array<string>

What's included, shown on the subscribe page. Start with "Everything in Basic" to build on a cheaper plan.

Itemsitems <= 8
highlight?string

Optional badge on the subscribe page. Empty to remove.

Lengthlength <= 24

Response Body

application/json
  1. response
id*string
environment*string
Value in"SANDBOX""LIVE"
name*string
description*string|null
amountMinor*string
currency*string
billingCycle*string
Value in"WEEKLY""MONTHLY""QUARTERLY""BIANNUALLY""ANNUALLY"
status*string
Value in"ACTIVE""ARCHIVED"
features*array<string>

What's included (up to 8 lines).

highlight*|

Badge on the subscribe page.

subscriptionId*|

The subscription offering this plan.

position*number

Display order within the subscription.

createdAt*string
updatedAt*string
Example Request
curl -X POST 'https://api.creddot.com/api/v1/subscription-plans' \  -H 'x-idempotency-key: string' \  -H 'Content-Type: application/json' \  -d '{  "name": "Business Pro",  "amountMinor": "2000000",  "billingCycle": "MONTHLY"}'
Example Response
{  "id": "string",  "environment": "SANDBOX",  "name": "string",  "description": "string",  "amountMinor": "string",  "currency": "string",  "billingCycle": "WEEKLY",  "status": "ACTIVE",  "features": [    "string"  ],  "highlight": "string",  "subscriptionId": "string",  "position": 0,  "createdAt": "string",  "updatedAt": "string"}