v1

latestOpenAPI 3.0.32026-07-248257161.1 KB
Subscription Plan

Create a subscription plan.

This endpoint enables the creation of a subscription plan for recurring billing. Once a plan is created, customers can subscribe to it.

post/subscription-plans

Headers

X-Amzn-Trace-Idstring

HTTP request identifier allow to trace individual request sent from client to service.

Request body

namestring

Optional. commercial name of the plan.

referencestring

Optional. subscription plan reference.

amountnumber double required

recurrent amount to charge for the plan

currencystring required

currency associated to the amount.

nbrInstallmentsinteger

Required. number of installments. If there is no limit, ignore it,

installmentIntervalDaysinteger

Number of days between two installments. Defaults to 30 if not specified.

customerMessagestring

Message intended to customer for installment payment. The message is sent to the customer with the payment link at every occurence. Do no add customer name or grettings in the message.

Example request

{
  "name": "starter_plan_CF34509",
  "reference": "starter_plan_CF34509",
  "amount": 10000,
  "currency": "XOF",
  "nbrInstallments": 12,
  "installmentIntervalDays": 7,
  "customerMessage": "Please on the link below to pay your installement from mycompany? Ref order is Order_XFG567"
}

Response

The subscription plan is created successfully

idstring uuid

Unique Identifier of the Subscription Plan Response object

namestring

Optional. commercial name of the plan.

referencestring

Optional. subscription plan reference.

amountnumber double required

recurrent amount to charge for the plan

currencystring required

currency associated to the amount.

nbrInstallmentsinteger

Required. number of installments. If there is no limit, ignore it,

installmentIntervalDaysinteger

Number of days between two installments. Defaults to 30 if not specified.

customerMessagestring

Message intended to customer for installment payment. The message is sent to the customer with the payment link at every occurence. Do no add customer name or grettings in the message.

createdAtstring

The merchant entity registration timestamp in our platform in ISO 8601 (YYYY-mm-dd HH:mm:ss,SSSS)

updatedAtstring

updated timestamp in our platform in ISO 8601 (YYYY-mm-dd HH:mm:ss,SSSS)

Example response

{
  "id": "fbd2053b-638d-4133-957e-3caf63e6b79c",
  "name": "starter_plan_CF34509",
  "reference": "starter_plan_CF34509",
  "amount": 10000,
  "currency": "XOF",
  "nbrInstallments": 12,
  "installmentIntervalDays": 7,
  "customerMessage": "Please on the link below to pay your installement from mycompany? Ref order is Order_XFG567",
  "createdAt": "2022-03-29 10:00:00,000"
}