Subscribe a customer to a plan
create_subscriptionSubscribe a customer to a plan, issuing the first invoice at the start date and later invoices at each period's end, with payment via hosted invoice or dedicated account. No automatic debit.
Instructions
Subscribe a customer to a plan.
Subscribe a customer to a plan. The first period’s invoice is issued at start_date (default now) and each later one at the end of the period, due after days_until_due days.
Nothing is ever debited automatically; Nigerian bank transfers are push payments. With collection_method: invoice the customer pays each period through its hosted invoice page. With dedicated_account, the customer also gets a dedicated virtual account and an exact transfer into it pays the open invoice.
A customer can have one live subscription per plan (409 subscription_exists).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan | Yes | Plan (plan_…) | |
| split | No | Split rule (spl_…) applied to each payment | |
| customer | Yes | Customer (cus_…) | |
| metadata | No | ||
| start_date | No | Defaults to now; the first invoice is issued at this time | |
| days_until_due | No | ||
| idempotency_key | No | Optional. A unique key for this request; retrying with the same key returns the original result instead of acting twice. One is generated if omitted. | |
| collection_method | Yes | invoice: each period is paid through its hosted invoice page. dedicated_account: an exact transfer into the customer's dedicated account also pays it. Nothing is ever debited automatically. |