Billing plans · Create a plan
API reference / Billing plans
Create a plan
POST/api/v1/billing_plansbilling:write
A plan customers subscribe to: what each cycle costs and how often it renews.
Body
namestringrequired
Shown to the customer. Up to 128 characters.
currency_codestringrequired
JMD or USD.
durationintegerrequired
Send the same value as billing_cycle, as the Inkress dashboards do.
flat_ratenumber
What each cycle costs.
billing_cycleinteger
How often it renews: 1 day, 2 week, 3 month, 4 year.
1234trial_periodinteger
Free trial, in days. Defaults to 0.
charge_strategyinteger
1 charges at the start of each period (the default), 2 at the end.
descriptionstring
More detail.
publicboolean
Listed on the merchant's store. Defaults to false.
statusinteger
1 active, 2 draft, 3 archived.
Headers
Authorizationheaderrequired
Bearer with your secret key, or the merchant's OAuth token.
Returns
The plan, with the uid you subscribe customers to.
| status | Meaning |
|---|---|
1 | Active. Only active plans take subscribers. |
2 | Draft. |
3 | Archived. |
Errors
401 | The key or token is missing, wrong or revoked, is for the other environment, or doesn't have the scope this endpoint needs. |
422 | name, the currency or duration is missing. |