What a month costs, as a preview
const url = 'https://api.creatorain.com/v1/bill/preview?month=2026-11';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.creatorain.com/v1/bill/preview?month=2026-11' \ --header 'Authorization: Bearer <token>'Scope read. Read only: nothing is charged (charged: false). The month’s bill as the app
shows it, one line per location counted on each store’s own clock, in cents; a comped
account reads 0 throughout. total_cents is null when a line has no locked price yet.
deposit is the half of month one Checkout would ask today, for the stores that joined in
the app and still await payment (stores added through this API are not in it). Over 2000
locations the answer is 503 service_unavailable rather than a short bill.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Example
2026-11YYYY-MM. Defaults to the current UTC month.
Responses
Section titled “Responses”The preview.
A preview. Never charged. Over 2000 locations the route answers 503 instead of a short bill.
object
object
Excludes free-plan videos (TASK-2916): they are counted, never billed.
Null when the location has no locked price; 0 when comped.
Null when any line is null.
object
The half of month one Checkout would ask today.
Example
{ "object": "bill_preview", "month": "2026-11", "currency": "USD", "preview": true, "charged": false, "lines": [ { "status": "active" } ], "deposit": { "charged": false }}Headers
Section titled “Headers”This request’s id. Equal to error.request_id; quote it to support.
Example
600Requests allowed in the current minute for this workspace (600).
Requests left in the current minute for this workspace.
Seconds until the current window resets.
Parameter_invalid (with field) or invalid_json.
object
object
The request field at fault
Batch_invalid only. Every refused location, by its index in the request.
object
One of the error codes above.
Example
{ "error": { "type": "invalid_request_error", "code": "parameter_invalid", "doc_url": "https://www.creatorain.com/api/errors#scope_missing", "items": [ { "field": "locations.1.videos_per_month" } ] }}Headers
Section titled “Headers”This request’s id. Equal to error.request_id; quote it to support.
Invalid_key, test_key_on_live or live_key_on_sandbox.
object
object
The request field at fault
Batch_invalid only. Every refused location, by its index in the request.
object
One of the error codes above.
Example
{ "error": { "type": "invalid_request_error", "code": "parameter_invalid", "doc_url": "https://www.creatorain.com/api/errors#scope_missing", "items": [ { "field": "locations.1.videos_per_month" } ] }}Headers
Section titled “Headers”This request’s id. Equal to error.request_id; quote it to support.
Scope_missing or forbidden_ip.
object
object
The request field at fault
Batch_invalid only. Every refused location, by its index in the request.
object
One of the error codes above.
Example
{ "error": { "type": "invalid_request_error", "code": "parameter_invalid", "doc_url": "https://www.creatorain.com/api/errors#scope_missing", "items": [ { "field": "locations.1.videos_per_month" } ] }}Headers
Section titled “Headers”This request’s id. Equal to error.request_id; quote it to support.
Rate_limited (600 a minute per workspace, an onboarding create limit, or an address blocked after failed authentication), or slow_down (an onboarding session polled too fast).
object
object
The request field at fault
Batch_invalid only. Every refused location, by its index in the request.
object
One of the error codes above.
Example
{ "error": { "type": "invalid_request_error", "code": "parameter_invalid", "doc_url": "https://www.creatorain.com/api/errors#scope_missing", "items": [ { "field": "locations.1.videos_per_month" } ] }}Headers
Section titled “Headers”This request’s id. Equal to error.request_id; quote it to support.
Seconds to wait before retrying (at least 1).
Internal_error (500) or service_unavailable (503). The message never carries a cause.
object
object
The request field at fault
Batch_invalid only. Every refused location, by its index in the request.
object
One of the error codes above.
Example
{ "error": { "type": "invalid_request_error", "code": "parameter_invalid", "doc_url": "https://www.creatorain.com/api/errors#scope_missing", "items": [ { "field": "locations.1.videos_per_month" } ] }}Headers
Section titled “Headers”This request’s id. Equal to error.request_id; quote it to support.
Service_unavailable. The read is unavailable right now (for the bill preview, an account over 2000 locations).
object
object
The request field at fault
Batch_invalid only. Every refused location, by its index in the request.
object
One of the error codes above.
Example
{ "error": { "type": "invalid_request_error", "code": "parameter_invalid", "doc_url": "https://www.creatorain.com/api/errors#scope_missing", "items": [ { "field": "locations.1.videos_per_month" } ] }}Headers
Section titled “Headers”This request’s id. Equal to error.request_id; quote it to support.