Creates a subscription. With charge_automatically, it charges the customer's saved card; a customer with none is incomplete until they add one, and nothing is billed meanwhile.
Endpoint
Request body
| Name | Type | Required | Description |
|---|---|---|---|
customer | string | Required | Who it bills, cust_.... |
name | string | Required | What the customer sees. |
currency | string | Required | usd. |
line_items | array | Required | Up to 20 recurring prices of the same interval, each with a quantity. |
collection | enum | Required | charge_automatically or send_invoice. |
days_until_due | integer | Optional | For send_invoice: 0, 7, 14 or 30. |
start_date | date | Optional | Today, or any day within a year. Default: today. |
trial_days | integer | Optional | Up to 365. |
end_date | date | Optional | When it ends on its own. |
tax_rate_bps | integer | Optional | In basis points, added to each period. |
description | string | Optional | On invoices and receipts. |