ZeroPointPayments

API reference

Billing

Common headers

Every endpoint on this page takes these headers.

NameDescription
ZeroPoint-Accountheader, string or null

Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.

Stripe-Accountheader, string or null

Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).

Common responses

Every endpoint on this page can answer with these.

StatusDescriptionBody
200

Successful Response

object
400

Invalid request. A parameter, header or body field failed validation (code parameter_invalid, with param naming it), or another invalid_request code this operation's description lists. Fix the request; do not retry it unchanged.

ErrorResponse
401

The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.

ErrorResponse
403

The key is valid but may not do this: platform_suspended, insufficient_scope, live_mode_unavailable, or a permission code this operation's description lists (for example processor_currency_unsupported).

ErrorResponse
404

No such resource for this platform (resource_missing), or another not_found code this operation's description lists.

ErrorResponse
429

Too many requests (rate_limited). Wait for the Retry-After header, then retry.

ErrorResponse

Retrieve billing settings

GET/v1/billing_settings

Reads one merchant's billing settings: the retry ladder (retry_offsets_s, seconds after the first decline), final_action (cancel or unpaid), upcoming_days, the time zone, the portal switches and the operator-set values. Read only. Use it to tell which declined attempt is the last one: the last offset in retry_offsets_s is the final retry, and its failure runs final_action.

Arguments: merchant_id (mch_...; optional with a ZeroPoint-Account or Stripe-Account header, or when the platform has one merchant in this mode).

Returns {object: billing_settings, merchant_id, livemode, timezone, retry_offsets_s, final_action, upcoming_days, portal, min_retry_gap_s and the operator-set fields, renewals_paused}. customer_emails is reserved and has no effect: ZeroPoint sends no email to customers.

Errors: parameter_invalid (400); resource_missing (404); billing_unavailable (400).

Next step: POST /v1/billing_settings to change the builder fields.

Parameters

NameDescription
merchant_idquery, string or null

The merchant (mch_...). Optional when a ZeroPoint-Account (or Stripe-Account) header names it, or when the platform has one merchant in this mode.

Responses

Example

Shell
curl -X GET "https://api.zeropointapp.com/v1/billing_settings" \
  -H "Authorization: Bearer zp_test_..."

Update billing settings

POST/v1/billing_settings

Sets a merchant's builder billing settings. Omitted fields stay as they are; a time zone change applies to subscriptions created afterwards.

Arguments: merchant_id (optional with a ZeroPoint-Account or Stripe-Account header, or one merchant), timezone, retry_offsets_s, final_action, upcoming_days, portal, min_retry_gap_s, subscription_guard.

Errors: idempotency_key_required, parameter_invalid (including any operator-only field), resource_missing, billing_unavailable.

Parameters

NameDescription
Idempotency-Keyheader, string or null

Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request.

Request body

FieldDescription
merchant_idstring or null

The merchant (mch_...). Optional when a ZeroPoint-Account (or Stripe-Account) header names it, or when the platform has one merchant in this mode.

timezonestring or null

IANA time zone for subscriptions created from now on, e.g. UTC.

retry_offsets_sarray of integer or null

Seconds after the first failed renewal to retry: 1 to 8, strictly increasing, each 3600 to 5184000 (60 days), the last shorter than the shortest billing interval in use: in this version that is under 28 days for every price, monthly or yearly. Retries are never closer than min_retry_gap_s (1 day by default). Within the merchant's limit (the default ladder's 3 retries and 1-day shortest wait unless ZeroPoint set another), in either direction.

final_actionstring or null

cancel or unpaid.

upcoming_daysinteger or null

Days before renewal for invoice.upcoming, 0 to 30.

portalobject of boolean or null

Portal switches: cancel, update_card, invoice_history, keep_plan (cancel a scheduled downgrade; unset, it follows cancel).

min_retry_gap_sinteger or null

Minimum seconds between two retries: at least the merchant's limit (86400 unless ZeroPoint set more), at most 604800.

subscription_guardstring or null

Stops a customer buying the same thing twice at this merchant. A new subscription is refused (409 subscription_exists) while the same customer has a live one (active, past_due or unpaid): price, to the same price; product (the default), to any price of the same product; customer, to anything (one subscription per customer: they change plans instead); off, never. Matched by your own identity only: the customer, client_reference_id or customer_email you sent, never an email typed on the hosted page; when not off, a subscription checkout must send one. A plan change is never blocked by the subscription being changed; under price or product, a change onto a price or product another live subscription of the customer holds is refused. Other merchants are never compared. Existing duplicates are left alone; a scheduled change that would make one when it falls due is canceled (the update event's data.reason says why). A change applies to checkout sessions created afterwards.

One of: "off", "price", "product", "customer"

Responses

StatusDescriptionBody
409

Conflict with the current state: idempotency_in_progress (another request with this Idempotency-Key is still running; wait for Retry-After), or a conflict code this operation's description lists.

ErrorResponse
413

The request body is over 1048576 bytes, its Content-Length is not a number, or it is sent chunked (code payload_too_large). Every write method is checked, before routing. Send a smaller body with a Content-Length.

ErrorResponse
422

This Idempotency-Key was already used with a different request body (code idempotency_key_reused). Send the original body to retry, or a new key for a new request.

ErrorResponse

Example

Shell
curl -X POST "https://api.zeropointapp.com/v1/billing_settings" \
  -H "Authorization: Bearer zp_test_..." \
  -H "Idempotency-Key: <Idempotency-Key>" \
  -H "Content-Type: application/json" \
  -d '{}'