Charge Subscription
Charges a customer for an existing subscription.
Used for auto card billing or manual mobile money checkout (per cycle).
Charge Subscription Details
| Field | Data Type | Required | Description |
|---|---|---|---|
| subscriptionId | string | Yes | The subscription ID to charge. |
| paymentMethod | string | No | card (default) or mobile_money |
| redirectUrl | string | No | Custom url for redirection |
After collecting the necessary subscription details. Make a POST request to our subscription endpoint.
Note : Before making a post request, the secret key should be specified in the header.
-H "x-api-key: your_secret_key".
{{host}}/v1/subscriptions/charge
{
"subscriptionId": "358yne17-306e-4f28-bd44-421952542549",
"paymentMethod": "mobile_money",
"redirectUrl": "https://merchant.com/thank-you"
}
{
"status": true,
"message": "Success",
"code": 200,
"data": {}
}
Behavior
- Card (auto)
- Subscription must be active (customer already authorized a card).
- Charges happen automatically.
- Amount charged = plan amount (+ fees/VAT if customer bears fees).
- Mobile Money (manual)
- Returns a checkout URL every time you call it.
- Customer must approve payment manually each cycle.
- Subscription does not need to be active for this flow.
Notes
If card subscription is inactive, you’ll get a 422 error.
Mobile money is manual (no recurring support).
Updated 4 days ago
What’s Next
