Prices
Create price
Create a price, which is what a customer actually buys.
POST/v1/prices
Parameters
| Parameter | Description |
|---|---|
| intervalenumrequired | One of month, year. |
| product_idstringrequired | At most 64 characters. |
| amount_centsinteger | nulloptional | Minimum 0. |
| billing_schemeenumoptional | One of per_unit, tiered. Defaults to "per_unit". |
| currencystringoptional | Defaults to "EUR". At most 3 characters. |
| metadataobject | nulloptional | At most 50 keys. |
| payment_methodsarray of enumoptional | Defaults to ["creditcard"]. |
| refund_on_cancelenumoptional | What a cancellation refunds, against the most recent charge. 'none' (default) refunds nothing. 'full' refunds the whole charge and ends access immediately. 'prorated' refunds the unused part of the current period and also ends access. Both are still bounded by the refund window below. Metered prices must leave this at 'none': ending access mid-period would strand usage that has not been billed yet. One of none, full, prorated. Defaults to "none". |
| refund_window_initial_daysinteger | nulloptional | Between 0 and 365. |
| refund_window_renewal_daysinteger | nulloptional | Between 0 and 365. |
| tax_behaviorenumoptional | One of inclusive, exclusive, unspecified. Defaults to "unspecified". |
| tiersarray of object | nulloptional | No description in the spec. |
| tiers_modeenum | nulloptional | One of graduated, volume. |
| trial_daysintegeroptional | Defaults to 0. Between 0 and 90. |
| trial_verification_centsintegeroptional | Defaults to 100. Minimum 0. |
| unit_amount_decimalstring | nulloptional | Per-unit rate in minor units with up to 12 decimal places, as a string ('0.02' means 0.02 cents). Metered prices only, and mutually exclusive with amount_cents. Always a string: a JSON number cannot hold this value exactly. At most 32 characters. |
| usage_typeenumoptional | One of licensed, metered. Defaults to "licensed". |
Returns
Returns a PriceResponse object.
Errors
| Status | Cause |
|---|---|
| 401 | Missing or invalid API key. |
| 403 | Key is missing the prices:write scope. |
| 422 | Validation Error |
| 429 | Rate limited. Back off and retry. |
Other prices operations
- List prices GET /v1/prices
- Get price GET /v1/prices/{price_id}
- Update price POST /v1/prices/{price_id}
BillKit