Subscriptions
You can create subscription plans with customizable billing frequencies (daily, weekly, monthly, etc.) and amounts using just a single endpoint.
Content-type
Set value to application/json
Post a request to the URL below, where the base URL is determined by the environment you are in.
Create Subscription Plan
POST: {{baseUrl}}/subscription/api
Sample code:
{
"name": "Free trial subscription 7",
"description": "This is a Free trial Subscription Test",
"frequency": "monthly",
"currency": "NGN",
"type": "fixed",
"amount": 1000,
"initialAmount": "500", //to set first time subscriber amount
"freeTrial": true, //to enable free trial period
"freeTrialPeriod": 5, //to set free trial period
"endDate": "2025-06-30", //this is optional
"notificationSettings": {
"freeTrial": {
"enabled": true,
"period": 3
}
}
}Sample response:
Deactivate a Subscription Plan
POST: {{baseUrl}}/subscription/api/:planId
planId
Yes
Sample Code:
Sample Response:
Get Subscribers
GET: {{baseUrl}}/subscribers
subscriptionPlanId
Yes
the subscription plan id
status
No
should be activated, 'completed', or 'cancelled',
Sample Response:
Cancel Subscriber [merchant-facing]
PATCH : {{baseUrl}}/subscribers/:subscriberId/update-status
subscriberId
Yes
the subscriber's id
Sample Payload
Sample Response
Cancel subscription [customer-facing]
POST: {{baseUrl}}/subscribers/cancel-customer-initiated
Sample Payload
Sample Response
Subscription FAQs
How can we identify the subscription plan the user paid for - from the webhook response? ANS: The payment code returned in the webhook response would be the same as the code on the subscription link.
If a subscription charge attempt fails, will it be retried in the next billing cycle? ANS: Yes, until the number of expected payment cycles is completed— we retry in the next billing cycle.
Last updated