For the complete documentation index, see llms.txt. This page is also available as Markdown.

Subscriptions

Currently supports subscription plan creation for NGN, GHS, ZAR, and USD only.

Header
Value

Authorization

Bearer SECRET_KEY (see Authentication)

Content-Type

application/json

See Environments & Base URLs before making requests.

Create Subscription Plan

Endpoint: POST {{baseUrl}}/subscription/api

Sample request:

{
    "name": "Free trial subscription 7",
    "description": "This is a Free trial Subscription Test",
    "frequency": "monthly",
    "currency": "NGN",
    "type": "fixed",
    "amount": 1000,
    "initialAmount": "500",
    "freeTrial": true,
    "freeTrialPeriod": 5,
    "endDate": "2025-06-30",
    "notificationSettings": {
        "freeTrial": { "enabled": true, "period": 3 }
    }
}

Sample response:

Deactivate a Subscription Plan

Allows you to cancel or deactivate an active subscription plan.

Endpoint: POST {{baseUrl}}/subscription/api/:planId

Path variable
Required?

planId

Yes

Sample request:

Sample response:

Get Subscribers

Retrieves details of all subscribers on a subscription plan, with optional status filtering.

Endpoint: GET {{baseUrl}}/subscribers

Query param
Required?
Description

subscriptionPlanId

Yes

The subscription plan ID

status

No

activated, completed, or cancelled

Note: if a plan wasn't created with an endDate, none is returned for it.

Sample response:

Cancel Subscriber (merchant-facing)

Cancels a subscriber from a subscription plan, removing their access to a previously active plan. Retrieve the subscriber's ID via Get Subscribers first.

Endpoint: PATCH {{baseUrl}}/subscribers/:subscriberId/update-status

Path variable
Required?
Description

subscriberId

Yes

The subscriber's ID

Sample payload:

Sample response:

Cancel Subscription (customer-facing)

Lets you integrate an "unsubscribe"/"cancel" function into your customer-facing UI, allowing a subscriber to opt out themselves. Retrieve the subscriber's ID via Get Subscribers first.

Endpoint: POST {{baseUrl}}/subscribers/cancel-customer-initiated

Sample payload:

Sample response (API):

Sample webhook event:

Subscription FAQs

  1. How can we identify the subscription plan the user paid for, from the webhook response? The payment code returned in the webhook response matches the code on the subscription link.

  2. If a subscription charge attempt fails, will it be retried in the next billing cycle? Yes, until the number of expected payment cycles is completed, it retries in the next billing cycle.

Last updated