{"openapi":"3.1.0","info":{"title":"ZeroPoint Payments API","description":"Payments orchestration for software vendors, powered by GoDaddy Payments. Authenticate with `Authorization: Bearer zp_test_...`. Every object carries object, id, created, livemode. Errors use one envelope with a stable `code` (the ErrorResponse schema); each operation lists the error statuses it answers. Any operation can also answer 500 internal_error with the same envelope (retry with the same Idempotency-Key and quote request_id); an unknown path answers 404 route_not_found and a wrong method 405 method_not_allowed. Start at GET /v1/docs/getting-started. This document does not list itself: GET /openapi.json (this file) and GET /docs (Swagger UI) are served by the framework.","version":"0.9.0"},"servers":[{"url":"https://api.zeropointapp.com"}],"paths":{"/health":{"get":{"tags":["meta"],"summary":"Service health","description":"Reports whether the database answers, how many docs are loaded, and whether reconciliation's cursors are moving. No auth. Used by the Fly health check.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}}}},"/health/pilot":{"get":{"tags":["meta"],"summary":"Pilot operational health","description":"Unauthenticated, read-only aggregate operational signal. Returns 503 when pilot attention is required; contains only fixed reason codes, numeric counts and whether an alert channel is enabled (which never changes the status). Never-successful loops and missing backup configuration/markers have 180 seconds of startup grace. Does not change the existing /health liveness contract.","operationId":"pilot_health_health_pilot_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PilotHealth"}}}},"503":{"description":"Pilot attention required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PilotHealth"}}}}}}},"/v1/docs":{"get":{"tags":["docs"],"summary":"List docs","description":"Lists every guide and concept in reading order. No auth. Returns a list object whose data items are doc summaries (slug, title, summary, tags). Next step: GET /v1/docs/{slug} for the full text.","operationId":"docs_index_v1_docs_get","parameters":[{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocList"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/docs/{slug}":{"get":{"tags":["docs"],"summary":"Read one doc","description":"Returns one document as JSON with its markdown body. No auth. Errors: resource_missing when the slug does not exist (GET /v1/docs lists valid slugs).","operationId":"doc_detail_v1_docs__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocDetail"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/llms.txt":{"get":{"tags":["docs"],"summary":"Agent-readable docs index","description":"Plain-text index of every doc with absolute links, in the llms.txt convention. No auth.","operationId":"llms_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/v1/me":{"get":{"tags":["platform"],"summary":"Who am I","description":"Returns the platform that owns the API key you sent. Use it first to confirm your key works and to learn whether you are in test mode (livemode=false). Requires Authorization: Bearer. Errors: api_key_missing, api_key_malformed, api_key_invalid. Next step: read GET /v1/docs/getting-started.","operationId":"me_v1_me_get","parameters":[{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/webhooks":{"post":{"tags":["webhooks"],"summary":"Register a webhook endpoint","description":"Registers an HTTPS URL that receives signed event POSTs; an empty event_types means every payment event, and billing events (checkout, invoice, subscription, customer, payment method) are sent only to endpoints that list them or use [\"*\"]. Use it once per environment before you rely on events. Arguments: url (public https), event_types (up to 50; [\"*\"] alone or a list of: checkout.session.completed, checkout.session.expired, customer.created, customer.deleted, customer.subscription.created, customer.subscription.deleted, customer.subscription.updated, customer.updated, invoice.marked_uncollectible, invoice.paid, invoice.payment_failed, invoice.payment_succeeded, invoice.upcoming, invoice.voided, merchant.state_changed, payment.canceled, payment.expired, payment.failed, payment.needs_attention, payment.processing, payment.reversed_late, payment.succeeded, payment_method.attached, payment_method.detached, refund.failed, refund.succeeded, terminal.offline, terminal.online, webhook.test), description. Returns the webhook_endpoint object including `secret` exactly once; store it and verify every delivery with it (see the webhooks guide). Errors: idempotency_key_required, webhook_url_invalid (http, localhost, or a private address), parameter_invalid (unknown event type, or [\"*\"] mixed with types). Next step: POST /v1/webhooks/{id}/test to receive a signed webhook.test event and verify your signature code.","operationId":"create_webhook_v1_webhooks_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request.","title":"Idempotency-Key"},"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreated"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"get":{"tags":["webhooks"],"summary":"List webhook endpoints","description":"Lists your endpoints, newest first. Use it to find an id. Arguments: limit, cursor. Returns a list of webhook_endpoint objects (never the secret). Errors: authentication errors only. Next step: GET /v1/webhooks/{id}/deliveries to debug delivery.","operationId":"list_webhooks_v1_webhooks_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page, default 20.","default":20,"title":"Limit"},"description":"Items per page, default 20."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"next_cursor from the previous page.","title":"Cursor"},"description":"next_cursor from the previous page."},{"name":"starting_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both.","title":"Starting After"},"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both."},{"name":"ending_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after.","title":"Ending Before"},"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOut_WebhookEndpointOut_"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/webhooks/{webhook_id}":{"get":{"tags":["webhooks"],"summary":"Retrieve a webhook endpoint","description":"Returns one endpoint. Arguments: webhook_id (whk_...). Returns the webhook_endpoint object without the secret. Errors: resource_missing. Next step: PATCH to change it.","operationId":"get_webhook_v1_webhooks__webhook_id__get","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"patch":{"tags":["webhooks"],"summary":"Update a webhook endpoint","description":"Changes url, event_types, description, or active. Use active=false to pause deliveries without losing the secret. Arguments: any subset of those fields. Returns the updated webhook_endpoint. Errors: resource_missing, webhook_url_invalid, parameter_invalid. Next step: POST /v1/webhooks/{id}/test.","operationId":"update_webhook_v1_webhooks__webhook_id__patch","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"delete":{"tags":["webhooks"],"summary":"Delete a webhook endpoint","description":"Deletes the endpoint; queued deliveries to it are marked dead. Returns {object, id, deleted:true}. Errors: resource_missing. Next step: register a new one.","operationId":"delete_webhook_v1_webhooks__webhook_id__delete","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/webhooks/{webhook_id}/rotate-secret":{"post":{"tags":["webhooks"],"summary":"Rotate the signing secret","description":"Issues a new secret. Deliveries are signed with both the new and the old secret (two v1= values) for 24 hours so you can roll your receivers. Arguments: webhook_id. Returns the webhook_endpoint with the new `secret` (shown once). Errors: idempotency_key_required, resource_missing. Next step: update your receiver, then POST /v1/webhooks/{id}/test.","operationId":"rotate_webhook_secret_v1_webhooks__webhook_id__rotate_secret_post","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request.","title":"Idempotency-Key"},"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreated"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/webhooks/{webhook_id}/test":{"post":{"tags":["webhooks"],"summary":"Send a signed test event","description":"Delivers one webhook.test event to this endpoint right now, signed like a real one, and waits up to 5 seconds for your response. Use it to prove your signature verification. Arguments: webhook_id. Returns the webhook_delivery with status delivered (2xx) or failed (response_status and last_error say why). Errors: resource_missing, rate_limited (429 with Retry-After, nothing sent: another test or verify run of yours is still in progress, the service is busy with other runs, or you have used the budget of 10 test and verify runs per endpoint, 30 per account, or 30 seconds of waiting on your receiver, in any 10 minutes), sandbox_daily_limit_exceeded (409 with Retry-After, test mode: today's test-event ceiling is reached). Next step: fix your receiver until status is delivered, then run a payment and watch payment.* events. Sample billing events, test mode only: send a body with event_type (a billing type such as invoice.paid) and merchant_id (a test merchant of your platform) to get one sample of that type instead, marked \"sample\": true beside data.object, built from the documented payload with ids that answer 404, to this endpoint only. The endpoint must subscribe to the type (list it or use [\"*\"]): billing events are opt-in. A sample proves your parser, never your business effects; use the real sandbox flows for those. Same budget as webhook.test. Extra errors with event_type: live_mode_unavailable (403, live key), parameter_invalid (400: not a billing type, merchant_id missing, or the endpoint does not subscribe to the type), resource_missing (merchant_id not a test merchant of yours). Any body without event_type is ignored and sends webhook.test, as it always has.","operationId":"test_webhook_v1_webhooks__webhook_id__test_post","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"event_type":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"description":"Optional, test mode only. A billing event type: send one shape-only sample of it instead of webhook.test. The endpoint must subscribe to the type.","examples":["invoice.paid"],"title":"Event Type"},"merchant_id":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"description":"A test merchant of your platform. Required with event_type.","title":"Merchant Id"}},"title":"WebhookTestRequest","type":"object"}}}}}},"/v1/webhooks/{webhook_id}/verify":{"post":{"tags":["webhooks"],"summary":"Score a webhook receiver","description":"Runs the webhook scorecard against this endpoint right now: a signed webhook.test event (must get a 2xx within 5 seconds), the same event id again (must still be accepted: dedupe by ZeroPoint-Event-Id and answer 2xx), and one delivery with a bad signature (must be refused with a non-2xx). Use it after /test succeeds and before you rely on events. Arguments: webhook_id. Returns a webhook_scorecard with passed and one check per line; delivery_id and replay_delivery_id point at the two deliveries it made (the bad-signature probe is not a delivery). Each send gets 5 seconds, and when the first one fails or is not fast the run stops there: the other two checks say not run and replay_delivery_id is null. Errors: resource_missing, rate_limited (429 with Retry-After, nothing sent: another test or verify run of yours is still in progress, the service is busy with other runs, or you have used the budget of 10 test and verify runs per endpoint, 30 per account, or 30 seconds of waiting on your receiver, in any 10 minutes; one verify is one run), sandbox_daily_limit_exceeded (409 with Retry-After, test mode: today's test-event ceiling is reached). Next step: fix the failing check and run it again. The hosted /sandbox/webhook-sink passes the first three checks only, because it never verifies signatures.","operationId":"verify_webhook_v1_webhooks__webhook_id__verify_post","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookScorecardOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/webhooks/{webhook_id}/deliveries":{"get":{"tags":["webhooks"],"summary":"List deliveries to an endpoint","description":"Lists delivery attempts to this endpoint, newest first, with status, response_status, and last_error. Use it to debug why a webhook did not arrive. Arguments: webhook_id, limit, cursor. Returns a list of webhook_delivery objects. Errors: resource_missing. Next step: POST /v1/deliveries/{id}/redeliver after fixing your receiver.","operationId":"list_deliveries_v1_webhooks__webhook_id__deliveries_get","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page, default 20.","default":20,"title":"Limit"},"description":"Items per page, default 20."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"next_cursor from the previous page.","title":"Cursor"},"description":"next_cursor from the previous page."},{"name":"starting_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both.","title":"Starting After"},"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both."},{"name":"ending_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after.","title":"Ending Before"},"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOut_DeliveryOut_"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/deliveries/{delivery_id}":{"get":{"tags":["webhooks"],"summary":"Retrieve a delivery","description":"Returns one delivery attempt record. Arguments: delivery_id (dlv_...). Returns a webhook_delivery. Errors: resource_missing. Next step: redeliver if it failed.","operationId":"get_delivery_v1_deliveries__delivery_id__get","parameters":[{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","title":"Delivery Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/deliveries/{delivery_id}/redeliver":{"post":{"tags":["webhooks"],"summary":"Redeliver an event","description":"Queues a fresh delivery of the same event to the same endpoint; it is sent within a few seconds. Use it after fixing a receiver bug. Arguments: delivery_id. Returns the new webhook_delivery (status pending). Errors: resource_missing, rate_limited (429 with Retry-After, nothing queued: the endpoint already has 10 or more deliveries waiting for their first attempt; Retry-After is the rest of the pause when the endpoint is paused after repeated failures). Next step: GET /v1/deliveries/{new_id} to confirm status delivered.","operationId":"redeliver_v1_deliveries__delivery_id__redeliver_post","parameters":[{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","title":"Delivery Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/events":{"get":{"tags":["webhooks"],"summary":"List events","description":"Lists the event ledger in id order, newest first. Use it to reconcile without webhooks or to see what fired. Arguments: merchant_id, type, types (repeatable, up to 50: events of any of these types, e.g. types=invoice.paid&types=customer.created; not with type), since (unix seconds), limit, cursor. Returns a list of event objects whose data.object is the full object at the time. Errors: parameter_invalid. Next step: GET /v1/events/{id} for one event.","operationId":"list_events_v1_events_get","parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Merchant Id"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Type"}},{"name":"types","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","maxLength":40},"maxItems":50},{"type":"null"}],"description":"Repeatable. Events of any of these types. Not with type.","title":"Types"},"description":"Repeatable. Events of any of these types. Not with type."},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":4102444800,"minimum":0},{"type":"null"}],"description":"Unix seconds; events at or after. Up to 2100-01-01.","title":"Since"},"description":"Unix seconds; events at or after. Up to 2100-01-01."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page, default 20.","default":20,"title":"Limit"},"description":"Items per page, default 20."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"next_cursor from the previous page.","title":"Cursor"},"description":"next_cursor from the previous page."},{"name":"starting_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both.","title":"Starting After"},"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both."},{"name":"ending_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after.","title":"Ending Before"},"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOut_EventOut_"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/events/{event_id}":{"get":{"tags":["webhooks"],"summary":"Retrieve an event","description":"Returns one event with data.object. Arguments: event_id (evt_...). Errors: resource_missing. Next step: act on data.object.","operationId":"get_event_v1_events__event_id__get","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/merchants":{"post":{"tags":["merchants"],"summary":"Create a merchant","description":"Creates a merchant that can take payments through your software. In test mode it is active instantly and bound to the shared sandbox processor account when one is configured. In live mode it starts as invited: send its owner through the link from POST /v1/merchants/{id}/connect to bind their own processor account. Use it once per business you onboard. Arguments: display_name, metadata. Returns the merchant object. Errors: idempotency_key_required, parameter_invalid. Next step: in test mode, POST /v1/merchants/{id}/terminals with {\"kind\":\"simulated\"} to get a terminal you can drive without hardware; in live mode, POST /v1/merchants/{id}/connect.","operationId":"create_v1_merchants_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request.","title":"Idempotency-Key"},"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"get":{"tags":["merchants"],"summary":"List merchants","description":"Lists your merchants, newest first. Arguments: limit, cursor. Returns a list of merchant objects. Errors: authentication errors only. Next step: GET /v1/merchants/{id}/terminals.","operationId":"list_merchants_v1_merchants_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page, default 20.","default":20,"title":"Limit"},"description":"Items per page, default 20."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"next_cursor from the previous page.","title":"Cursor"},"description":"next_cursor from the previous page."},{"name":"starting_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both.","title":"Starting After"},"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both."},{"name":"ending_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after.","title":"Ending Before"},"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOut_MerchantOut_"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/merchants/{merchant_id}":{"get":{"tags":["merchants"],"summary":"Retrieve a merchant","description":"Returns one merchant. Arguments: merchant_id (mch_...). Returns the merchant object. Errors: resource_missing when the id is unknown or belongs to another platform. Next step: create a terminal or a payment for it.","operationId":"get_v1_merchants__merchant_id__get","parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/merchants/{merchant_id}/connect":{"post":{"tags":["merchants"],"summary":"Get a link for the merchant to connect their processor account","description":"Returns a one-time link. Send the merchant to it in a browser: it opens a ZeroPoint consent page that names your platform and what the merchant is granting (taking payments and issuing refunds on their account). When they press Continue they sign in to their own processor account (the one they opened through ZeroPoint's referral link) and approve the connection, and ZeroPoint binds this merchant to that account. The merchant must finish in the browser that showed the consent page. From then on the merchant's payments run on its own account. Poll GET /v1/merchants/{id} for processor_connected, or listen for merchant.state_changed. Works for live merchants (required before any payment; a real payments account only) and for sandbox merchants that want their own processor test account instead of the shared one (a processor test account only). Arguments: merchant_id, return_url (optional). Returns a processor_connection object with connect_url and expires_at. Errors: resource_missing, return_url_invalid, connect_unavailable (this deployment has no processor application credentials). A refused connection reaches return_url as status=failed with reason processor_mode_mismatch, processor_already_connected or connect_consent_required. A connection whose account is not a US, USD account succeeds but its card payments are held: return_url gets status=connected with hold=processor_currency_unsupported and the merchant object says card_payments_held. Next step: open connect_url as the merchant; then GET /v1/merchants/{id}.","operationId":"connect_processor_v1_merchants__merchant_id__connect_post","parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ConnectCreate"},{"type":"null"}],"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessorConnectionOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"503":{"description":"No processor is available for this merchant or deployment (processor_not_connected, sandbox_processor_unconfigured, connect_unavailable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/merchants/{merchant_id}/collect-config":{"get":{"tags":["merchants"],"summary":"Get the keyed-entry (Collect) configuration","description":"Returns what your web page needs for keyed entry on this merchant: form_url, the ZeroPoint-hosted card form to embed in an iframe (it posts a one-time nonce to your page with window.postMessage), a stand-alone sandbox form URL, and test cards. Card numbers never touch your server or your page. Arguments: merchant_id. Returns a collect_config object. Errors: resource_missing; processor_currency_unsupported (403) when the merchant's connected account is not a US, USD account (card payments are held and no card form is served); processor_mode_mismatch (403); sandbox_processor_unconfigured (503) when this sandbox has no processor account. Next step: get a nonce in the browser, then POST /v1/payments with method keyed (see the accept-a-keyed-payment guide).","operationId":"get_collect_config_v1_merchants__merchant_id__collect_config_get","parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectConfigOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"502":{"description":"The payments network failed or gave no decision (processor_unavailable). Nothing was changed by this request; retry it later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"No processor is available for this merchant or deployment (processor_not_connected, sandbox_processor_unconfigured, connect_unavailable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/merchants/{merchant_id}/terminals":{"get":{"tags":["terminals"],"summary":"List a merchant's terminals","description":"Lists physical and simulated terminals registered to the merchant, newest first. Arguments: merchant_id, limit, cursor. Returns a list of terminal objects. Errors: resource_missing. Next step: POST /v1/payments with method terminal and a terminal_id.","operationId":"list_terminals_v1_merchants__merchant_id__terminals_get","parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page, default 20.","default":20,"title":"Limit"},"description":"Items per page, default 20."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"next_cursor from the previous page.","title":"Cursor"},"description":"next_cursor from the previous page."},{"name":"starting_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both.","title":"Starting After"},"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both."},{"name":"ending_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after.","title":"Ending Before"},"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOut_TerminalOut_"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"post":{"tags":["terminals"],"summary":"Create a simulated terminal or register a physical one","description":"kind=simulated creates a terminal you drive from the API with no hardware (start here). kind=physical registers a device returned by /terminals/discover. Arguments: kind, label, sim_behavior + sim_delay_s (simulated), device_id + serial + model (physical). Returns the terminal object with status online. Errors: idempotency_key_required, parameter_invalid, resource_missing, device_not_found, terminal_already_registered, processor_currency_unsupported (403; card payments are held for this merchant), sandbox_processor_unconfigured (physical, 503), physical_terminal_unavailable (400, test mode reserves physical terminals; use simulated). Next step: POST /v1/payments with method terminal.","operationId":"create_terminal_v1_merchants__merchant_id__terminals_post","parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request.","title":"Idempotency-Key"},"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"502":{"description":"The payments network failed or gave no decision (processor_unavailable). The outcome may be unknown: a 5xx releases the Idempotency-Key, so retry with the same key and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"No processor is available for this merchant or deployment (processor_not_connected, sandbox_processor_unconfigured, connect_unavailable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/merchants/{merchant_id}/terminals/discover":{"post":{"tags":["terminals"],"summary":"Discover physical devices on the merchant's processor account","description":"Asks the processor which activated card readers belong to this merchant. Use it before registering a physical terminal. Arguments: merchant_id. Returns a list of discovered_device objects with device_id, serial, store, and whether each is already registered. Errors: resource_missing, processor_currency_unsupported (403; card payments are held for this merchant), sandbox_processor_unconfigured (503), processor_unavailable (502). Next step: POST /v1/merchants/{id}/terminals with kind physical and one device_id.","operationId":"discover_terminals_v1_merchants__merchant_id__terminals_discover_post","parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOut_DiscoveredDeviceOut_"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"502":{"description":"The payments network failed or gave no decision (processor_unavailable). Nothing was changed by this request; retry it later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"No processor is available for this merchant or deployment (processor_not_connected, sandbox_processor_unconfigured, connect_unavailable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/terminals/{terminal_id}":{"get":{"tags":["terminals"],"summary":"Retrieve a terminal","description":"Returns one terminal. Arguments: terminal_id (term_...). Returns the terminal object. Errors: resource_missing. Next step: POST /v1/terminals/{id}/ping to refresh status.","operationId":"get_terminal_v1_terminals__terminal_id__get","parameters":[{"name":"terminal_id","in":"path","required":true,"schema":{"type":"string","title":"Terminal Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"patch":{"tags":["terminals"],"summary":"Update a terminal","description":"Changes label, or sim_behavior and sim_delay_s on a simulated terminal. Use auto_decline to test your failure handling without calling simulate. Arguments: any subset. Returns the terminal object. Errors: resource_missing, parameter_invalid (sim fields on a physical terminal, unknown behavior). Next step: create a payment.","operationId":"update_terminal_v1_terminals__terminal_id__patch","parameters":[{"name":"terminal_id","in":"path","required":true,"schema":{"type":"string","title":"Terminal Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/terminals/{terminal_id}/ping":{"post":{"tags":["terminals"],"summary":"Check whether a terminal is reachable","description":"Refreshes status. Simulated terminals are always online; physical ones are looked up on the processor account. Arguments: terminal_id. Returns the terminal with status and last_seen; emits terminal.online or terminal.offline when the status changes. Errors: resource_missing, processor_currency_unsupported (403; card payments are held for this merchant), sandbox_processor_unconfigured, processor_unavailable. Next step: create a payment if online.","operationId":"ping_terminal_v1_terminals__terminal_id__ping_post","parameters":[{"name":"terminal_id","in":"path","required":true,"schema":{"type":"string","title":"Terminal Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"502":{"description":"The payments network failed or gave no decision (processor_unavailable). Nothing was changed by this request; retry it later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"No processor is available for this merchant or deployment (processor_not_connected, sandbox_processor_unconfigured, connect_unavailable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/payments":{"post":{"tags":["payments"],"summary":"Create a payment","description":"Charges a customer. method=terminal pushes the amount to a terminal and returns 202 with state pending: a simulated terminal answers when you call simulate, a physical one when the customer taps (about a minute); you learn the result from payment.* webhooks or by polling GET /v1/payments/{id}. method=keyed charges a Collect nonce and returns 201 with a final state in the same response. method=card_on_file charges a saved payment method the same way (payment_method and initiated_by required; needs the payment_methods:charge scope). method=keyed with save_payment_method {customer, consent {agreed_at, reference}, metadata} saves the card first and then charges the saved card (needs payment_methods:write; only a typed card form nonce, never a wallet one): the payment names the new payment_method; a declined charge keeps the saved card; card_not_saved or nonce_invalid as failure_code means nothing was saved and nothing charged. Arguments: merchant_id (optional for card_on_file and the one-step save: without it the ZeroPoint-Account header, else the platform's only merchant in this mode), amount_cents, currency, platform_reference (unique per merchant), method, terminal_id or nonce or payment_method, initiated_by, save_payment_method, description, metadata, terminal_options {tip, receipt_screen} (terminal only; a tip lands in tip_cents). Returns the payment object. Errors: idempotency_key_required, parameter_invalid (terminal_id or nonce missing for the method, terminal_options on a keyed payment, platform_reference, description, metadata or nonce that looks like a card number, a platform_reference starting with zp:, reserved for ZeroPoint), resource_missing, insufficient_scope (403), card_on_file_unavailable (400, live mode), payment_method_unusable (409; the saved card cannot be charged, no payment was created and the reference is still free: save the card again, then retry with a new Idempotency-Key), payment_resume_method_unusable (409; a pending saved-card payment cannot be resumed because the merchant's processor account changed or its card can no longer be read: nothing was sent, do not charge it under a new reference; retry this request or GET the payment (never cached, Retry-After); unresolved it ends as processor_unverified), nonce_already_used (409; keyed or one-step: this nonce already saved a card or was already charged on this merchant, the message names the pm_ or pay_ id), resource_limit_exceeded and sandbox_daily_limit_exceeded (409, test mode ceilings on open payments, saved cards and save attempts), save_attempt_limit_exceeded (409, live one-step: the platform's daily allowance of card saves is used up), platform_reference_in_use (409), payment_resume_mismatch (409; a pending keyed payment retried with a different nonce or amount: send the original body or use a new platform_reference), payment_in_progress (409 with Retry-After, two cases: a keyed charge for this platform_reference is still in flight, Retry-After 2; or the processor answered and ZeroPoint is still recording it, Retry-After 60; retry the identical request with the same Idempotency-Key, which never charges twice; after 15 minutes the same key answers platform_reference_in_use and GET /v1/payments/{id} gives the outcome), terminal_busy (409; one payment at a time per physical terminal, the message names it), physical_terminal_unavailable (400; test mode reserves physical terminals, use a simulated one), terminal_offline (402), card_declined, nonce_invalid, processor_rejected, duplicate_transaction (the processor's duplicate screen refused a second equal charge on the card; not a card decline) and partial_approval (the card approved only part of the amount; ZeroPoint voided it, ask for another card) appear as failure_code on a 201 keyed response, processor_currency_unsupported (403; the merchant's connected account is not a US, USD account, so its card payments are held: no payment is created and nothing is sent), sandbox_processor_unconfigured (503), processor_unavailable (502; retry with the same Idempotency-Key, a physical push resumes). Next step: for a simulated terminal call POST /v1/sandbox/terminals/{id}/simulate to choose the outcome; for a physical terminal ask the customer to tap.","operationId":"create_payment_v1_payments_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request.","title":"Idempotency-Key"},"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional, card on file and the one-step save only. The merchant (mch_...) this payment acts on, when the body has no merchant_id.","title":"Zeropoint-Account"},"description":"Optional, card on file and the one-step save only. The merchant (mch_...) this payment acts on, when the body has no merchant_id."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentCreate"}}}},"responses":{"201":{"description":"Keyed payment finished.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentOut"}}}},"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The payment itself failed (type payment_error); branch on code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"502":{"description":"The payments network failed or gave no decision (processor_unavailable). The outcome may be unknown: a 5xx releases the Idempotency-Key, so retry with the same key and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"No processor is available for this merchant or deployment (processor_not_connected, sandbox_processor_unconfigured, connect_unavailable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["payments"],"summary":"List payments","description":"Lists payments newest first. Use platform_reference to find your own order. Arguments: merchant_id, platform_reference, state, payment_method, limit, cursor. Returns a list of payment objects. Errors: parameter_invalid. Next step: GET /v1/payments/{id}.","operationId":"list_payments_v1_payments_get","parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Merchant Id"}},{"name":"platform_reference","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Platform Reference"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"State"}},{"name":"payment_method","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Payment Method"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page, default 20.","default":20,"title":"Limit"},"description":"Items per page, default 20."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"next_cursor from the previous page.","title":"Cursor"},"description":"next_cursor from the previous page."},{"name":"starting_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both.","title":"Starting After"},"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both."},{"name":"ending_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after.","title":"Ending Before"},"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOut_PaymentOut_"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/payments/{payment_id}":{"get":{"tags":["payments"],"summary":"Retrieve a payment","description":"Returns the current state of one payment. Poll it after a terminal payment if you are not using webhooks. Arguments: payment_id (pay_...). Returns the payment object. Errors: resource_missing. Next step: branch on state and failure_code.","operationId":"get_payment_v1_payments__payment_id__get","parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/payments/{payment_id}/cancel":{"post":{"tags":["payments"],"summary":"Cancel a terminal payment","description":"Stops a card-present payment that is still pending or processing (the customer walked away). Arguments: payment_id. Returns the payment with state canceled and failure_code canceled_by_platform; emits payment.canceled. Errors: idempotency_key_required, resource_missing, payment_state_invalid (already final, or a keyed payment), processor_unavailable (502; the merchant's processor account could not be verified), processor_not_connected (503; a live merchant with no processor connection). A 5xx releases the Idempotency-Key, so retry with the same Idempotency-Key and body. Works for a merchant whose card payments are held; a physical terminal is told to clear the sale first. Next step: create a new payment if needed.","operationId":"cancel_payment_v1_payments__payment_id__cancel_post","parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request.","title":"Idempotency-Key"},"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"502":{"description":"The payments network failed or gave no decision (processor_unavailable). The outcome may be unknown: a 5xx releases the Idempotency-Key, so retry with the same key and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"No processor is available for this merchant or deployment (processor_not_connected, sandbox_processor_unconfigured, connect_unavailable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/payments/{payment_id}/receipt":{"get":{"tags":["payments"],"summary":"Get the hosted receipt URL","description":"Returns a public HTML receipt link for a succeeded payment. Arguments: payment_id. Returns a receipt object with url. Errors: resource_missing, receipt_unavailable (409) until the payment succeeded. Next step: show or email the url to the customer.","operationId":"get_receipt_v1_payments__payment_id__receipt_get","parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/sandbox/terminals/{terminal_id}/simulate":{"post":{"tags":["payments"],"summary":"Simulate a card outcome on a simulated terminal","description":"Test mode only. Acts as the customer at the terminal: approve, decline, cancel, or timeout. Use it right after creating a terminal payment on a terminal whose sim_behavior is manual. Arguments: terminal_id, payment_id, outcome. Returns the payment in its new state; the same payment.* events fire as with a real terminal. Errors: resource_missing, parameter_invalid (payment not on this terminal), payment_state_invalid (payment already final). Next step: GET /v1/payments/{id}, then refund it to complete the checklist.","operationId":"simulate_v1_sandbox_terminals__terminal_id__simulate_post","parameters":[{"name":"terminal_id","in":"path","required":true,"schema":{"type":"string","title":"Terminal Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/payments/{payment_id}/refund":{"post":{"tags":["payments"],"summary":"Refund a payment","description":"Returns money to the customer after settlement, in full or in part. Use void instead for a payment that has not settled yet. Arguments: payment_id, amount_cents (optional, partial). Returns the refund object with state succeeded or failed (failure_code says why); emits refund.succeeded or refund.failed. Errors: idempotency_key_required, resource_missing, payment_not_refundable (not succeeded, fully refunded, or partial refunds exist for a void), already_voided, refund_exceeds_balance, not_settled_use_void (explicit settlement rejection only; never inferred from HTTP 404), processor_currency_unsupported (403; card payments are held for this merchant, no refund is created), sandbox_processor_unconfigured, processor_unavailable (unknown outcome; retry the same key). Successful processor refunds return their own processor_transaction_id. Next step: GET /v1/payments/{id} shows amount_refunded_cents.","operationId":"refund_payment_v1_payments__payment_id__refund_post","parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request.","title":"Idempotency-Key"},"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RefundCreate"},{"type":"null"}],"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"502":{"description":"The payments network failed or gave no decision (processor_unavailable). The outcome may be unknown: a 5xx releases the Idempotency-Key, so retry with the same key and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"No processor is available for this merchant or deployment (processor_not_connected, sandbox_processor_unconfigured, connect_unavailable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/payments/{payment_id}/void":{"post":{"tags":["payments"],"summary":"Void a payment","description":"Reverses a succeeded payment in full before it settles (same day). Use refund after settlement. The processor's settlement status is read first. Arguments: payment_id. Returns the refund object with state succeeded or failed (failure_code says why); kind refund if the processor executed the void as a refund (payment.needs_attention void_became_refund); emits refund.succeeded or refund.failed. Errors: idempotency_key_required, resource_missing, payment_not_refundable (not succeeded, fully refunded, or partial refunds exist for a void; with Retry-After when the processor already shows it reversed or an earlier attempt is unresolved), already_voided, settled_use_refund (409; settled, nothing sent; refund instead, never automatic), processor_currency_unsupported (403; card payments are held for this merchant, nothing is voided), sandbox_processor_unconfigured, processor_unavailable (502; includes an unreadable settlement status, nothing sent; retry the same key). Next step: GET /v1/payments/{id} shows amount_refunded_cents.","operationId":"void_payment_v1_payments__payment_id__void_post","parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request.","title":"Idempotency-Key"},"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/VoidBody"},{"type":"null"}],"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"502":{"description":"The payments network failed or gave no decision (processor_unavailable). The outcome may be unknown: a 5xx releases the Idempotency-Key, so retry with the same key and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"No processor is available for this merchant or deployment (processor_not_connected, sandbox_processor_unconfigured, connect_unavailable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/payments/{payment_id}/refunds":{"get":{"tags":["payments"],"summary":"List refunds and voids of a payment","description":"Lists reversals for one payment, newest first. Arguments: payment_id, limit, cursor. Returns a list of refund objects. Errors: resource_missing. Next step: none.","operationId":"list_refunds_v1_payments__payment_id__refunds_get","parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page, default 20.","default":20,"title":"Limit"},"description":"Items per page, default 20."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"next_cursor from the previous page.","title":"Cursor"},"description":"next_cursor from the previous page."},{"name":"starting_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both.","title":"Starting After"},"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both."},{"name":"ending_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after.","title":"Ending Before"},"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOut_RefundOut_"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/refunds/{refund_id}":{"get":{"tags":["payments"],"summary":"Retrieve a refund","description":"Returns one refund or void. Arguments: refund_id (rfd_...). Returns the refund object. Errors: resource_missing. Next step: none.","operationId":"get_refund_route_v1_refunds__refund_id__get","parameters":[{"name":"refund_id","in":"path","required":true,"schema":{"type":"string","title":"Refund Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/payment_intents/{payment_intent_id}":{"get":{"tags":["payment_intents"],"summary":"Retrieve a payment as a PaymentIntent","description":"Read only. Returns the payment (pay_...) in Stripe's PaymentIntent shape, for code that follows a checkout session's or an invoice's payment_intent. status follows Stripe's names, money first: processing while the outcome is not known (including a failed payment whose outcome is unverified, which can still become a capture), succeeded, requires_payment_method after a proven failure, canceled; our own state and failure code are in zeropoint_state and zeropoint_failure_code. Arguments: payment_intent_id (pay_...). With the ZeroPoint-Account (or Stripe-Account) header, a payment of another merchant is resource_missing. expand[] expands nothing here. Errors: resource_missing, parameter_unavailable. Next step: GET /v1/payments/{id} for the full payment.","operationId":"get_payment_intent_v1_payment_intents__payment_intent_id__get","parameters":[{"name":"payment_intent_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Intent Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Payment Intent V1 Payment Intents  Payment Intent Id  Get"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/payment_intents":{"get":{"tags":["payment_intents"],"summary":"List payments as PaymentIntents","description":"Read only. Lists payments newest first in Stripe's PaymentIntent shape. status follows Stripe's names, money first: processing while the outcome is not known (including a failed payment whose outcome is unverified, which can still become a capture), succeeded, requires_payment_method after a proven failure, canceled; our own state and failure code are in zeropoint_state and zeropoint_failure_code. Arguments: customer (cus_...: payments of that customer's invoices, checkout sessions and saved cards), limit, starting_after (or cursor). With the ZeroPoint-Account (or Stripe-Account) header: only that merchant's payments. Any other parameter is refused by name. Errors: parameter_invalid, parameter_unknown, parameter_unavailable. Next step: GET /v1/payment_intents/{id}.","operationId":"list_payment_intents_v1_payment_intents_get","parameters":[{"name":"customer","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Customer"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page, default 20.","default":20,"title":"Limit"},"description":"Items per page, default 20."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"next_cursor from the previous page.","title":"Cursor"},"description":"next_cursor from the previous page."},{"name":"starting_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both.","title":"Starting After"},"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both."},{"name":"ending_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after.","title":"Ending Before"},"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Payment Intents V1 Payment Intents Get"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/refunds":{"post":{"tags":["refunds"],"summary":"Refund a payment (Stripe's refunds.create)","description":"Stripe's refunds.create over the same refund as POST /v1/payments/{id}/refund: returns settled money in full or in part. Arguments: payment_intent (pay_...; payment is accepted too), amount (optional, cents; omit for the remaining balance), reason (duplicate, fraudulent or requested_by_customer; echoed only). Idempotency-Key is required: pass your own on every refund, derived from the operation, so a retry of your code reuses it. Never voids: the refund is sent to the processor, and only when the processor refuses it because the payment has not settled does it answer not_settled_use_void naming POST /v1/payments/{id}/void (nothing reversed); a refund the processor accepts before settlement succeeds. Refused by name: charge, metadata, refund_application_fee, reverse_transfer, instructions_email. Returns the refund object with Stripe's amount, status, payment_intent and currency beside ours. Errors: as POST /v1/payments/{id}/refund (idempotency_key_required, resource_missing, payment_not_refundable, refund_exceeds_balance, not_settled_use_void, processor_unavailable: unknown outcome, retry the same key). Next step: GET /v1/refunds/{id}.","operationId":"create_refund_v1_refunds_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request.","title":"Idempotency-Key"},"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeRefundCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Refund V1 Refunds Post"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"502":{"description":"The payments network failed or gave no decision (processor_unavailable). The outcome may be unknown: a 5xx releases the Idempotency-Key, so retry with the same key and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"No processor is available for this merchant or deployment (processor_not_connected, sandbox_processor_unconfigured, connect_unavailable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["refunds"],"summary":"List refunds (Stripe's refunds.list)","description":"Lists refunds and voids newest first. Arguments: payment_intent (pay_...: that payment's only), limit, starting_after (or cursor). With the ZeroPoint-Account (or Stripe-Account) header: only that merchant's. Any other parameter (charge, created) is refused by name. Errors: parameter_invalid, parameter_unknown, resource_missing. Next step: GET /v1/refunds/{id}.","operationId":"list_refunds_v1_refunds_get","parameters":[{"name":"payment_intent","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Payment Intent"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page, default 20.","default":20,"title":"Limit"},"description":"Items per page, default 20."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"next_cursor from the previous page.","title":"Cursor"},"description":"next_cursor from the previous page."},{"name":"starting_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both.","title":"Starting After"},"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both."},{"name":"ending_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after.","title":"Ending Before"},"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Refunds V1 Refunds Get"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/products":{"post":{"tags":["catalog"],"summary":"Create a product","description":"Creates a product a merchant sells (a plan, a pass). Prices hang off it. Arguments: merchant_id (optional, see below), name, description, active, metadata, stripe_id. merchant_id is optional: without it, the ZeroPoint-Account header (or Stripe-Account), else the platform's only merchant in this mode. Idempotency-Key is optional: with one, a retry with the same key and body replays the first answer; without one the request runs once. Returns the product object. Errors: parameter_invalid, resource_missing (the merchant), stripe_id_in_use, resource_limit_exceeded (sandbox ceiling). Next step: POST /v1/prices with this product's id.","operationId":"create_product_v1_products_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional on this endpoint. Any unique string up to 255 characters (a UUID is fine): a retry with the same key and body replays the first answer. Without it the request runs once, with no replay protection.","title":"Idempotency-Key"},"description":"Optional on this endpoint. Any unique string up to 255 characters (a UUID is fine): a retry with the same key and body replays the first answer. Without it the request runs once, with no replay protection."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"get":{"tags":["catalog"],"summary":"List products","description":"Lists products newest first; deleted ones are left out. Arguments: active, ids (ids[]=prod_..., up to 100; not with cursor or starting_after), merchant_id, stripe_id, limit, cursor. Returns a list of product objects. Errors: parameter_invalid, parameter_unknown. Next step: GET /v1/prices?product={id}. merchant_id filters to one merchant; without it, a ZeroPoint-Account (or Stripe-Account) header filters the same way. A query parameter this list does not take is refused by name (400 parameter_unknown), never ignored; Stripe's array forms name[]=a and name[0]=a are read.","operationId":"list_products_v1_products_get","parameters":[{"name":"active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},{"name":"ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","maxLength":40},"maxItems":100},{"type":"null"}],"title":"Ids"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Merchant Id"}},{"name":"stripe_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Stripe Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page, default 20.","default":20,"title":"Limit"},"description":"Items per page, default 20."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"next_cursor from the previous page.","title":"Cursor"},"description":"next_cursor from the previous page."},{"name":"starting_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both.","title":"Starting After"},"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both."},{"name":"ending_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after.","title":"Ending Before"},"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOut_ProductOut_"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/products/{product_id}":{"get":{"tags":["catalog"],"summary":"Retrieve a product","description":"Returns one product. Arguments: product_id (prod_...). Returns the product object. Errors: resource_missing (also for a deleted product). Next step: list its prices.","operationId":"get_product_v1_products__product_id__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"post":{"tags":["catalog"],"summary":"Update a product (Stripe's POST)","description":"Stripe's update verb: the same operation as PATCH on this path, with the same fields, validation and scope; no Idempotency-Key. Changes name, description, active, default_price, metadata, or stripe_id while it is null. Arguments: any subset of those fields; metadata merges key by key (a key sent as \"\" is removed, metadata \"\" removes every key). Returns the updated product. Errors: resource_missing, parameter_invalid (default_price that is not an active price of this product), parameter_immutable (a different stripe_id), stripe_id_in_use. Next step: GET /v1/products/{id}.","operationId":"update_product_v1_products__product_id__post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"patch":{"tags":["catalog"],"summary":"Update a product","description":"Changes name, description, active, default_price, metadata, or stripe_id while it is null. Arguments: any subset of those fields; metadata merges key by key (a key sent as \"\" is removed, metadata \"\" removes every key). Returns the updated product. Errors: resource_missing, parameter_invalid (default_price that is not an active price of this product), parameter_immutable (a different stripe_id), stripe_id_in_use. Next step: GET /v1/products/{id}. POST to the same path (Stripe's update verb) does exactly the same.","operationId":"update_product_v1_products__product_id__patch","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"delete":{"tags":["catalog"],"summary":"Delete a product","description":"Deletes a product that has no prices. A product with prices cannot be deleted, because prices are never deleted; archive it with active: false instead. Arguments: product_id. Returns {object, id, deleted: true}. Errors: resource_missing, product_has_prices. Next step: none; a deleted product reads 404.","operationId":"delete_product_v1_products__product_id__delete","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/prices":{"post":{"tags":["catalog"],"summary":"Create a price","description":"Creates a price for a product: one_time, or recurring monthly or yearly. unit_amount is integer cents. A price's amount, currency, interval and product never change; to change a price, create a new one (transfer_lookup_key moves your lookup_key to it) and archive the old one. merchant_id is optional: without it, the ZeroPoint-Account header (or Stripe-Account), else the platform's only merchant in this mode. Idempotency-Key is optional: with one, a retry with the same key and body replays the first answer; without one the request runs once. Arguments: merchant_id, product, unit_amount, currency, type, recurring {interval, interval_count}, active, lookup_key, transfer_lookup_key, nickname, metadata, stripe_id. Returns the price object. Errors: parameter_invalid (also an archived product), resource_missing (the merchant or product), lookup_key_in_use, stripe_id_in_use, resource_limit_exceeded (sandbox ceiling). Next step: set it as the product's default_price, or use it in a checkout.","operationId":"create_price_v1_prices_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional on this endpoint. Any unique string up to 255 characters (a UUID is fine): a retry with the same key and body replays the first answer. Without it the request runs once, with no replay protection.","title":"Idempotency-Key"},"description":"Optional on this endpoint. Any unique string up to 255 characters (a UUID is fine): a retry with the same key and body replays the first answer. Without it the request runs once, with no replay protection."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"get":{"tags":["catalog"],"summary":"List prices","description":"Lists prices newest first, archived included unless active is set. Arguments: active, merchant_id, product, type, recurring.interval (or recurring[interval]), currency (usd; another currency lists nothing, as no price has it), lookup_keys (exact, any of up to 10: lookup_keys[]=a, lookup_keys[0]=a or lookup_keys=a), stripe_id, limit, cursor, expand[] (data.product). Returns a list of price objects. Errors: parameter_invalid (param merchant_id: lookup_keys matched prices of more than one merchant and none was named), parameter_unknown. Next step: GET /v1/prices/{id}. merchant_id filters to one merchant; without it, a ZeroPoint-Account (or Stripe-Account) header filters the same way. A query parameter this list does not take is refused by name (400 parameter_unknown), never ignored; Stripe's array forms name[]=a and name[0]=a are read.","operationId":"list_prices_v1_prices_get","parameters":[{"name":"active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Merchant Id"}},{"name":"product","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Product"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"enum":["one_time","recurring"],"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"recurring.interval","in":"query","required":false,"schema":{"anyOf":[{"enum":["month","year"],"type":"string"},{"type":"null"}],"title":"Recurring.Interval"}},{"name":"lookup_keys","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"},"maxItems":10},{"type":"null"}],"title":"Lookup Keys"}},{"name":"currency","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^[A-Za-z]{3}$"},{"type":"null"}],"title":"Currency"}},{"name":"stripe_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Stripe Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page, default 20.","default":20,"title":"Limit"},"description":"Items per page, default 20."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"next_cursor from the previous page.","title":"Cursor"},"description":"next_cursor from the previous page."},{"name":"starting_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both.","title":"Starting After"},"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both."},{"name":"ending_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after.","title":"Ending Before"},"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOut_PriceOut_"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/prices/{price_id}":{"get":{"tags":["catalog"],"summary":"Retrieve a price","description":"Returns one price, archived or not. Arguments: price_id (price_...), expand[] (product; any other path is parameter_unavailable). Returns the price object. Errors: resource_missing. Next step: use it in a checkout.","operationId":"get_price_v1_prices__price_id__get","parameters":[{"name":"price_id","in":"path","required":true,"schema":{"type":"string","title":"Price Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"post":{"tags":["catalog"],"summary":"Update a price (Stripe's POST)","description":"Stripe's update verb: the same operation as PATCH on this path, with the same fields, validation and scope; no Idempotency-Key. Changes active, lookup_key (with transfer_lookup_key), nickname, metadata, or stripe_id while it is null; metadata merges key by key (a key sent as \"\" is removed, metadata \"\" removes every key). Prices cannot change amount, currency, interval or product: sending one answers parameter_immutable; create a new price and archive this one. Archiving a product's default price clears it. Returns the updated price. Errors: resource_missing, parameter_immutable, lookup_key_in_use, stripe_id_in_use. Next step: GET /v1/prices/{id}.","operationId":"update_price_v1_prices__price_id__post","parameters":[{"name":"price_id","in":"path","required":true,"schema":{"type":"string","title":"Price Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"patch":{"tags":["catalog"],"summary":"Update a price","description":"Changes active, lookup_key (with transfer_lookup_key), nickname, metadata, or stripe_id while it is null; metadata merges key by key (a key sent as \"\" is removed, metadata \"\" removes every key). Prices cannot change amount, currency, interval or product: sending one answers parameter_immutable; create a new price and archive this one. Archiving a product's default price clears it. Returns the updated price. Errors: resource_missing, parameter_immutable, lookup_key_in_use, stripe_id_in_use. Next step: GET /v1/prices/{id}. POST to the same path (Stripe's update verb) does exactly the same.","operationId":"update_price_v1_prices__price_id__patch","parameters":[{"name":"price_id","in":"path","required":true,"schema":{"type":"string","title":"Price Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/coupons":{"post":{"tags":["catalog"],"summary":"Create a coupon","description":"Creates a discount: percent_off or amount_off (integer cents, currency usd), for once, repeating (duration_in_months) or forever. Customers use it through a promotion code. merchant_id is optional: without it, the ZeroPoint-Account header (or Stripe-Account), else the platform's only merchant in this mode. Idempotency-Key is optional: with one, a retry with the same key and body replays the first answer; without one the request runs once. Arguments: merchant_id, name, percent_off or amount_off, currency, duration, duration_in_months, max_redemptions, redeem_by, applies_to.products, metadata, stripe_id. Returns the coupon object. Errors: parameter_invalid, resource_missing (the merchant or a product), stripe_id_in_use, resource_limit_exceeded (sandbox ceiling). Next step: POST /v1/promotion_codes.","operationId":"create_coupon_v1_coupons_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional on this endpoint. Any unique string up to 255 characters (a UUID is fine): a retry with the same key and body replays the first answer. Without it the request runs once, with no replay protection.","title":"Idempotency-Key"},"description":"Optional on this endpoint. Any unique string up to 255 characters (a UUID is fine): a retry with the same key and body replays the first answer. Without it the request runs once, with no replay protection."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"get":{"tags":["catalog"],"summary":"List coupons","description":"Lists coupons newest first; deleted ones are left out. Arguments: merchant_id, stripe_id, limit, cursor. Returns a list of coupon objects. Errors: parameter_invalid, parameter_unknown. Next step: GET /v1/promotion_codes?coupon={id}. merchant_id filters to one merchant; without it, a ZeroPoint-Account (or Stripe-Account) header filters the same way. A query parameter this list does not take is refused by name (400 parameter_unknown), never ignored; Stripe's array forms name[]=a and name[0]=a are read.","operationId":"list_coupons_v1_coupons_get","parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Merchant Id"}},{"name":"stripe_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Stripe Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page, default 20.","default":20,"title":"Limit"},"description":"Items per page, default 20."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"next_cursor from the previous page.","title":"Cursor"},"description":"next_cursor from the previous page."},{"name":"starting_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both.","title":"Starting After"},"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both."},{"name":"ending_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after.","title":"Ending Before"},"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOut_CouponOut_"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/coupons/{coupon_id}":{"get":{"tags":["catalog"],"summary":"Retrieve a coupon","description":"Returns one coupon with times_redeemed and valid. Arguments: coupon_id (coupon_...). Errors: resource_missing (also for a deleted coupon). Next step: create a code for it.","operationId":"get_coupon_v1_coupons__coupon_id__get","parameters":[{"name":"coupon_id","in":"path","required":true,"schema":{"type":"string","title":"Coupon Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"post":{"tags":["catalog"],"summary":"Update a coupon (Stripe's POST)","description":"Stripe's update verb: the same operation as PATCH on this path, with the same fields, validation and scope; no Idempotency-Key. Changes name, metadata, or stripe_id while it is null; metadata merges key by key (a key sent as \"\" is removed, metadata \"\" removes every key). The discount terms never change: sending one answers parameter_immutable; create a new coupon instead. Returns the updated coupon. Errors: resource_missing, parameter_immutable, stripe_id_in_use. Next step: GET /v1/coupons/{id}.","operationId":"update_coupon_v1_coupons__coupon_id__post","parameters":[{"name":"coupon_id","in":"path","required":true,"schema":{"type":"string","title":"Coupon Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"patch":{"tags":["catalog"],"summary":"Update a coupon","description":"Changes name, metadata, or stripe_id while it is null; metadata merges key by key (a key sent as \"\" is removed, metadata \"\" removes every key). The discount terms never change: sending one answers parameter_immutable; create a new coupon instead. Returns the updated coupon. Errors: resource_missing, parameter_immutable, stripe_id_in_use. Next step: GET /v1/coupons/{id}. POST to the same path (Stripe's update verb) does exactly the same.","operationId":"update_coupon_v1_coupons__coupon_id__patch","parameters":[{"name":"coupon_id","in":"path","required":true,"schema":{"type":"string","title":"Coupon Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"delete":{"tags":["catalog"],"summary":"Delete a coupon","description":"Deletes a coupon: its promotion codes stop working at once and read active: false. Discounts already applied keep their remaining duration. Arguments: coupon_id. Returns {object, id, deleted: true}. Errors: resource_missing. Next step: none.","operationId":"delete_coupon_v1_coupons__coupon_id__delete","parameters":[{"name":"coupon_id","in":"path","required":true,"schema":{"type":"string","title":"Coupon Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/promotion_codes":{"post":{"tags":["catalog"],"summary":"Create a promotion code","description":"Creates the text a customer types (LAUNCH20) for a coupon. Codes are unique per merchant among active codes, regardless of case. merchant_id is optional: without it, the ZeroPoint-Account header (or Stripe-Account), else the platform's only merchant in this mode. Idempotency-Key is optional: with one, a retry with the same key and body replays the first answer; without one the request runs once. Arguments: merchant_id, coupon (or promotion.coupon), code, active, customer, expires_at, max_redemptions, restrictions {minimum_amount, minimum_amount_currency, once_per_customer}, metadata, stripe_id. Returns the promotion_code object. Errors: parameter_invalid, resource_missing (the merchant, coupon or customer), coupon_invalid, promotion_code_in_use, stripe_id_in_use, resource_limit_exceeded (sandbox ceiling). Next step: POST /v1/prices/{id}/discount_preview with the code.","operationId":"create_promotion_code_v1_promotion_codes_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional on this endpoint. Any unique string up to 255 characters (a UUID is fine): a retry with the same key and body replays the first answer. Without it the request runs once, with no replay protection.","title":"Idempotency-Key"},"description":"Optional on this endpoint. Any unique string up to 255 characters (a UUID is fine): a retry with the same key and body replays the first answer. Without it the request runs once, with no replay protection."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionCodeCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionCodeOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"get":{"tags":["catalog"],"summary":"List promotion codes","description":"Lists promotion codes newest first. code matches regardless of case and returns every code with that text, inactive ones included unless active=true. Arguments: merchant_id, code, coupon, customer, active, stripe_id, limit, cursor. Returns a list of promotion_code objects. Errors: parameter_invalid, parameter_unknown. Next step: GET /v1/promotion_codes/{id}. merchant_id filters to one merchant; without it, a ZeroPoint-Account (or Stripe-Account) header filters the same way. A query parameter this list does not take is refused by name (400 parameter_unknown), never ignored; Stripe's array forms name[]=a and name[0]=a are read.","operationId":"list_promotion_codes_v1_promotion_codes_get","parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Merchant Id"}},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Code"}},{"name":"coupon","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Coupon"}},{"name":"customer","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Customer"}},{"name":"active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},{"name":"stripe_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Stripe Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page, default 20.","default":20,"title":"Limit"},"description":"Items per page, default 20."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"next_cursor from the previous page.","title":"Cursor"},"description":"next_cursor from the previous page."},{"name":"starting_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both.","title":"Starting After"},"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both."},{"name":"ending_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after.","title":"Ending Before"},"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOut_PromotionCodeOut_"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/promotion_codes/{promotion_code_id}":{"get":{"tags":["catalog"],"summary":"Retrieve a promotion code","description":"Returns one promotion code. active reads false when the code is deactivated or its coupon is deleted or no longer valid. Arguments: promotion_code_id (promo_...). Errors: resource_missing. Next step: preview it on a price.","operationId":"get_promotion_code_v1_promotion_codes__promotion_code_id__get","parameters":[{"name":"promotion_code_id","in":"path","required":true,"schema":{"type":"string","title":"Promotion Code Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionCodeOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"post":{"tags":["catalog"],"summary":"Update a promotion code (Stripe's POST)","description":"Stripe's update verb: the same operation as PATCH on this path, with the same fields, validation and scope; no Idempotency-Key. Changes active, metadata, or stripe_id while it is null; metadata merges key by key (a key sent as \"\" is removed, metadata \"\" removes every key). There is no delete; deactivate with active: false. Reactivating a code whose text an active code now holds answers promotion_code_in_use. Returns the updated promotion_code. Errors: resource_missing, parameter_immutable, promotion_code_in_use, stripe_id_in_use. Next step: GET /v1/promotion_codes/{id}.","operationId":"update_promotion_code_v1_promotion_codes__promotion_code_id__post","parameters":[{"name":"promotion_code_id","in":"path","required":true,"schema":{"type":"string","title":"Promotion Code Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionCodeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionCodeOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"patch":{"tags":["catalog"],"summary":"Update a promotion code","description":"Changes active, metadata, or stripe_id while it is null; metadata merges key by key (a key sent as \"\" is removed, metadata \"\" removes every key). There is no delete; deactivate with active: false. Reactivating a code whose text an active code now holds answers promotion_code_in_use. Returns the updated promotion_code. Errors: resource_missing, parameter_immutable, promotion_code_in_use, stripe_id_in_use. Next step: GET /v1/promotion_codes/{id}. POST to the same path (Stripe's update verb) does exactly the same.","operationId":"update_promotion_code_v1_promotion_codes__promotion_code_id__patch","parameters":[{"name":"promotion_code_id","in":"path","required":true,"schema":{"type":"string","title":"Promotion Code Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionCodeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionCodeOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/prices/{price_id}/discount_preview":{"post":{"tags":["catalog"],"summary":"Preview a promotion code on a price","description":"Read only: answers what a promotion code would take off this price, and writes nothing (no use is reserved, no counter moves). A POST so the code and the email never travel in a URL; no Idempotency-Key needed. Arguments: price_id, merchant_id (optional: else the ZeroPoint-Account header, else the only merchant), promotion_code, customer (cus_..., for codes limited to one customer), email (the shopper's, for once_per_customer), quantity (1). Returns a discount_preview with subtotal, discount_amount and total in integer cents. A code that does not apply is still a 200: refusal is promotion_code_invalid, promotion_code_not_applicable, promotion_code_exhausted or promotion_code_already_redeemed, with refusal_message to show the shopper, and total is the undiscounted amount. A total of 0 is returned as a number. Errors: resource_missing (price, merchant or customer), price_inactive, parameter_invalid. Next step: start a checkout with the code.","operationId":"discount_preview_v1_prices__price_id__discount_preview_post","parameters":[{"name":"price_id","in":"path","required":true,"schema":{"type":"string","title":"Price Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountPreviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountPreviewOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/customers":{"post":{"tags":["customers"],"summary":"Create a customer","description":"Creates a customer of one merchant, the owner a saved card belongs to. A customer is a ZeroPoint record only: it is never sent to the processor and holds no card data. Arguments: merchant_id (optional: without it the ZeroPoint-Account header, else the platform's only merchant in this mode), email, name, phone, description, metadata, stripe_id, test_clock (test mode only: a clock_... whose time the customer's subscriptions then use). Returns the customer object and emits customer.created. The Idempotency-Key is optional here (nothing reaches the processor): with one, a retry replays the first answer; without one, each request creates a customer. Errors: parameter_invalid, resource_missing, stripe_id_in_use (409), resource_limit_exceeded (409, test mode), test_mode_only (400: test_clock with a live merchant). Next step: save a card for it.","operationId":"create_customer_v1_customers_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional on this endpoint. Any unique string up to 255 characters (a UUID is fine): a retry with the same key and body replays the first answer. Without it the request runs once, with no replay protection.","title":"Idempotency-Key"},"description":"Optional on this endpoint. Any unique string up to 255 characters (a UUID is fine): a retry with the same key and body replays the first answer. Without it the request runs once, with no replay protection."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"get":{"tags":["customers"],"summary":"List customers","description":"Lists customers newest first. Arguments: merchant_id (or the ZeroPoint-Account or Stripe-Account header), email (case-sensitive exact match, as Stripe's), stripe_id, include_deleted (default false; a deleted customer reads {object, id, deleted: true}), limit, cursor. A query parameter this list does not take is refused by name (400 parameter_unknown), never ignored. Returns a list of customer objects. Errors: parameter_invalid, parameter_unknown. Next step: GET /v1/customers/{id}.","operationId":"list_customers_v1_customers_get","parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Merchant Id"}},{"name":"email","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}],"title":"Email"}},{"name":"stripe_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Stripe Id"}},{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Deleted"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page, default 20.","default":20,"title":"Limit"},"description":"Items per page, default 20."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"next_cursor from the previous page.","title":"Cursor"},"description":"next_cursor from the previous page."},{"name":"starting_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both.","title":"Starting After"},"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both."},{"name":"ending_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after.","title":"Ending Before"},"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOut_Union_CustomerOut__DeletedOut__"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/customers/{customer_id}":{"get":{"tags":["customers"],"summary":"Retrieve a customer","description":"Returns one customer. Arguments: customer_id (cus_...). Returns the customer object, or {object: customer, id, deleted: true} for a deleted customer. Errors: resource_missing. Next step: PATCH to change it.","operationId":"get_customer_v1_customers__customer_id__get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CustomerOut"},{"$ref":"#/components/schemas/DeletedOut"}],"title":"Response Get Customer V1 Customers  Customer Id  Get"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"patch":{"tags":["customers"],"summary":"Update a customer","description":"Changes email, name, phone, description, metadata or stripe_id. An omitted field stays as it is; null clears email, name, phone or description; metadata merges key by key (a key sent as \"\" is removed, metadata \"\" removes every key); stripe_id is set only while null. POST and PATCH are the same operation (POST is Stripe's verb); neither takes an Idempotency-Key. Emits customer.updated when something changed. Returns the updated customer. Errors: resource_missing (also for a deleted customer), parameter_invalid, parameter_immutable, stripe_id_in_use. Next step: GET /v1/customers/{id}.","operationId":"update_customer_v1_customers__customer_id__patch","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"post":{"tags":["customers"],"summary":"Update a customer (POST, Stripe's verb)","description":"Changes email, name, phone, description, metadata or stripe_id. An omitted field stays as it is; null clears email, name, phone or description; metadata merges key by key (a key sent as \"\" is removed, metadata \"\" removes every key); stripe_id is set only while null. POST and PATCH are the same operation (POST is Stripe's verb); neither takes an Idempotency-Key. Emits customer.updated when something changed. Returns the updated customer. Errors: resource_missing (also for a deleted customer), parameter_invalid, parameter_immutable, stripe_id_in_use. Next step: GET /v1/customers/{id}.","operationId":"update_customer_v1_customers__customer_id__post","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"delete":{"tags":["customers"],"summary":"Delete a customer","description":"Deletes a customer and every saved card it holds (each card's token is erased here, the processor has no token delete, and payment_method.detached is sent), then sends customer.deleted, all in one commit. Refused, changing nothing, while the customer has an open checkout session, a subscription that is not canceled, or a saved card that is still needed (the same check as DELETE /v1/payment_methods/{id}). The customer stays as a tombstone: GET answers {object, id, deleted: true}. Arguments: customer_id. Returns {object, id, deleted: true}; a second delete answers the same. Errors: resource_missing, checkout_session_busy (409, Retry-After), customer_has_subscriptions (409, cancel the subscription first), payment_method_in_use (409; Retry-After 30 while a payment using the card is pending, 60 while a processor answer is being recorded or the check could not run, none when another use holds the card). Next step: none.","operationId":"delete_customer_v1_customers__customer_id__delete","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/checkout/sessions":{"post":{"tags":["checkout"],"summary":"Create a checkout session","description":"Creates a hosted payment page for a fixed amount. Send the buyer to url; fulfil on the checkout.session.completed webhook, never on the success redirect. JSON or Stripe's form encoding. Arguments: merchant_id (optional: without it the ZeroPoint-Account header, else the platform's only merchant in this mode), success_url, line_items (price or price_data), cancel_url, expires_at, client_reference_id, customer_email, customer, customer_creation, allow_promotion_codes, discounts, metadata, payment_intent_data.metadata (copied onto the payment), subscription_data.metadata (subscription mode only), expand (line_items, customer, subscription, invoice, payment_intent, as on retrieve; not in the query string); currency usd, payment_method_types [card], ui_mode hosted_page, billing_address_collection auto (required is parameter_unknown: the page collects no billing address), locale auto, submit_type auto, payment_method_collection always (not with allow_promotion_codes in payment mode, where a 100 percent off code completes with no card), payment_intent_data.capture_method automatic, and line_items[].adjustable_quantity, automatic_tax, phone_number_collection, tax_id_collection, invoice_creation, adaptive_pricing with enabled false are accepted as no-ops. Returns the session with status open and url; line_items is a list object whose items carry price as a price object. The Idempotency-Key is optional (a session never reaches the processor): with one, a retry replays the first answer. Errors: parameter_invalid, parameter_unknown (a field this API never supports, such as shipping_address_collection or custom_fields), parameter_unavailable (not in this version yet), price_not_recurring (a one-time price in subscription mode), url_invalid, checkout_unavailable (live mode not enabled for this platform), resource_missing, customer_identity_required (400, subscription mode: the merchant's subscription_guard is on, so send customer, client_reference_id or customer_email), checkout_outcome_unknown (409: a session for this client_reference_id, customer or customer_email and plan is waiting for its payment to be confirmed; the error names it in held_session_id), subscription_create_unresolved (409, subscription mode: a first payment for this buyer and plan is still being confirmed; names subscription and invoice), subscription_exists (409, subscription mode: the merchant's subscription_guard found a live subscription of this buyer to the same price, product or, under customer, anything; names subscription), resource_limit_exceeded and sandbox_daily_limit_exceeded (409, test mode). A refusal is kept under its Idempotency-Key for 24 hours (except checkout_unavailable and merchant refusals, checked before the key is claimed): after fixing the cause, send the request under a new key. Next step: redirect the buyer to url.","operationId":"create_checkout_session_v1_checkout_sessions_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional on this endpoint. Any unique string up to 255 characters (a UUID is fine): a retry with the same key and body replays the first answer. Without it the request runs once, with no replay protection.","title":"Idempotency-Key"},"description":"Optional on this endpoint. Any unique string up to 255 characters (a UUID is fine): a retry with the same key and body replays the first answer. Without it the request runs once, with no replay protection."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"get":{"tags":["checkout"],"summary":"List checkout sessions","description":"Lists sessions newest first. Arguments: merchant_id, status (open, complete, expired), customer (cus_...), payment_intent (pay_...; payment is the same filter), subscription (sub_...), client_reference_id (exact match), created (Unix seconds: created=, created[gt]=, created[gte]=, created[lt]=, created[lte]=), limit, starting_after (or cursor), expand[] (data.line_items, already inline; data.customer, data.subscription, data.invoice, data.payment_intent). Any other parameter is refused by name (customer_details and payment_link are not supported). Returns a list of sessions with the list's url. Errors: parameter_invalid, parameter_unavailable, parameter_unknown. Next step: GET /v1/checkout/sessions/{id}.","operationId":"list_checkout_sessions_v1_checkout_sessions_get","parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Merchant Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["open","complete","expired"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"client_reference_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"title":"Client Reference Id"}},{"name":"payment","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Payment"}},{"name":"payment_intent","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Stripe's name for the payment filter.","title":"Payment Intent"},"description":"Stripe's name for the payment filter."},{"name":"customer","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Customer"}},{"name":"subscription","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Subscription"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page, default 20.","default":20,"title":"Limit"},"description":"Items per page, default 20."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"next_cursor from the previous page.","title":"Cursor"},"description":"next_cursor from the previous page."},{"name":"starting_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both.","title":"Starting After"},"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both."},{"name":"ending_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after.","title":"Ending Before"},"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after."},{"name":"expand[]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Optional. Expandable here: data.customer, data.invoice, data.line_items, data.payment_intent, data.subscription. Any other value answers 400 parameter_unavailable.","title":"Expand[]"},"description":"Optional. Expandable here: data.customer, data.invoice, data.line_items, data.payment_intent, data.subscription. Any other value answers 400 parameter_unavailable."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOut_CheckoutSessionOut_"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/checkout/sessions/{session_id}":{"get":{"tags":["checkout"],"summary":"Retrieve a checkout session","description":"Returns one session. Show a purchase as paid only when status is complete, payment_status is paid, merchant_id is yours and amount_total is what you expected. Arguments: session_id (cs_...), expand[] (line_items, already inline; customer, subscription, invoice, payment_intent: each the object its own GET answers). Returns the session; url is null once it is closed. Errors: resource_missing, parameter_unavailable (any other expansion). Next step: GET /v1/payments/{payment}.","operationId":"get_checkout_session_v1_checkout_sessions__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"expand[]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Optional. Expandable here: customer, invoice, line_items, payment_intent, subscription. Any other value answers 400 parameter_unavailable.","title":"Expand[]"},"description":"Optional. Expandable here: customer, invoice, line_items, payment_intent, subscription. Any other value answers 400 parameter_unavailable."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/checkout/sessions/{session_id}/line_items":{"get":{"tags":["checkout"],"summary":"Retrieve a checkout session's line items","description":"Lists the session's line items in order, as Stripe's list object; each item carries price as a price object (null id and product for a price_data line). Arguments: session_id (cs_...), limit, starting_after (or cursor: the id of the last line of the previous page). Returns a list of line items with the list's url. Errors: resource_missing, parameter_unavailable (expand[]: nothing expands here). Next step: GET /v1/checkout/sessions/{session_id}.","operationId":"list_checkout_session_line_items_v1_checkout_sessions__session_id__line_items_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page, default 20.","default":20,"title":"Limit"},"description":"Items per page, default 20."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"next_cursor from the previous page.","title":"Cursor"},"description":"next_cursor from the previous page."},{"name":"starting_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both.","title":"Starting After"},"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both."},{"name":"ending_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after.","title":"Ending Before"},"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after."},{"name":"expand[]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Optional. Expandable here: nothing. Any other value answers 400 parameter_unavailable.","title":"Expand[]"},"description":"Optional. Expandable here: nothing. Any other value answers 400 parameter_unavailable."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLineItemListOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/checkout/sessions/{session_id}/expire":{"post":{"tags":["checkout"],"summary":"Expire a checkout session","description":"Closes an open session so it can no longer be paid; Stripe's expire, with no body. Arguments: session_id (cs_...). The Idempotency-Key is optional. Returns the session with status expired. Errors: resource_missing, checkout_session_not_open (409), checkout_session_busy (409 with Retry-After: a payment attempt is in flight), checkout_outcome_unknown (409: the payment's outcome is being confirmed). Next step: create a new session if the buyer still wants to pay.","operationId":"expire_checkout_session_v1_checkout_sessions__session_id__expire_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional on this endpoint. Any unique string up to 255 characters (a UUID is fine): a retry with the same key and body replays the first answer. Without it the request runs once, with no replay protection.","title":"Idempotency-Key"},"description":"Optional on this endpoint. Any unique string up to 255 characters (a UUID is fine): a retry with the same key and body replays the first answer. Without it the request runs once, with no replay protection."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/billing_settings":{"get":{"tags":["billing"],"summary":"Retrieve billing settings","description":"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.","operationId":"get_billing_settings_v1_billing_settings_get","parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}],"description":"The merchant (mch_...). Optional when a ZeroPoint-Account (or Stripe-Account) header names it, or when the platform has one merchant in this mode.","title":"Merchant Id"},"description":"The merchant (mch_...). Optional when a ZeroPoint-Account (or Stripe-Account) header names it, or when the platform has one merchant in this mode."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Billing Settings V1 Billing Settings Get"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"post":{"tags":["billing"],"summary":"Update billing settings","description":"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.","operationId":"update_billing_settings_v1_billing_settings_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request.","title":"Idempotency-Key"},"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Billing Settings V1 Billing Settings Post"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/subscriptions":{"post":{"tags":["subscriptions"],"summary":"Create a subscription","description":"Starts a monthly or annual subscription on a customer's saved card and charges the first period now. Amounts are the price's integer cents. Use it when your app already holds the customer's saved card (pm_...); to take a new card and start the plan in one step, use a checkout session with mode subscription instead. Arguments: merchant_id (optional: without it the ZeroPoint-Account header, else the platform's only merchant in this mode), customer (cus_...), items [{price}] (exactly one recurring price billed every 1 month or 1 year), default_payment_method (pm_..., required), promotion_code (promo_..., optional), metadata (up to 50 string pairs), payment_behavior (allow_incomplete, the default, or error_if_incomplete). Example: {customer: cus_123, items: [{price: price_456}], default_payment_method: pm_789, metadata: {user_id: u_42}}. Needs subscriptions:write and payment_methods:charge. The key is the Idempotency-Key header (required). Returns the subscription (id sub_...): status active when the first payment captured; incomplete when it was declined and payment_behavior is allow_incomplete (no access: ask for another card, then pay latest_invoice at least 60 seconds after the decline). A retry with the same key returns the same subscription and never charges twice, also after a 502 or a lost answer. Never retry with a new key: a new key is a new subscription. A payment whose outcome is unknown is never treated as declined: it answers 502 processor_unavailable or 409 invoice_reconciling, and the same key resumes it. Emits customer.subscription.created, then invoice.paid, invoice.payment_succeeded and customer.subscription.updated once the first payment captures. A retry also replays after billing was switched off for the merchant; only a new key is refused then. Billing runs in test mode in this release: renewals, retries and reminders happen when you advance a test clock, nothing renews on real time yet, and a live merchant is refused with billing_unavailable. A create that relied on the only-merchant default and is retried after a second merchant was added answers 400 Which merchant?: retry it with merchant_id or the header naming that merchant and it replays. Errors: idempotency_key_required, idempotency_key_reused (422); parameter_invalid, payment_method_required, price_not_recurring, price_interval_unsupported, proration_behavior_unsupported, billing_unavailable, test_clock_deleted (400); card_declined, duplicate_transaction, partial_approval, processor_rejected (402 with error_if_incomplete, naming subscription, invoice and payment; a card decline also names decline_code), payment_method_blocked (402: this card was hard declined at this merchant; nothing was sent; use another card); resource_missing (404); subscription_create_unresolved (409: a subscription for this customer is still waiting for its first payment's outcome; retrieve it, do not create another), subscription_exists (409: the merchant's subscription_guard found this customer's live one; named; nothing created), checkout_outcome_unknown (409: a checkout of this customer awaits its outcome; held_session_id), payment_method_unusable (409: nothing was sent), invoice_payment_in_progress, invoice_reconciling, payment_in_progress, merchant_unchargeable, subscription_create_refused (409, Retry-After); invoice_pay_limit (429: the card's attempt limits; Retry-After); processor_unavailable (502: the payment is pending; retry with the same key). Next step: GET /v1/subscriptions/{id}, or POST /v1/invoices/{id}/pay for latest_invoice.","operationId":"create_subscription_v1_subscriptions_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request.","title":"Idempotency-Key"},"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Subscription V1 Subscriptions Post"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The payment itself failed (type payment_error); branch on code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"502":{"description":"The payments network failed or gave no decision (processor_unavailable). The outcome may be unknown: a 5xx releases the Idempotency-Key, so retry with the same key and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"No processor is available for this merchant or deployment (processor_not_connected, sandbox_processor_unconfigured, connect_unavailable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["subscriptions"],"summary":"List subscriptions","description":"Lists subscriptions newest first. Use it to find a customer's subscriptions before creating another. Arguments: customer, status (one status, or all; default every status but canceled), price, merchant_id, limit (1 to 100, default 20), cursor, expand[] (data.latest_invoice, data.latest_invoice.payment_intent, data.customer, data.default_payment_method, data.items.data.price.product). With the ZeroPoint-Account (or Stripe-Account) header: only that merchant's subscriptions. Returns a list object of subscriptions with has_more and next_cursor. Errors: parameter_invalid (400) also when merchant_id and the ZeroPoint-Account header name different merchants; parameter_invalid (400), resource_missing (404: the merchant is not this key's). Next step: GET /v1/subscriptions/{id}.","operationId":"list_subscriptions_v1_subscriptions_get","parameters":[{"name":"customer","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Customer"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":24},{"type":"null"}],"title":"Status"}},{"name":"price","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Price"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Merchant Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page, default 20.","default":20,"title":"Limit"},"description":"Items per page, default 20."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"next_cursor from the previous page.","title":"Cursor"},"description":"next_cursor from the previous page."},{"name":"starting_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both.","title":"Starting After"},"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both."},{"name":"ending_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after.","title":"Ending Before"},"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Subscriptions V1 Subscriptions Get"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/subscriptions/{subscription_id}":{"get":{"tags":["subscriptions"],"summary":"Retrieve a subscription","description":"Reads one subscription. Use it to decide access: gate on status (active; past_due too if you give a grace period), never on current_period_end, which moves only when a renewal is paid. Arguments: subscription_id (sub_...), expand[] (latest_invoice, latest_invoice.payment_intent, customer, default_payment_method, items.data.price.product; any other path is parameter_unavailable). With the ZeroPoint-Account (or Stripe-Account) header, a subscription of another merchant is resource_missing. Returns the subscription: status, items.data[0].price, current_period_start and current_period_end (Unix seconds, also on items.data[0]), cancel_at_period_end, scheduled_change (a plan change waiting for the period end; its blocked_by is set while the duplicate guard would refuse it at the renewal), pending_update (an upgrade waiting for its payment), payment_hold (set while a charge's outcome is being confirmed: change nothing), latest_invoice and test_clock. Errors: resource_missing (404). Next step: GET /v1/invoices?subscription={id} for its invoices.","operationId":"get_subscription_v1_subscriptions__subscription_id__get","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","title":"Subscription Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Subscription V1 Subscriptions  Subscription Id  Get"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"post":{"tags":["subscriptions"],"summary":"Update a subscription","description":"Changes a subscription's plan, its cancel at period end, its saved card or its metadata. Use it for upgrades, downgrades, cancel at period end and undoing it, and a new default card. Arguments: subscription_id, items [{id: si_..., price: price_...}], change_timing (period_end, or now for an upgrade), proration_behavior (always_invoice, required for a change charged now), proration_date (Unix seconds pinned from a preview, at most 1 hour old), payment_behavior (pending_if_incomplete or left out), metadata (merged per key; \"\" removes a key), default_payment_method (pm_...), cancel_at_period_end (true or false). Send items on their own. Example upgrade: {items: [{id: si_123, price: price_premium}], proration_behavior: always_invoice}. A charged change needs payment_methods:charge. The key is the Idempotency-Key header (required). Returns the subscription. An upgrade (same interval, dearer price) or a monthly to annual switch is charged now: the prorated difference in integer cents (unused time on the current plan credited, only from money still held) is invoiced and charged to the saved card, and the plan changes only after that payment is proven captured; until then pending_update shows it, and a decline answers 402 and keeps the current plan. A monthly to annual switch starts the year now. A difference below the minimum charge (50 cents by default) applies the plan now with no charge and is added to the next renewal invoice. A downgrade, a lateral change or an annual to monthly switch is stored as scheduled_change and applied at current_period_end: the renewal is charged at the new price; nothing is charged or credited now. Asking for the price the subscription is already on changes nothing: it answers the subscription unchanged, with or without proration_behavior, charges nothing and keeps a scheduled_change (only cancel_scheduled_change removes one). A retry with the same key never charges twice; another key asking for another price while a change is being paid answers change_pending (the price it is already on still answers the subscription unchanged). cancel_at_period_end true keeps the subscription active until current_period_end and then ends it; while past_due, unpaid or incomplete it cancels now. false undoes it before the period ends. Nothing is refunded. Emits customer.subscription.updated (customer.subscription.deleted for an immediate cancel). Errors: idempotency_key_required, idempotency_key_reused (422); parameter_invalid, change_timing_unsupported, proration_behavior_required, proration_behavior_unsupported, price_not_recurring, price_interval_unsupported, billing_unavailable (400); card_declined, processor_rejected, payment_failed, payment_method_blocked (402: the plan did not change); resource_missing (404); subscription_inactive (409: the subscription has ended, or its period is over), subscription_past_due, change_pending, change_not_applied (409: the card was charged but the plan did not change; the payment is listed for a refund), change_expired, change_stale (409: the change was refused before anything was sent and is over 1 hour old, or another change replaced it; nothing was charged; start again with a new key), renewal_due (Retry-After 120), invoice_reconciling (Retry-After 300), invoice_payment_in_progress (Retry-After), merchant_unchargeable (409), subscription_changed (409, Retry-After 1: the subscription changed while the request ran; retry the same request); invoice_pay_limit (429, Retry-After); processor_unavailable (502: retry with the same key). Next step: GET /v1/subscriptions/{id}.","operationId":"update_subscription_v1_subscriptions__subscription_id__post","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","title":"Subscription Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request.","title":"Idempotency-Key"},"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Subscription V1 Subscriptions  Subscription Id  Post"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The payment itself failed (type payment_error); branch on code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"502":{"description":"The payments network failed or gave no decision (processor_unavailable). The outcome may be unknown: a 5xx releases the Idempotency-Key, so retry with the same key and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"No processor is available for this merchant or deployment (processor_not_connected, sandbox_processor_unconfigured, connect_unavailable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["subscriptions"],"summary":"Cancel a subscription now","description":"Cancels a subscription now. Use it only when access must end today; to end at the end of the paid period, set cancel_at_period_end instead. Arguments: subscription_id (sub_...). Returns the subscription with status canceled and ended_at set (an incomplete subscription ends incomplete_expired). Its open invoice is voided unless a payment on it is still being processed: that payment resolves on its own, and if it captured, the invoice is paid and kept. Nothing is refunded. A canceled subscription answers as it is. Emits customer.subscription.deleted. Errors: resource_missing (404); subscription_changed (409, Retry-After 1: the subscription changed while the request ran; retry the same request). Next step: none.","operationId":"cancel_subscription_v1_subscriptions__subscription_id__delete","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","title":"Subscription Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cancel Subscription V1 Subscriptions  Subscription Id  Delete"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/subscriptions/{subscription_id}/scheduled_change/cancel":{"post":{"tags":["subscriptions"],"summary":"Cancel a scheduled plan change","description":"Removes the plan change scheduled for the end of the current period. Use it when the customer takes back a downgrade before it applies. Arguments: subscription_id (sub_...). Returns the subscription, which renews on its current price. With no scheduled change, it answers the subscription unchanged. Emits customer.subscription.updated. While cancel_at_period_end is true it discards the change kept for an undo, for good, and sends no event (nothing public changed); the subscription still ends at period end. Errors: resource_missing (404); subscription_changed (409, Retry-After 1: the subscription changed while the request ran; retry the same request). Next step: GET /v1/subscriptions/{id}.","operationId":"cancel_scheduled_change_v1_subscriptions__subscription_id__scheduled_change_cancel_post","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","title":"Subscription Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cancel Scheduled Change V1 Subscriptions  Subscription Id  Scheduled Change Cancel Post"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/invoices":{"get":{"tags":["invoices"],"summary":"List invoices","description":"Lists invoices newest first. Use it to show a customer's billing history or to find an open invoice to pay. Arguments: customer, subscription, status (open, paid, void, uncollectible), limit, cursor, expand[] (data.customer, data.subscription, data.payment_intent). With the ZeroPoint-Account (or Stripe-Account) header: only that merchant's invoices. Returns a list object of invoices (amounts in integer cents) with has_more and next_cursor. Errors: parameter_invalid (400), resource_missing (404: the merchant is not this key's). Next step: GET /v1/invoices/{id}.","operationId":"list_invoices_v1_invoices_get","parameters":[{"name":"customer","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Customer"}},{"name":"subscription","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Subscription"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page, default 20.","default":20,"title":"Limit"},"description":"Items per page, default 20."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"next_cursor from the previous page.","title":"Cursor"},"description":"next_cursor from the previous page."},{"name":"starting_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both.","title":"Starting After"},"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both."},{"name":"ending_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after.","title":"Ending Before"},"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Invoices V1 Invoices Get"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/invoices/create_preview":{"post":{"tags":["invoices"],"summary":"Preview the next invoice or a plan change","description":"Returns the invoice the subscription's next renewal will charge, or the invoice a plan change would make now, computed by the same code as the charge. Use it to show the next charge, or the exact upgrade charge before the customer confirms; it creates, changes and charges nothing. Arguments: subscription (sub_...); for a plan change, subscription_details with items [{id: si_..., price: price_...}], proration_behavior (always_invoice, required for a change charged now) and proration_date (Unix seconds, optional). Example: {subscription: sub_123, subscription_details: {items: [{id: si_123, price: price_premium}], proration_behavior: always_invoice}}. A plan-change preview needs catalog:read as well as invoices:read. Returns an invoice object with no id and no status (Stripe's upcoming invoice). With no plan change: the next renewal, with a scheduled change due at the renewal and the discount window applied; an open invoice answers its amount due. With a plan change: plan_change says what the update would do (kind, timing now or period_end, effective_at, amount_due_now, carried_to_next_invoice, credit_not_kept), and subscription_proration_date is the instant it was prorated at. An upgrade or a monthly to annual switch answers the invoice the update would charge now (billing_reason subscription_update, the credit for unused time and the charge for the remaining time); amount_due is exactly what the update charges when sent within the hour with proration_date set to subscription_proration_date. A difference below the minimum charge is due on the next renewal, not now: amount_due is 0 and next_invoice shows that renewal with the carried line. When the credit for unused time is larger than the charge, the plan changes with nothing due and the leftover credit is not kept or refunded: total and amount_due are 0 and plan_change.credit_not_kept names that amount. A downgrade, a lateral change or an annual to monthly switch answers the next renewal invoice at the new price; plan_change.effective_at is when it takes effect and nothing is due now. The price the subscription is already on answers the next renewal unchanged. The same refusals as the update. Errors: parameter_invalid, proration_behavior_required, proration_behavior_unsupported, price_inactive, price_not_recurring, price_interval_unsupported, invoice_upcoming_none (the subscription will not renew: canceled, ending at period end, or not active) (400); insufficient_scope (403: a plan-change preview without catalog:read); resource_missing (404); subscription_past_due, subscription_inactive, change_pending, renewal_due, invoice_reconciling, invoice_payment_in_progress (409). Next step: GET /v1/subscriptions/{id}.","operationId":"create_preview_v1_invoices_create_preview_post","parameters":[{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicePreview"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Preview V1 Invoices Create Preview Post"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/invoices/{invoice_id}":{"get":{"tags":["invoices"],"summary":"Retrieve an invoice","description":"Reads one invoice. Use it to see what an invoice charged, its attempts and why it is still open. Arguments: invoice_id (in_...), expand[] (customer, subscription, payment_intent; any other path is parameter_unavailable). With the ZeroPoint-Account (or Stripe-Account) header, an invoice of another merchant is resource_missing. Returns the invoice: status (open, paid, void, uncollectible), total, amount_due and amount_paid in integer cents, billing_reason, lines, attempt_count, next_payment_attempt, last_payment_error, payment_intent (the pay_... payment) and missed_period (null today). Errors: resource_missing (404). Next step: POST /v1/invoices/{id}/pay for an open invoice.","operationId":"get_invoice_v1_invoices__invoice_id__get","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Invoice V1 Invoices  Invoice Id  Get"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/invoices/{invoice_id}/pay":{"post":{"tags":["invoices"],"summary":"Pay an open invoice now","description":"Charges an open invoice now on the subscription's saved card, or on another card. Use it when the customer fixes their card after a decline and wants to pay at once instead of waiting for the next scheduled retry. Arguments: invoice_id, payment_method (optional pm_... of the invoice's customer; the subscription's default card stays as it is), off_session (true, the default: the customer is not present; false: the customer is paying now). Needs subscriptions:write and payment_methods:charge. The key is the Idempotency-Key header (required). Returns the invoice, and only when it is paid; any other outcome is an error. A retry with the same key never charges twice, also after a 502; a retry while a payment is processing resumes that payment as it was sent. Every final answer (a decline included) is kept under the key: after the customer changes the card, use a new key. At most 3 unpaid sends of one card per invoice in 24 hours, 10 per card in 30 days, 60 seconds apart. A decline here never uses up a scheduled retry. Emits invoice.paid and invoice.payment_succeeded, or invoice.payment_failed. Errors: idempotency_key_required, idempotency_key_reused (422); parameter_invalid, billing_unavailable, payment_method_required (no default card and none named) (400); card_declined, duplicate_transaction, partial_approval, processor_rejected (402, naming invoice and payment; a card decline also names decline_code), payment_method_blocked (402: this card was hard declined at this merchant; nothing was sent; use another card); resource_missing (404); invoice_not_payable (not open, its period has ended, or not paid now), subscription_exists (409: a first invoice, and the guard found the customer's live one; named; nothing sent), invoice_payment_in_progress (Retry-After), invoice_reconciling (Retry-After 300: the outcome is not known; never retry with a new key), payment_method_unusable (nothing was sent), payment_in_progress (Retry-After), merchant_unchargeable (409); invoice_pay_limit (429, Retry-After); processor_unavailable (502: the payment is processing; retry with the same key, never a new one). Next step: GET /v1/subscriptions/{id}.","operationId":"pay_invoice_v1_invoices__invoice_id__pay_post","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request.","title":"Idempotency-Key"},"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvoicePay"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Pay Invoice V1 Invoices  Invoice Id  Pay Post"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The payment itself failed (type payment_error); branch on code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"502":{"description":"The payments network failed or gave no decision (processor_unavailable). The outcome may be unknown: a 5xx releases the Idempotency-Key, so retry with the same key and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"No processor is available for this merchant or deployment (processor_not_connected, sandbox_processor_unconfigured, connect_unavailable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/invoices/{invoice_id}/void":{"post":{"tags":["invoices"],"summary":"Void an open invoice","description":"Voids an open invoice nothing was paid on. Use it to forgive a renewal you will not collect. Arguments: invoice_id (in_...). Returns the invoice with status void. A renewal invoice's period is forgiven (the subscription advances and is active); a first invoice ends its subscription incomplete_expired; a plan change invoice cancels that change. A void invoice answers as it is. This voids the invoice, not a card payment: a captured payment is reversed with a void before settlement or a refund after it. Emits invoice.voided. Errors: resource_missing (404); invoice_not_open (a paid or uncollectible invoice is never voided), invoice_payment_in_progress (Retry-After), invoice_reconciling (Retry-After 300), invoice_changed (409, Retry-After 1: retry the same request). Next step: GET /v1/subscriptions/{id}.","operationId":"void_invoice_v1_invoices__invoice_id__void_post","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvoiceVoid"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Void Invoice V1 Invoices  Invoice Id  Void Post"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/test_helpers/test_clocks":{"post":{"tags":["test helpers"],"summary":"Create a test clock","description":"Creates a test clock frozen at frozen_time. Customers bound to it, and their subscriptions, live on the clock's time instead of the real time. Test mode only; a clock never touches a live merchant. Use it to run renewals, declines, retries and reminders in seconds: create the clock, create a customer with test_clock, subscribe it, then advance the clock. Arguments: frozen_time (Unix seconds), name (optional). Example: {frozen_time: 1798761600, name: renewal test}. Returns the test_helpers.test_clock (id clock_..., status ready, frozen_time). On a clock, an invoice's created, its periods and the subscription's dates are clock time; an event's own created and payments are real time. A platform keeps at most 100 clocks; a clock is deleted 30 days after it was created. Errors: test_mode_only, parameter_invalid (400); resource_limit_exceeded (409: delete a clock first). Next step: POST /v1/customers with test_clock, then POST /v1/subscriptions.","operationId":"create_test_clock_v1_test_helpers_test_clocks_post","parameters":[{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestClockCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Test Clock V1 Test Helpers Test Clocks Post"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"get":{"tags":["test helpers"],"summary":"List test clocks","description":"Test mode only. The platform's test clocks, newest first. Arguments: limit (1 to 100, default 10). Errors: test_mode_only.","operationId":"list_test_clocks_v1_test_helpers_test_clocks_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Limit"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Test Clocks V1 Test Helpers Test Clocks Get"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/test_helpers/test_clocks/{test_clock_id}":{"get":{"tags":["test helpers"],"summary":"Retrieve a test clock","description":"Reads one test clock. Test mode only. Use it to poll an advance until status is ready. Arguments: test_clock_id (clock_...). Returns the clock: status (ready, advancing, or internal_failure: it can never advance again, create a new one) and frozen_time. A ready clock short of its target says why in status_details.last_advance.stopped: attempt_in_flight (a charge's answer is still coming: advance again later; after an injected processor_unavailable, resolve the invoice's hold), invoice_held (resolve the invoice's hold), billing_paused, error. Errors: test_mode_only (400); resource_missing (404). Next step: GET /v1/subscriptions?customer=... to see what the advance did.","operationId":"get_test_clock_v1_test_helpers_test_clocks__test_clock_id__get","parameters":[{"name":"test_clock_id","in":"path","required":true,"schema":{"type":"string","title":"Test Clock Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Test Clock V1 Test Helpers Test Clocks  Test Clock Id  Get"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"delete":{"tags":["test helpers"],"summary":"Delete a test clock","description":"Cancels every subscription on a test clock (the normal cancel, in the clock's time), deletes its customers where a customer can be deleted, and deletes the clock. Test mode only. Use it to clean up after a rehearsal, or when a platform reaches its 100 clocks. Arguments: test_clock_id (clock_...). Returns the deleted clock; the clock answers 404 from then on. History (invoices, payments, events) is kept. A customer that could not be deleted stays on the deleted clock and cannot start new subscriptions (test_clock_deleted, 400): create a new customer for the next rehearsal. Errors: test_mode_only (400); resource_missing (404); test_clock_advancing (409, Retry-After: wait until the advance ends). Next step: none.","operationId":"delete_test_clock_v1_test_helpers_test_clocks__test_clock_id__delete","parameters":[{"name":"test_clock_id","in":"path","required":true,"schema":{"type":"string","title":"Test Clock Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Test Clock V1 Test Helpers Test Clocks  Test Clock Id  Delete"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/test_helpers/test_clocks/{test_clock_id}/advance":{"post":{"tags":["test helpers"],"summary":"Advance a test clock","description":"Starts moving a test clock forward to frozen_time and answers at once with status advancing. A background worker walks every renewal, retry, reminder and period end in between with the same billing code as real time: real sandbox charges, real events. Test mode only. Use it to reach a renewal: advance to just past current_period_end, then poll the clock until status is ready. Arguments: test_clock_id, frozen_time (Unix seconds: later than the current frozen_time, and at most two intervals of the shortest subscription on the clock ahead or 13 months, whichever is more; two years with none). Returns the clock with status advancing. Errors: test_mode_only, parameter_invalid (400); resource_missing (404); test_clock_advancing, test_clock_advance_limit (3 clocks of the platform are advancing; Retry-After), test_clock_internal_failure (create a new clock), test_clock_subscription_time_base (409: a subscription on the clock was created in another time base and would never renew; the message names it); billing_paused (503). Next step: GET /v1/test_helpers/test_clocks/{id} until status is ready.","operationId":"advance_test_clock_v1_test_helpers_test_clocks__test_clock_id__advance_post","parameters":[{"name":"test_clock_id","in":"path","required":true,"schema":{"type":"string","title":"Test Clock Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestClockAdvance"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Advance Test Clock V1 Test Helpers Test Clocks  Test Clock Id  Advance Post"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"503":{"description":"No processor is available for this merchant or deployment (processor_not_connected, sandbox_processor_unconfigured, connect_unavailable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/test_helpers/payment_methods/{payment_method_id}/fail_next_charges":{"post":{"tags":["test helpers"],"summary":"Fail the next billing charges of a card","description":"Makes the next count billing charges of a saved card (a subscription's first payment, a renewal, a retry) end without reaching the processor. Test mode only; a live card is refused and never affected. Use it with a test clock to rehearse failed renewals: inject, advance past the renewal, watch the events. Arguments: payment_method_id (pm_...), outcome (card_declined, duplicate_transaction, processor_unavailable, or a hard decline: lost_card, stolen_card, revocation_of_authorization, stop_payment_order, transaction_not_allowed), count (1 to 10, default 1). Returns {object: test_helpers.charge_failure, payment_method, outcome, remaining}; a second call replaces the first. card_declined is a decline: the invoice goes past_due and is retried on schedule. A hard decline runs the real hard-decline path: the invoice goes past_due, requires_new_payment_method is true, and the card is blocked in the decline's scope (lost_card and stolen_card: the card at this merchant; revocation_of_authorization and stop_payment_order: this subscription; transaction_not_allowed: this invoice) until lift_card_block lifts it; another card is not blocked. duplicate_transaction is never counted as a decline and never retried automatically: the invoice is held. processor_unavailable leaves the outcome unknown: the payment stays pending and the invoice is held. End either hold with resolve_invoice_hold. Events and webhooks are the real ones. There is no success outcome: successes come from the card. Errors: test_mode_only, parameter_invalid (400); resource_missing (404). Next step: advance a test clock past the renewal.","operationId":"fail_next_charges_v1_test_helpers_payment_methods__payment_method_id__fail_next_charges_post","parameters":[{"name":"payment_method_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Method Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FailNextCharges"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Fail Next Charges V1 Test Helpers Payment Methods  Payment Method Id  Fail Next Charges Post"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/test_helpers/payment_methods/{payment_method_id}/lift_card_block":{"post":{"tags":["test helpers"],"summary":"Lift the hard-decline blocks of a test card","description":"Lifts every hard-decline block of this card number at its merchant, whoever saved it (every scope: card, subscription, invoice), so the card can be charged again. Test mode only; a live card's block is lifted only by the ZeroPoint operator. Use it after rehearsing a hard decline (fail_next_charges lost_card and the others), so the sandbox's approving test card is not refused in later tests. Arguments: payment_method_id (pm_...). Returns {object: test_helpers.card_block_lift, payment_method, lifted (scope, decline_code, subscription, invoice of each block lifted), lifted_count}; 0 when the card had no block. Each lift is recorded in the subscription's history. It does not pay anything: a past_due invoice stays past_due until its next retry, pay_invoice or the portal's Pay now. Errors: test_mode_only (400); resource_missing (404). Next step: pay the open invoice, or advance the clock to its next retry.","operationId":"lift_card_block_v1_test_helpers_payment_methods__payment_method_id__lift_card_block_post","parameters":[{"name":"payment_method_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Method Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Lift Card Block V1 Test Helpers Payment Methods  Payment Method Id  Lift Card Block Post"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/test_helpers/invoices/{invoice_id}/resolve_hold":{"post":{"tags":["test helpers"],"summary":"Resolve an injected or unverified hold","description":"Ends a test-mode hold: one fail_next_charges processor_unavailable made (at once: nothing was sent, so there is no 15 minute wait), or a test clock invoice's hold whose payment ended processor_unverified or duplicate_transaction while the processor shows no sale. Test mode only. Use it after an injected unknown outcome, to continue the rehearsal as if the processor had proven no sale. Arguments: invoice_id (in_...). Returns the invoice: the attempt is not collected, nothing is counted as a decline, and a renewal is retried on schedule. Never a sale. There is no outcome to choose: the attempt always ends not collected. To rehearse a decline, use fail_next_charges card_declined instead. Errors: test_mode_only, invoice_hold_not_injected (400); resource_missing (404); invoice_payment_in_progress (409: Retry-After), invoice_hold_has_sale (409: the processor has the sale; advance the clock and it is recorded, or behind a duplicate screen only ZeroPoint rules: delete the clock), invoice_hold_hard_decline (409: the processor shows a hard decline; advance the clock and the hold phase records the decline and blocks the card), invoice_hold_unverified (409: the read-back failed; Retry-After). Next step: advance the test clock again.","operationId":"resolve_injected_hold_v1_test_helpers_invoices__invoice_id__resolve_hold_post","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Resolve Injected Hold V1 Test Helpers Invoices  Invoice Id  Resolve Hold Post"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/test_helpers/checkout/sessions/{session_id}/confirm":{"post":{"tags":["test helpers"],"summary":"Pay a checkout session with a test card","description":"Pays an open checkout session (payment or subscription mode) with a test card, with no browser. Test mode only; nothing reaches the processor. Use it to script a checkout. Arguments: session_id (cs_...), card (default tok_visa; or tok_chargeDeclined, tok_chargeDeclinedInsufficientFunds, tok_chargeDeclinedLostCard, tok_chargeDeclinedStolenCard), email (needed when the session names no customer email). Returns the session, complete. Page rules apply (duplicate guard, attempt ceiling, holds); a decline leaves it open. Its processor_transaction_id starts zp_test_txn_. The key is the Idempotency-Key header (required). Errors: idempotency_key_required (400). test_mode_only, parameter_invalid, parameter_missing (400); a decline code (402); resource_missing (404); checkout_session_not_open, checkout_attempts_exhausted, checkout_outcome_unknown, checkout_subscription_refused, checkout_amount_changed (409); a promotion code refusal. Next step: GET /v1/checkout/sessions/{id}; the webhooks are the real ones.","operationId":"confirm_checkout_session_v1_test_helpers_checkout_sessions__session_id__confirm_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request.","title":"Idempotency-Key"},"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutConfirm"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Confirm Checkout Session V1 Test Helpers Checkout Sessions  Session Id  Confirm Post"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The payment itself failed (type payment_error); branch on code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/billing_portal/sessions":{"post":{"tags":["billing_portal","billing_portal"],"summary":"Create a customer portal session","description":"Creates a short-lived link to the hosted customer portal, where your customer sees their subscriptions and next charge, cancels at period end (and undoes it), updates their card and pays an open invoice. Use it behind a Manage billing button in your signed-in app, one session per click. Arguments: customer (cus_...), return_url (optional: https, http for localhost in test mode; in live mode the host must be on your live redirect list). Returns a billing_portal.session: id (bps_...), object, created, customer, livemode, return_url, url, expires_at. Redirect your signed-in user to url at once: it works once and expires 5 minutes after creation. Never email it, store it or show it. Each call makes a new session. ZeroPoint sends no email to your customers: send your own from the billing events. Errors: parameter_invalid, url_invalid (400); resource_missing (404, also for a deleted customer). Next step: redirect the browser to url.","operationId":"create_portal_session_v1_billing_portal_sessions_post","parameters":[{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalSessionCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Portal Session V1 Billing Portal Sessions Post"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/payment_methods":{"post":{"tags":["payment_methods"],"summary":"Save a card","description":"Saves a card for a customer from a Collect nonce, with no charge. In test mode the nonce may be a test card token instead, with no browser: tok_visa approves every charge; tok_chargeDeclined, tok_chargeDeclinedInsufficientFunds, tok_chargeDeclinedLostCard and tok_chargeDeclinedStolenCard decline every charge with that reason. Present the merchant's terms to the cardholder first. Only a nonce from a typed card form may be sent here: never a wallet nonce (Apple Pay, Google Pay), which cannot be saved. Metadata keys token, token_enc, nonce, consent, secret, client_secret, access_token and refresh_token (any case) are reserved. Arguments: merchant_id (optional: without it the ZeroPoint-Account header, else the platform's only merchant in this mode), customer, nonce, consent {agreed_at, reference}, metadata. Returns the payment method; the processor token is never returned. Errors: idempotency_key_required, parameter_invalid, resource_missing, test_mode_only (400: a test card token with a live key or merchant), card_not_saved (402), nonce_invalid (402), nonce_already_used (409), resource_limit_exceeded and sandbox_daily_limit_exceeded (409, test mode), save_attempt_limit_exceeded (409, live mode), card_on_file_unavailable (400, live mode), sandbox_processor_unconfigured (503), processor_unavailable (502; nothing was stored, retry once with the same Idempotency-Key and nonce). Next step: charge it with POST /v1/payments.","operationId":"create_payment_method_v1_payment_methods_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request.","title":"Idempotency-Key"},"description":"Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The payment itself failed (type payment_error); branch on code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"502":{"description":"The payments network failed or gave no decision (processor_unavailable). The outcome may be unknown: a 5xx releases the Idempotency-Key, so retry with the same key and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"No processor is available for this merchant or deployment (processor_not_connected, sandbox_processor_unconfigured, connect_unavailable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["payment_methods"],"summary":"List payment methods","description":"Lists saved cards newest first. Arguments: merchant_id, customer, include_deleted (default false), limit, cursor, type (card only, Stripe's filter: every saved method is a card). Returns a list of payment methods. Errors: parameter_invalid. Next step: GET /v1/payment_methods/{id}.","operationId":"list_payment_methods_v1_payment_methods_get","parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Merchant Id"}},{"name":"customer","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Customer"}},{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Deleted"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"const":"card","type":"string"},{"type":"null"}],"title":"Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page, default 20.","default":20,"title":"Limit"},"description":"Items per page, default 20."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"next_cursor from the previous page.","title":"Cursor"},"description":"next_cursor from the previous page."},{"name":"starting_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both.","title":"Starting After"},"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both."},{"name":"ending_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after.","title":"Ending Before"},"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOut_PaymentMethodOut_"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/customers/{customer_id}/payment_methods":{"get":{"tags":["payment_methods"],"summary":"List a customer's payment methods","description":"Lists one customer's saved cards newest first: Stripe's path for the same list as GET /v1/payment_methods?customer=. Arguments: customer_id (cus_...), include_deleted (default false), limit, cursor or starting_after. Returns a list of payment methods. Errors: resource_missing, parameter_invalid. Next step: GET /v1/payment_methods/{id}.","operationId":"list_customer_payment_methods_v1_customers__customer_id__payment_methods_get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"title":"Customer Id"}},{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Deleted"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page, default 20.","default":20,"title":"Limit"},"description":"Items per page, default 20."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"next_cursor from the previous page.","title":"Cursor"},"description":"next_cursor from the previous page."},{"name":"starting_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both.","title":"Starting After"},"description":"Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both."},{"name":"ending_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after.","title":"Ending Before"},"description":"Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after."},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOut_PaymentMethodOut_"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/payment_methods/{payment_method_id}":{"get":{"tags":["payment_methods"],"summary":"Retrieve a payment method","description":"Returns one saved card, deleted ones included. Arguments: payment_method_id (pm_...). Returns the payment method with its computed status. Errors: resource_missing. Next step: charge it, or delete it.","operationId":"get_payment_method_v1_payment_methods__payment_method_id__get","parameters":[{"name":"payment_method_id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"title":"Payment Method Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}},"delete":{"tags":["payment_methods"],"summary":"Delete a payment method","description":"Stops using a saved card: ZeroPoint erases its token locally and can never charge it again (the processor has no delete call, so this is not a processor-side delete). The method stays readable with status deleted, and past payments keep their payment_method. Deleting a deleted method returns it again (200); no Idempotency-Key is needed. Arguments: payment_method_id (pm_...). Returns the payment method with status deleted and customer null. Errors: resource_missing, payment_method_in_use (409; a payment still needs the card: with Retry-After when a pending payment or one still being recorded names it, which ends within the pending window (15 minutes by default; the message states it), or when the in-use check could not run; without it when another use, such as a subscription's default, holds it). Next step: save a new card with POST /v1/payment_methods to replace it. POST /v1/payment_methods/{id}/detach is the same operation under Stripe's name.","operationId":"delete_payment_method_v1_payment_methods__payment_method_id__delete","parameters":[{"name":"payment_method_id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"title":"Payment Method Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/v1/payment_methods/{payment_method_id}/detach":{"post":{"tags":["payment_methods"],"summary":"Detach a payment method (Stripe's name for delete)","description":"Stops using a saved card: ZeroPoint erases its token locally and can never charge it again (the processor has no delete call, so this is not a processor-side delete). The method stays readable with status deleted, and past payments keep their payment_method. Deleting a deleted method returns it again (200); no Idempotency-Key is needed. Arguments: payment_method_id (pm_...). Returns the payment method with status deleted and customer null. Errors: resource_missing, payment_method_in_use (409; a payment still needs the card: with Retry-After when a pending payment or one still being recorded names it, which ends within the pending window (15 minutes by default; the message states it), or when the in-use check could not run; without it when another use, such as a subscription's default, holds it). Next step: save a new card with POST /v1/payment_methods to replace it. POST /v1/payment_methods/{id}/detach is the same operation under Stripe's name.","operationId":"delete_payment_method_v1_payment_methods__payment_method_id__detach_post","parameters":[{"name":"payment_method_id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"title":"Payment Method Id"}},{"name":"ZeroPoint-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.","title":"Zeropoint-Account"},"description":"Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header."},{"name":"Stripe-Account","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).","title":"Stripe-Account"},"description":"Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodOut"}}}},"400":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such resource for this platform (resource_missing), or another not_found code this operation's description lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests (rate_limited). Wait for the Retry-After header, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/sandbox/webhook-sink":{"post":{"tags":["sandbox"],"summary":"A public webhook target that always answers 200","description":"Sandbox helper. Register https://<this host>/sandbox/webhook-sink as a webhook URL to watch deliveries succeed before your own receiver exists. Arguments: any JSON body. Returns {received:true, signature:<ZeroPoint-Signature header>}. Errors: none. Next step: replace it with your real receiver and verify signatures there.","operationId":"webhook_sink_sandbox_webhook_sink_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Webhook Sink Sandbox Webhook Sink Post"}}}},"413":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"AppliesTo":{"properties":{"products":{"items":{"type":"string","maxLength":40},"type":"array","maxItems":100,"minItems":1,"title":"Products","description":"Product ids."}},"additionalProperties":false,"type":"object","required":["products"],"title":"AppliesTo"},"AppliesToOut":{"properties":{"products":{"items":{"type":"string"},"type":"array","title":"Products","description":"Product ids the coupon is limited to."}},"type":"object","required":["products"],"title":"AppliesToOut"},"BillingDetails":{"properties":{"email":{"type":"null","title":"Email","description":"Always null in this release."},"name":{"type":"null","title":"Name","description":"Always null in this release."}},"type":"object","title":"BillingDetails"},"BillingSettingsUpdate":{"properties":{"merchant_id":{"anyOf":[{"type":"string","maxLength":40,"minLength":1},{"type":"null"}],"title":"Merchant Id","description":"The merchant (mch_...). Optional when a ZeroPoint-Account (or Stripe-Account) header names it, or when the platform has one merchant in this mode."},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone","description":"IANA time zone for subscriptions created from now on, e.g. UTC.","examples":["America/Chicago"]},"retry_offsets_s":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Retry Offsets S","description":"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.","examples":[[86400,259200,604800]]},"final_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Final Action","description":"cancel or unpaid."},"upcoming_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Upcoming Days","description":"Days before renewal for invoice.upcoming, 0 to 30."},"portal":{"anyOf":[{"additionalProperties":{"type":"boolean"},"type":"object"},{"type":"null"}],"title":"Portal","description":"Portal switches: cancel, update_card, invoice_history, keep_plan (cancel a scheduled downgrade; unset, it follows cancel)."},"min_retry_gap_s":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Retry Gap S","description":"Minimum seconds between two retries: at least the merchant's limit (86400 unless ZeroPoint set more), at most 604800."},"subscription_guard":{"anyOf":[{"type":"string","enum":["off","price","product","customer"]},{"type":"null"}],"title":"Subscription Guard","description":"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."}},"additionalProperties":false,"type":"object","title":"BillingSettingsUpdate"},"CheckoutAutomaticTaxIn":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"Only false is accepted; no tax is computed."}},"additionalProperties":false,"type":"object","required":["enabled"],"title":"CheckoutAutomaticTaxIn"},"CheckoutAutomaticTaxOut":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"additionalProperties":false,"type":"object","required":["enabled"],"title":"CheckoutAutomaticTaxOut"},"CheckoutConfirm":{"properties":{"card":{"type":"string","maxLength":60,"minLength":1,"title":"Card","description":"A test card token, default tok_visa.","default":"tok_visa"},"email":{"anyOf":[{"type":"string","maxLength":254,"minLength":1},{"type":"null"}],"title":"Email","description":"The buyer's email, when the session names none."}},"additionalProperties":false,"type":"object","title":"CheckoutConfirm"},"CheckoutDiscountOut":{"properties":{"coupon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coupon"},"promotion_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promotion Code"}},"additionalProperties":false,"type":"object","required":["coupon","promotion_code"],"title":"CheckoutDiscountOut"},"CheckoutLineItemIn":{"properties":{"price":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price","description":"A catalog price of this merchant (price_...): one-time in payment mode, recurring (month or year, interval_count 1) in subscription mode. Its amount and product name are copied onto the session at create."},"price_data":{"anyOf":[{"$ref":"#/components/schemas/CheckoutPriceDataIn"},{"type":"null"}],"description":"The price of this line, set inline."},"quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quantity","description":"1 to 999 with price_data; exactly 1 with price.","examples":[1]},"adjustable_quantity":{"anyOf":[{"$ref":"#/components/schemas/CheckoutToggleIn"},{"type":"null"}],"description":"Only {enabled false} (Stripe's default): the buyer cannot change the quantity on the page. enabled true is refused (parameter_unknown)."}},"additionalProperties":false,"type":"object","title":"CheckoutLineItemIn"},"CheckoutLineItemListOut":{"properties":{"object":{"type":"string","const":"list","title":"Object","default":"list"},"data":{"items":{"$ref":"#/components/schemas/CheckoutLineItemOut"},"type":"array","title":"Data"},"has_more":{"type":"boolean","title":"Has More"},"url":{"type":"string","title":"Url","description":"GET this path for the lines as a paginated list."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as ?cursor= to fetch the next page, or null on the last page."}},"additionalProperties":false,"type":"object","required":["data","has_more","url","next_cursor"],"title":"CheckoutLineItemListOut","description":"GET /v1/checkout/sessions/{id}/line_items: the list object with our ``next_cursor``."},"CheckoutLineItemOut":{"properties":{"object":{"type":"string","const":"item","title":"Object","default":"item"},"id":{"type":"string","title":"Id","description":"Line item id, prefixed li_."},"description":{"type":"string","title":"Description","description":"The product name (Stripe's default), for catalog and inline lines alike."},"product_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Description","description":"ZeroPoint addition: the product's own description (price_data.product_data.description on an inline line, the catalog product's description at create on a price line), shown under the name on the page; null when there is none."},"quantity":{"type":"integer","title":"Quantity"},"price":{"$ref":"#/components/schemas/CheckoutLinePriceOut"},"currency":{"type":"string","title":"Currency"},"amount_subtotal":{"type":"integer","title":"Amount Subtotal","description":"Integer cents, before the discount."},"amount_discount":{"type":"integer","title":"Amount Discount","description":"Integer cents."},"amount_tax":{"type":"integer","title":"Amount Tax","description":"Always 0: no tax is computed."},"amount_total":{"type":"integer","title":"Amount Total","description":"Integer cents, after the discount."}},"additionalProperties":false,"type":"object","required":["id","description","product_description","quantity","price","currency","amount_subtotal","amount_discount","amount_tax","amount_total"],"title":"CheckoutLineItemOut","description":"Stripe's checkout line item (``object: \"item\"``)."},"CheckoutLinePriceOut":{"properties":{"object":{"type":"string","const":"price","title":"Object","default":"price"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"price_... for a catalog price; null for price_data."},"created":{"type":"integer","title":"Created","description":"Unix seconds."},"livemode":{"type":"boolean","title":"Livemode"},"merchant_id":{"type":"string","title":"Merchant Id"},"product":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product","description":"prod_... for a catalog price; null for price_data."},"active":{"type":"boolean","title":"Active"},"type":{"type":"string","enum":["one_time","recurring"],"title":"Type"},"billing_scheme":{"type":"string","const":"per_unit","title":"Billing Scheme","default":"per_unit"},"currency":{"type":"string","title":"Currency"},"unit_amount":{"type":"integer","title":"Unit Amount","description":"Integer cents."},"recurring":{"anyOf":[{"$ref":"#/components/schemas/RecurringOut"},{"type":"null"}]},"lookup_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lookup Key"},"nickname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nickname"},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata"},"stripe_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Id"}},"additionalProperties":false,"type":"object","required":["id","created","livemode","merchant_id","product","active","type","currency","unit_amount","recurring","lookup_key","nickname","metadata","stripe_id"],"title":"CheckoutLinePriceOut","description":"Stripe's line item ``price``: a price object, with the fields of GET /v1/prices/{id}.\n\nFor a catalog ``price`` line it is that price as it was when the session was created (the\nsession never re-reads the catalog). For a ``price_data`` line it is built from the line\nitself: ``id`` and ``product`` are null and ``active`` is false (Stripe's inline prices\nare inactive too)."},"CheckoutPaymentIntentDataIn":{"properties":{"metadata":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Metadata","description":"Copied onto the payment the session creates, over the session's own metadata (a key in both takes this value). The same rules as metadata; together at most 50 keys."},"capture_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Capture Method","description":"automatic only (Stripe's default): the payment is captured when the buyer pays. manual and automatic_async are refused (parameter_unknown)."}},"additionalProperties":false,"type":"object","title":"CheckoutPaymentIntentDataIn"},"CheckoutPriceDataIn":{"properties":{"currency":{"type":"string","title":"Currency","description":"usd only.","examples":["usd"]},"unit_amount":{"type":"integer","title":"Unit Amount","description":"Integer cents, 0 to 99,999,999. The session total must be at least 1.","examples":[1500]},"product_data":{"$ref":"#/components/schemas/CheckoutProductDataIn"},"recurring":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Recurring","description":"Not available in this version (parameter_unavailable)."}},"additionalProperties":false,"type":"object","required":["currency","unit_amount","product_data"],"title":"CheckoutPriceDataIn"},"CheckoutProductDataIn":{"properties":{"name":{"type":"string","title":"Name","description":"Shown on the page and the line item, 1 to 120 characters."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Up to 500 characters."}},"additionalProperties":false,"type":"object","required":["name"],"title":"CheckoutProductDataIn"},"CheckoutSessionCreate":{"properties":{"merchant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id","description":"The merchant taking the payment (mch_...). Optional: without it, the ZeroPoint-Account header (Stripe-Account is accepted too), else the platform's only merchant in this mode."},"success_url":{"type":"string","title":"Success Url","description":"Where the buyer goes after paying: https, at most 2,000 characters. The literal {CHECKOUT_SESSION_ID} is replaced with the session id.","examples":["https://example.com/thanks?session_id={CHECKOUT_SESSION_ID}"]},"line_items":{"items":{"$ref":"#/components/schemas/CheckoutLineItemIn"},"type":"array","title":"Line Items","description":"1 to 100 lines."},"mode":{"type":"string","title":"Mode","description":"payment (a one-time charge) or subscription (exactly one line with a recurring catalog price and quantity 1; the buyer's card is saved and charged, and the subscription renews on it).","default":"payment"},"cancel_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Url","description":"Optional back link shown on the page: https."},"expires_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires At","description":"Unix seconds, 30 minutes to 24 hours from now. Default 24 hours."},"client_reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Reference Id","description":"Your order or user id, 1 to 200 characters; in subscription mode a stable id for the customer (a per-order or per-cart id leaves the subscription guard nothing to match), compared exactly (case and spaces count). While another session of this merchant with the same value is waiting for its payment to be confirmed, create answers 409 checkout_outcome_unknown naming it in held_session_id."},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email","description":"Prefills the page's email field. At most 254 characters."},"customer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer","description":"A customer of this merchant (cus_...), not deleted. Send customer or customer_email, not both."},"customer_creation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Creation","description":"Payment mode only: if_required (default) or always. always creates a customer from the buyer's email when the session completes, unless customer is set. Subscription mode always creates one at the buyer's first confirm (unless customer is set) and refuses this field, as Stripe does."},"allow_promotion_codes":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Promotion Codes","description":"true shows a promotion code field on the page. Needs exactly one line, with a catalog price."},"discounts":{"anyOf":[{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"},{"type":"null"}],"title":"Discounts","description":"At most one [{\"promotion_code\": \"promo_...\"}], applied at create. Needs exactly one line, with a catalog price."},"automatic_tax":{"anyOf":[{"$ref":"#/components/schemas/CheckoutAutomaticTaxIn"},{"type":"null"}]},"metadata":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Metadata","description":"Up to 50 string pairs, echoed back."},"payment_intent_data":{"anyOf":[{"$ref":"#/components/schemas/CheckoutPaymentIntentDataIn"},{"type":"null"}],"description":"Payment mode: only metadata, copied onto the payment."},"subscription_data":{"anyOf":[{"$ref":"#/components/schemas/CheckoutSubscriptionDataIn"},{"type":"null"}],"description":"Subscription mode only: {metadata: {...}}, copied onto the subscription. Every other key (trials included) answers parameter_unavailable."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","description":"usd only (the line items' currency)."},"payment_method_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Payment Method Types","description":"[\"card\"] only: the page takes cards and the wallets it offers."},"ui_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ui Mode","description":"hosted_page (or hosted) only: the ZeroPoint hosted page."},"billing_address_collection":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Address Collection","description":"auto only (Stripe's default): the card form asks for the ZIP code, as it always does. required is refused (parameter_unknown): the page does not collect a billing address."},"locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locale","description":"auto only (Stripe's default): the page shows its own language. Any other locale is refused (parameter_unknown)."},"submit_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Submit Type","description":"auto only (Stripe's default): the page sets its own button wording. pay, book, donate and subscribe are refused (parameter_unknown)."},"payment_method_collection":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method Collection","description":"always only (Stripe's default): the page asks for a card. In payment mode it cannot be sent with allow_promotion_codes true, because a 100 percent off code completes a $0 order with no card (parameter_invalid). if_required is refused (parameter_unknown)."},"phone_number_collection":{"anyOf":[{"$ref":"#/components/schemas/CheckoutToggleIn"},{"type":"null"}]},"tax_id_collection":{"anyOf":[{"$ref":"#/components/schemas/CheckoutToggleIn"},{"type":"null"}]},"invoice_creation":{"anyOf":[{"$ref":"#/components/schemas/CheckoutToggleIn"},{"type":"null"}]},"adaptive_pricing":{"anyOf":[{"$ref":"#/components/schemas/CheckoutToggleIn"},{"type":"null"}]},"expand":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Expand","description":"Optional: line_items (always inline, so a no-op), customer, subscription, invoice and payment_intent, as on retrieve. Any other value answers 400 parameter_unavailable."}},"additionalProperties":false,"type":"object","required":["success_url","line_items"],"title":"CheckoutSessionCreate"},"CheckoutSessionLineItemsOut":{"properties":{"object":{"type":"string","const":"list","title":"Object","default":"list"},"data":{"items":{"$ref":"#/components/schemas/CheckoutLineItemOut"},"type":"array","title":"Data"},"has_more":{"type":"boolean","title":"Has More"},"url":{"type":"string","title":"Url","description":"GET this path for the lines as a paginated list."}},"additionalProperties":false,"type":"object","required":["data","has_more","url"],"title":"CheckoutSessionLineItemsOut","description":"The session's ``line_items``: Stripe's list object. Every line is included (at most\n100), so has_more is false; ``url`` pages them one by one."},"CheckoutSessionOut":{"properties":{"object":{"type":"string","const":"checkout.session","title":"Object","default":"checkout.session"},"id":{"type":"string","title":"Id","description":"Session id, prefixed cs_. Not a secret."},"livemode":{"type":"boolean","title":"Livemode"},"created":{"type":"integer","title":"Created","description":"Unix seconds."},"expires_at":{"type":"integer","title":"Expires At","description":"Unix seconds."},"merchant_id":{"type":"string","title":"Merchant Id"},"mode":{"type":"string","enum":["payment","subscription"],"title":"Mode"},"status":{"type":"string","enum":["open","complete","expired"],"title":"Status"},"payment_status":{"type":"string","enum":["unpaid","processing","paid","no_payment_required"],"title":"Payment Status","description":"processing: an attempt is in flight, or its outcome is not confirmed and the session is held. A held session accepts no card and is never expired by time; it must be resolved (the capture proven, which completes it, or proven not taken, which expires it). Do not create a new session for the same order while one is held: a new session is a new charge."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"The hosted payment page while status is open; null after. Send the buyer here. Treat it as a secret: anyone holding it can open the page."},"success_url":{"type":"string","title":"Success Url"},"cancel_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Url"},"currency":{"type":"string","title":"Currency"},"line_items":{"$ref":"#/components/schemas/CheckoutSessionLineItemsOut"},"amount_subtotal":{"type":"integer","title":"Amount Subtotal","description":"Integer cents."},"amount_total":{"type":"integer","title":"Amount Total","description":"Integer cents, computed on the server."},"total_details":{"$ref":"#/components/schemas/CheckoutTotalDetailsOut"},"automatic_tax":{"$ref":"#/components/schemas/CheckoutAutomaticTaxOut"},"discounts":{"items":{"$ref":"#/components/schemas/CheckoutDiscountOut"},"type":"array","title":"Discounts"},"allow_promotion_codes":{"type":"boolean","title":"Allow Promotion Codes"},"customer":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/CustomerOut"},{"$ref":"#/components/schemas/DeletedOut"},{"type":"null"}],"title":"Customer","description":"cus_..., or the customer object when retrieved with expand[]=customer."},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email"},"customer_details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Customer Details"},"customer_creation":{"type":"string","title":"Customer Creation"},"client_reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Reference Id"},"payment_method_types":{"items":{"type":"string"},"type":"array","title":"Payment Method Types"},"wallet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wallet"},"payment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment","description":"The pay_ id of the succeeded payment, else null."},"payment_intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Intent","description":"Equal to payment in payment mode; null in subscription mode (Stripe)."},"payment_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method","description":"Subscription mode: the saved card (pm_...) once complete; else null."},"subscription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription","description":"Subscription mode: the subscription (sub_...) once complete; else null."},"invoice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice","description":"Subscription mode: the first invoice (in_...) once complete; else null."},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata"},"duplicate_refusal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duplicate Refusal","description":"Subscription mode: why the latest Pay on this session was refused as a repeat purchase, with nothing charged: subscription_create_unresolved (another first payment for this buyer and plan is still being confirmed), subscription_completed_elsewhere (the buyer completed this plan in another checkout), subscription_exists (the merchant's subscription_guard found a live subscription of this buyer). Null when none. On GET and list answers only, not in webhook events. Not a Stripe field. The hosted page does not say this to a buyer identified only by a typed email: tell them in your own app."},"zeropoint_payment_status":{"type":"string","enum":["unpaid","processing","paid","no_payment_required"],"title":"Zeropoint Payment Status","description":"Only for a request that identifies as a Stripe SDK (Stripe-Version header): our own payment_status, kept here because payment_status then shows processing as unpaid, as Stripe does."}},"additionalProperties":false,"type":"object","required":["id","livemode","created","expires_at","merchant_id","mode","status","payment_status","url","success_url","cancel_url","currency","line_items","amount_subtotal","amount_total","total_details","automatic_tax","discounts","allow_promotion_codes","customer","customer_email","customer_details","customer_creation","client_reference_id","payment_method_types","wallet","payment","payment_intent","payment_method","subscription","invoice","metadata"],"title":"CheckoutSessionOut"},"CheckoutSubscriptionDataIn":{"properties":{"metadata":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Metadata","description":"Subscription mode only: copied onto the subscription the session creates."}},"additionalProperties":false,"type":"object","title":"CheckoutSubscriptionDataIn"},"CheckoutToggleIn":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"Only false is accepted: hosted checkout does not offer this."}},"additionalProperties":false,"type":"object","required":["enabled"],"title":"CheckoutToggleIn"},"CheckoutTotalDetailsOut":{"properties":{"amount_discount":{"type":"integer","title":"Amount Discount"},"amount_tax":{"type":"integer","title":"Amount Tax","description":"Always 0: no tax is computed."},"amount_shipping":{"type":"integer","title":"Amount Shipping"}},"additionalProperties":false,"type":"object","required":["amount_discount","amount_tax","amount_shipping"],"title":"CheckoutTotalDetailsOut"},"CollectConfigOut":{"properties":{"object":{"type":"string","const":"collect_config","title":"Object","default":"collect_config"},"merchant_id":{"type":"string","title":"Merchant Id","description":"Merchant this configuration belongs to."},"form_url":{"type":"string","title":"Form Url","description":"Hosted card form to embed in an iframe. Append ?origin=<your page's origin>; the form posts {type: 'zeropoint.nonce', nonce, card_last4, card_brand} to that origin with window.postMessage when the customer submits."},"save_form_url":{"type":"string","title":"Save Form Url","description":"The same form in save mode, for saving a card for later charges. It already carries ?save=1, so append &origin=<your page's origin>. The button reads 'Save card' and the zeropoint.nonce message also carries save: true. The form shows no terms: present the merchant's terms on your page before the card is saved."},"sandbox_form_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sandbox Form Url","description":"Stand-alone sandbox page that shows the nonce and can charge it with a pasted test key; for trying the flow without an app. Null for a live merchant."},"test_cards":{"items":{"$ref":"#/components/schemas/TestCard"},"type":"array","title":"Test Cards","description":"Cards that work in the sandbox form."}},"type":"object","required":["merchant_id","form_url","save_form_url","sandbox_form_url","test_cards"],"title":"CollectConfigOut","description":"What a keyed (card-not-present) checkout needs. The card form is hosted by ZeroPoint and\nembedded in an iframe; the page never loads processor code or handles processor ids."},"ConnectCreate":{"properties":{"return_url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Return Url","description":"Where to send the merchant afterwards (https, or http://localhost while developing). It receives merchant_id and status=connected|failed as query parameters, plus reason=<code> when ZeroPoint refused the connection. Without one, ZeroPoint shows the merchant a result page.","examples":["https://app.example.com/settings/payments"]}},"additionalProperties":false,"type":"object","title":"ConnectCreate"},"Consent":{"properties":{"agreed_at":{"type":"integer","maximum":253402300799.0,"minimum":0.0,"title":"Agreed At","description":"Unix seconds when, according to you, the cardholder agreed to the merchant's terms. At most 5 minutes in the future. A record only."},"reference":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Reference","description":"Optional. Your own reference to that agreement."}},"additionalProperties":false,"type":"object","required":["agreed_at"],"title":"Consent"},"ConsentOut":{"properties":{"agreed_at":{"type":"integer","title":"Agreed At","description":"Unix seconds when, as you reported, the cardholder agreed to the merchant's terms. A record only: never sent to the processor."},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference","description":"Your own reference to that agreement."}},"type":"object","required":["agreed_at","reference"],"title":"ConsentOut"},"CouponCreate":{"properties":{"merchant_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Merchant Id","description":"Optional. The merchant (mch_...). Without it: the ZeroPoint-Account header (Stripe-Account is accepted too), else the platform's only merchant in this mode.","examples":["mch_01j6..."]},"name":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Name","description":"Shown to the customer. Up to 40."},"percent_off":{"type":"number","multipleOf":0.01,"title":"Percent Off","description":"Percent off, more than 0 and at most 100, at most two decimal places."},"amount_off":{"anyOf":[{"type":"integer","maximum":99999999.0,"minimum":1.0},{"type":"null"}],"title":"Amount Off","description":"Integer cents off."},"currency":{"anyOf":[{"type":"string","const":"usd"},{"type":"null"}],"title":"Currency","description":"usd, with amount_off."},"duration":{"type":"string","enum":["once","repeating","forever"],"title":"Duration","description":"once: the first charge; repeating: duration_in_months; forever: all."},"duration_in_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration In Months","description":"1 to 60, for repeating only."},"max_redemptions":{"anyOf":[{"type":"integer","maximum":1000000.0,"minimum":1.0},{"type":"null"}],"title":"Max Redemptions","description":"Total uses across all its codes."},"redeem_by":{"anyOf":[{"type":"integer","maximum":4102444800.0,"minimum":0.0},{"type":"null"}],"title":"Redeem By","description":"Unix seconds in the future; no new use after it."},"applies_to":{"anyOf":[{"$ref":"#/components/schemas/AppliesTo"},{"type":"null"}],"description":"Limit it to these products. Set on create only."},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata"},"stripe_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,255}$"},{"type":"null"}],"title":"Stripe Id","description":"The Stripe id this object was migrated from. Set once, on create or by PATCH while null. Unique per merchant."}},"additionalProperties":false,"type":"object","required":["duration"],"title":"CouponCreate"},"CouponOut":{"properties":{"object":{"type":"string","const":"coupon","title":"Object","description":"Always 'coupon'.","default":"coupon"},"id":{"type":"string","title":"Id","description":"Coupon id, prefixed coupon_."},"created":{"type":"integer","title":"Created","description":"Unix seconds."},"livemode":{"type":"boolean","title":"Livemode","description":"False in sandbox."},"merchant_id":{"type":"string","title":"Merchant Id","description":"Merchant that owns the coupon."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Shown to the customer at checkout and on receipts."},"percent_off":{"anyOf":[{"type":"number"},{"type":"null"}],"multipleOf":0.01,"title":"Percent Off","description":"Percent off, at most two decimal places (25.5), or null. Not money."},"amount_off":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount Off","description":"Integer cents off, or null."},"currency":{"anyOf":[{"type":"string","const":"usd"},{"type":"null"}],"title":"Currency","description":"usd with amount_off, else null."},"duration":{"type":"string","enum":["once","repeating","forever"],"title":"Duration","description":"How long the discount applies on a subscription."},"duration_in_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration In Months","description":"Months, for repeating only."},"max_redemptions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Redemptions","description":"Total uses across all codes, or null."},"redeem_by":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Redeem By","description":"Unix seconds after which no new use, or null."},"times_redeemed":{"type":"integer","title":"Times Redeemed","description":"Confirmed uses."},"valid":{"type":"boolean","title":"Valid","description":"False once deleted, past redeem_by, or used up."},"applies_to":{"anyOf":[{"$ref":"#/components/schemas/AppliesToOut"},{"type":"null"}],"description":"Products it is limited to, or null."},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata","description":"Your key-value pairs."},"stripe_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Id","description":"The Stripe id this object was migrated from."}},"type":"object","required":["id","created","livemode","merchant_id","name","percent_off","amount_off","currency","duration","duration_in_months","max_redemptions","redeem_by","times_redeemed","valid","applies_to","metadata","stripe_id"],"title":"CouponOut"},"CouponUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Name","description":"Null clears it."},"metadata":{"anyOf":[{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"string","const":""}],"description":"Merged into the stored metadata key by key. A key sent with \"\" is removed; metadata \"\" removes every key; {} changes nothing."},{"type":"null"}],"title":"Metadata","description":"Merged into the stored metadata key by key. A key sent with \"\" is removed; metadata \"\" removes every key; {} or no metadata changes nothing; null is refused."},"stripe_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,255}$"},{"type":"null"}],"title":"Stripe Id","description":"The Stripe id this object was migrated from. Set once, on create or by PATCH while null. Unique per merchant."},"percent_off":{"title":"Percent Off","description":"Cannot change after create; sending it answers parameter_immutable."},"amount_off":{"title":"Amount Off","description":"Cannot change after create; sending it answers parameter_immutable."},"currency":{"title":"Currency","description":"Cannot change after create; sending it answers parameter_immutable."},"duration":{"title":"Duration","description":"Cannot change after create; sending it answers parameter_immutable."},"duration_in_months":{"title":"Duration In Months","description":"Cannot change after create; sending it answers parameter_immutable."},"max_redemptions":{"title":"Max Redemptions","description":"Cannot change after create; sending it answers parameter_immutable."},"redeem_by":{"title":"Redeem By","description":"Cannot change after create; sending it answers parameter_immutable."},"applies_to":{"title":"Applies To","description":"Cannot change after create; sending it answers parameter_immutable."}},"additionalProperties":false,"type":"object","title":"CouponUpdate"},"CustomerCreate":{"properties":{"merchant_id":{"anyOf":[{"type":"string","maxLength":40,"minLength":1},{"type":"null"}],"title":"Merchant Id","description":"Optional. The merchant (mch_...). Without it: the ZeroPoint-Account header, else the platform's only merchant in this mode."},"email":{"anyOf":[{"type":"string","maxLength":254,"minLength":1},{"type":"null"}],"title":"Email","description":"Optional. At most 254 characters with one @. Not unique.","examples":["pat@example.com"]},"name":{"anyOf":[{"type":"string","maxLength":250,"minLength":1},{"type":"null"}],"title":"Name","description":"Optional, 1 to 250 characters."},"phone":{"anyOf":[{"type":"string","maxLength":32,"minLength":1,"pattern":"^[0-9+\\-() ]+$"},{"type":"null"}],"title":"Phone","description":"Optional, up to 32 of digits and + - ( ) space."},"description":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Description","description":"Optional internal note, 1 to 500 characters."},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata","description":"Up to 50 string pairs. Put your own customer id here. A key sent with \"\" is not stored."},"stripe_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,255}$"},{"type":"null"}],"title":"Stripe Id","description":"The Stripe customer id this customer was migrated from. Set once: on create, or by PATCH while it is null. Unique per merchant."},"test_clock":{"anyOf":[{"type":"string","maxLength":40,"minLength":1},{"type":"null"}],"title":"Test Clock","description":"Test mode only (Stripe's parameter). A test clock (clock_...) to attach the customer to: its subscriptions then live on the clock's time."}},"additionalProperties":false,"type":"object","title":"CustomerCreate"},"CustomerOut":{"properties":{"object":{"type":"string","const":"customer","title":"Object","description":"Always 'customer'.","default":"customer"},"id":{"type":"string","title":"Id","description":"Customer id, prefixed cus_.","examples":["cus_01j6z3k2wq7c8v9x0y1z2a3b4c"]},"created":{"type":"integer","title":"Created","description":"Unix seconds."},"updated":{"type":"integer","title":"Updated","description":"Unix seconds of the last change."},"livemode":{"type":"boolean","title":"Livemode","description":"False for sandbox customers (the merchant's mode)."},"merchant_id":{"type":"string","title":"Merchant Id","description":"The merchant this customer belongs to."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Email as given, trimmed. Not unique."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name, up to 250 characters."},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","description":"Phone, up to 32 of digits and + - ( ) space. Not used."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Your internal note, up to 500 characters."},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata","description":"Your own key/value pairs, echoed back. Put your own customer id here."},"stripe_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Id","description":"The Stripe customer id this customer was migrated from. Set once."},"test_clock":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Clock","description":"The test clock (clock_...) this customer was created on, as on Stripe; null when none. Test mode only. Set at create, never changed."}},"type":"object","required":["id","created","updated","livemode","merchant_id","email","name","metadata"],"title":"CustomerOut"},"CustomerUpdate":{"properties":{"email":{"anyOf":[{"type":"string","maxLength":254,"minLength":1},{"type":"null"}],"title":"Email","description":"null clears it."},"name":{"anyOf":[{"type":"string","maxLength":250,"minLength":1},{"type":"null"}],"title":"Name","description":"null clears it."},"phone":{"anyOf":[{"type":"string","maxLength":32,"minLength":1,"pattern":"^[0-9+\\-() ]+$"},{"type":"null"}],"title":"Phone","description":"null clears it."},"description":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Description","description":"null clears it."},"metadata":{"anyOf":[{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"string","const":""}],"description":"Merged into the stored metadata key by key. A key sent with \"\" is removed; metadata \"\" removes every key; {} changes nothing."},{"type":"null"}],"title":"Metadata","description":"Merged into the stored metadata key by key. A key sent with \"\" is removed; metadata \"\" removes every key; {} or no metadata changes nothing; null is refused."},"stripe_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,255}$"},{"type":"null"}],"title":"Stripe Id","description":"Settable only while null; never cleared."}},"additionalProperties":false,"type":"object","title":"CustomerUpdate","description":"Only the fields sent count: an omitted field is no change, an explicit null clears\nemail, name, phone or description."},"DeletedOut":{"properties":{"object":{"type":"string","title":"Object","description":"Type of the deleted object."},"id":{"type":"string","title":"Id","description":"Id of the deleted object."},"deleted":{"type":"boolean","const":true,"title":"Deleted","default":true}},"type":"object","required":["object","id"],"title":"DeletedOut"},"DeliveryOut":{"properties":{"object":{"type":"string","const":"webhook_delivery","title":"Object","default":"webhook_delivery"},"id":{"type":"string","title":"Id","description":"Delivery id, prefixed dlv_."},"created":{"type":"integer","title":"Created","description":"Unix seconds."},"livemode":{"type":"boolean","title":"Livemode","description":"False in sandbox."},"endpoint_id":{"type":"string","title":"Endpoint Id","description":"Endpoint this delivery targets."},"event_id":{"type":"string","title":"Event Id","description":"Event being delivered."},"event_type":{"type":"string","title":"Event Type","description":"Type of that event."},"attempt":{"type":"integer","title":"Attempt","description":"Attempts made so far (max 4; max 10 for a billing event to a live endpoint)."},"status":{"type":"string","enum":["pending","delivered","failed","dead"],"title":"Status","description":"pending: queued; failed: will retry; dead: gave up after the last attempt (4, or 10 over about 3 days for a billing event to a live endpoint). A dead delivery's event stays in GET /v1/events."},"response_status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Status","description":"HTTP status your endpoint returned."},"next_attempt":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Attempt","description":"Unix seconds of the next retry, or null."},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error","description":"Why the last attempt failed."},"delivered":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Delivered","description":"Unix seconds when a 2xx was received."}},"type":"object","required":["id","created","livemode","endpoint_id","event_id","event_type","attempt","status","response_status","next_attempt","last_error","delivered"],"title":"DeliveryOut"},"DiscountPreviewOut":{"properties":{"object":{"type":"string","const":"discount_preview","title":"Object","default":"discount_preview"},"livemode":{"type":"boolean","title":"Livemode","description":"False in sandbox."},"merchant_id":{"type":"string","title":"Merchant Id","description":"Merchant the price belongs to."},"price":{"type":"string","title":"Price","description":"Price id."},"product":{"type":"string","title":"Product","description":"Product id of the price."},"currency":{"type":"string","const":"usd","title":"Currency","description":"Currency of every amount here."},"quantity":{"type":"integer","title":"Quantity","description":"Always 1 in this version."},"subtotal":{"type":"integer","title":"Subtotal","description":"Integer cents before the discount."},"discount_amount":{"type":"integer","title":"Discount Amount","description":"Integer cents off; 0 with a refusal."},"total":{"type":"integer","title":"Total","description":"Integer cents to pay; may be 0."},"coupon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coupon","description":"Coupon id that applied, or null."},"promotion_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promotion Code","description":"Promotion code id that applied, or null."},"duration":{"anyOf":[{"type":"string","enum":["once","repeating","forever"]},{"type":"null"}],"title":"Duration","description":"How long the discount applies, or null."},"duration_in_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration In Months","description":"Months, for repeating only."},"refusal":{"anyOf":[{"type":"string","enum":["promotion_code_invalid","promotion_code_not_applicable","promotion_code_exhausted","promotion_code_already_redeemed"]},{"type":"null"}],"title":"Refusal","description":"Why the code does not apply, or null when it does."},"refusal_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refusal Message","description":"One sentence to show the shopper, or null."}},"type":"object","required":["livemode","merchant_id","price","product","currency","quantity","subtotal","discount_amount","total","coupon","promotion_code","duration","duration_in_months","refusal","refusal_message"],"title":"DiscountPreviewOut"},"DiscountPreviewRequest":{"properties":{"merchant_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Merchant Id","description":"Optional. The merchant (mch_...). Without it: the ZeroPoint-Account header (Stripe-Account is accepted too), else the platform's only merchant in this mode.","examples":["mch_01j6..."]},"promotion_code":{"type":"string","maxLength":64,"minLength":1,"title":"Promotion Code","description":"The text the shopper typed; matched regardless of case."},"customer":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Customer","description":"A customer of this merchant (cus_...), for codes limited to one."},"email":{"anyOf":[{"type":"string","maxLength":254,"minLength":3,"pattern":"^[^@\\s]+@[^@\\s]+$"},{"type":"null"}],"title":"Email","description":"The email typed on this purchase, for once_per_customer."},"quantity":{"type":"integer","maximum":1.0,"minimum":1.0,"title":"Quantity","description":"1 only.","default":1}},"additionalProperties":false,"type":"object","required":["promotion_code"],"title":"DiscountPreviewRequest"},"DiscoveredDeviceOut":{"properties":{"object":{"type":"string","const":"discovered_device","title":"Object","default":"discovered_device"},"device_id":{"type":"string","title":"Device Id","description":"Pass as device_id when registering."},"serial":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serial","description":"Hardware serial printed on the device."},"store_id":{"type":"string","title":"Store Id","description":"Processor store the device belongs to."},"store_name":{"type":"string","title":"Store Name","description":"Store display name."},"registered_terminal_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registered Terminal Id","description":"Terminal id if this device is already registered to the merchant."}},"type":"object","required":["device_id","serial","store_id","store_name","registered_terminal_id"],"title":"DiscoveredDeviceOut"},"DocDetail":{"properties":{"object":{"type":"string","const":"doc","title":"Object","description":"Always 'doc'."},"slug":{"type":"string","title":"Slug","description":"Stable identifier, e.g. getting-started."},"title":{"type":"string","title":"Title","description":"Human-readable title of the doc."},"summary":{"type":"string","title":"Summary","description":"One-sentence summary."},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"Includes 'guide' or 'concept'."},"body":{"type":"string","title":"Body","description":"Full markdown body."},"updated":{"type":"integer","title":"Updated","description":"Unix seconds of the last update."}},"type":"object","required":["object","slug","title","summary","tags","body","updated"],"title":"DocDetail"},"DocList":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Always 'list'."},"data":{"items":{"$ref":"#/components/schemas/DocSummary"},"type":"array","title":"Data","description":"Doc summaries in reading order."},"has_more":{"type":"boolean","title":"Has More","description":"False in this release; pagination arrives with larger lists."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Cursor for the next page, or null."},"url":{"type":"string","title":"Url","description":"The list's path (Stripe's list object carries it).","default":"/v1/docs"}},"type":"object","required":["object","data","has_more","next_cursor"],"title":"DocList"},"DocSummary":{"properties":{"object":{"type":"string","const":"doc","title":"Object","description":"Always 'doc'."},"slug":{"type":"string","title":"Slug","description":"Stable identifier, e.g. getting-started."},"title":{"type":"string","title":"Title","description":"Human-readable title of the doc."},"summary":{"type":"string","title":"Summary","description":"One-sentence summary."},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"Includes 'guide' or 'concept'."}},"type":"object","required":["object","slug","title","summary","tags"],"title":"DocSummary"},"ErrorDetail":{"properties":{"type":{"description":"Broad category; branch on code, not on this. A /v1 request that identifies as a Stripe SDK (a Stripe-Version or X-Stripe-Client-User-Agent header, or a User-Agent starting Stripe/v1; any client may opt in) gets Stripe's types instead: api_error, authentication_error, card_error, idempotency_error, invalid_request_error, rate_limit_error. The same error then also carries zeropoint_type, zeropoint_code and zeropoint_status (ours), decline_code and doc_url, param in bracket notation, and an HTTP status Stripe SDKs map to the same error class (see the api-conventions guide). A request without those headers only ever sees ours: invalid_request, authentication, permission, not_found, conflict, rate_limited, payment_error, upstream_error, internal_error.","enum":["invalid_request","authentication","permission","not_found","conflict","rate_limited","payment_error","upstream_error","internal_error","api_error","authentication_error","card_error","idempotency_error","invalid_request_error","rate_limit_error"],"title":"Type","type":"string"},"code":{"description":"Stable machine-readable code, e.g. parameter_invalid or resource_missing.","examples":["parameter_invalid"],"title":"Code","type":"string"},"message":{"description":"Human-readable explanation; may change between releases.","title":"Message","type":"string"},"param":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The parameter, header or body field at fault, when there is one.","title":"Param"},"request_id":{"description":"Id of this request, also sent as the Request-Id header; quote it in support.","title":"Request Id","type":"string"}},"required":["type","code","message","param","request_id"],"title":"ErrorDetail","type":"object"},"ErrorResponse":{"description":"The one error envelope every REST error uses (errors.error_body).","properties":{"error":{"$ref":"#/components/schemas/ErrorDetail","description":"What went wrong."}},"required":["error"],"title":"ErrorResponse","type":"object"},"EventOut":{"properties":{"object":{"type":"string","const":"event","title":"Object","description":"Always 'event'.","default":"event"},"id":{"type":"string","title":"Id","description":"Event id, prefixed evt_."},"created":{"type":"integer","title":"Created","description":"Unix seconds when the event was recorded."},"livemode":{"type":"boolean","title":"Livemode","description":"False for sandbox events."},"type":{"type":"string","title":"Type","description":"Event type, e.g. payment.succeeded."},"merchant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id","description":"Merchant the event belongs to, or null."},"data":{"additionalProperties":true,"type":"object","title":"Data","description":"data.object is the full object as it looked when the event fired."},"api_version":{"type":"string","title":"Api Version","description":"Shape version of data.object, e.g. 2026-09-05."}},"type":"object","required":["id","created","livemode","type","merchant_id","data","api_version"],"title":"EventOut"},"FailNextCharges":{"properties":{"outcome":{"type":"string","maxLength":40,"title":"Outcome","description":"card_declined, duplicate_transaction or processor_unavailable; or a hard decline: lost_card, stolen_card, revocation_of_authorization, stop_payment_order or transaction_not_allowed."},"count":{"type":"integer","title":"Count","description":"How many billing charges fail, 1 to 10.","default":1}},"additionalProperties":false,"type":"object","required":["outcome"],"title":"FailNextCharges"},"Health":{"properties":{"status":{"type":"string","enum":["ok","error"],"title":"Status","description":"Overall service status."},"db":{"type":"string","enum":["ok","error"],"title":"Db","description":"Whether the database answered."},"docs":{"type":"integer","title":"Docs","description":"Number of docs loaded from the corpus."},"version":{"type":"string","title":"Version","description":"Service version, e.g. 0.3.0."},"processor":{"type":"string","enum":["configured","unconfigured"],"title":"Processor","description":"Whether the sandbox processor account is configured (keyed payments)."},"loops":{"additionalProperties":{"anyOf":[{"type":"integer"},{"type":"null"}]},"type":"object","title":"Loops","description":"Seconds since each background loop last ran; null until its first run."},"loop_last_success_s":{"additionalProperties":{"anyOf":[{"type":"integer"},{"type":"null"}]},"type":"object","title":"Loop Last Success S","description":"Seconds since each loop tick last returned without an exception; null until its first success. A successful tick may do no work or record a handled processor failure; monitor pending work and reconciliation health separately."},"loop_consecutive_failures":{"additionalProperties":{"type":"integer"},"type":"object","title":"Loop Consecutive Failures","description":"Consecutive tick exceptions per loop, reset on a successful tick. These counters reset when the process restarts and expose no exception details."},"reconcile":{"$ref":"#/components/schemas/ReconcileHealth","description":"Reconciliation cursor health: how many business cursors are stalled, and how far behind the feed the oldest cursor's read point is."}},"type":"object","required":["status","db","docs","version","processor","loops","loop_last_success_s","loop_consecutive_failures","reconcile"],"title":"Health"},"InvoicePay":{"properties":{"payment_method":{"anyOf":[{"type":"string","maxLength":40,"minLength":1},{"type":"null"}],"title":"Payment Method","description":"A saved card (pm_...) of the invoice's customer to charge instead of the subscription's default. The default stays as it is."},"off_session":{"type":"boolean","title":"Off Session","description":"true (default): the customer is not present (merchant initiated). false: the customer is paying now (customer initiated). Either way a decline here never uses up a retry of the dunning schedule (the scheduler's alone); it counts toward the invoice's attempt_count and the pay limit.","default":true}},"additionalProperties":false,"type":"object","title":"InvoicePay"},"InvoicePreview":{"properties":{"subscription":{"type":"string","maxLength":40,"minLength":1,"title":"Subscription","description":"The subscription (sub_...) to preview."},"subscription_details":{"anyOf":[{"$ref":"#/components/schemas/PreviewSubscriptionDetails"},{"type":"null"}],"description":"A plan change to preview before it is made (the update's items, proration_behavior and proration_date). Without it, the next renewal, with a scheduled change already on the subscription included."}},"additionalProperties":false,"type":"object","required":["subscription"],"title":"InvoicePreview"},"InvoiceVoid":{"properties":{},"additionalProperties":false,"type":"object","title":"InvoiceVoid"},"ListOut_CheckoutSessionOut_":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Always 'list'.","default":"list"},"data":{"items":{"$ref":"#/components/schemas/CheckoutSessionOut"},"type":"array","title":"Data","description":"Items, newest first."},"has_more":{"type":"boolean","title":"Has More","description":"True when another page exists."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as ?cursor= (or ?starting_after=) to fetch the next page, or null on the last page."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"The API path of this list, as Stripe's list object has it (for example /v1/customers). Null only in MCP tool results."}},"type":"object","required":["data","has_more","next_cursor"],"title":"ListOut[CheckoutSessionOut]"},"ListOut_CouponOut_":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Always 'list'.","default":"list"},"data":{"items":{"$ref":"#/components/schemas/CouponOut"},"type":"array","title":"Data","description":"Items, newest first."},"has_more":{"type":"boolean","title":"Has More","description":"True when another page exists."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as ?cursor= (or ?starting_after=) to fetch the next page, or null on the last page."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"The API path of this list, as Stripe's list object has it (for example /v1/customers). Null only in MCP tool results."}},"type":"object","required":["data","has_more","next_cursor"],"title":"ListOut[CouponOut]"},"ListOut_DeliveryOut_":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Always 'list'.","default":"list"},"data":{"items":{"$ref":"#/components/schemas/DeliveryOut"},"type":"array","title":"Data","description":"Items, newest first."},"has_more":{"type":"boolean","title":"Has More","description":"True when another page exists."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as ?cursor= (or ?starting_after=) to fetch the next page, or null on the last page."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"The API path of this list, as Stripe's list object has it (for example /v1/customers). Null only in MCP tool results."}},"type":"object","required":["data","has_more","next_cursor"],"title":"ListOut[DeliveryOut]"},"ListOut_DiscoveredDeviceOut_":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Always 'list'.","default":"list"},"data":{"items":{"$ref":"#/components/schemas/DiscoveredDeviceOut"},"type":"array","title":"Data","description":"Items, newest first."},"has_more":{"type":"boolean","title":"Has More","description":"True when another page exists."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as ?cursor= (or ?starting_after=) to fetch the next page, or null on the last page."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"The API path of this list, as Stripe's list object has it (for example /v1/customers). Null only in MCP tool results."}},"type":"object","required":["data","has_more","next_cursor"],"title":"ListOut[DiscoveredDeviceOut]"},"ListOut_EventOut_":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Always 'list'.","default":"list"},"data":{"items":{"$ref":"#/components/schemas/EventOut"},"type":"array","title":"Data","description":"Items, newest first."},"has_more":{"type":"boolean","title":"Has More","description":"True when another page exists."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as ?cursor= (or ?starting_after=) to fetch the next page, or null on the last page."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"The API path of this list, as Stripe's list object has it (for example /v1/customers). Null only in MCP tool results."}},"type":"object","required":["data","has_more","next_cursor"],"title":"ListOut[EventOut]"},"ListOut_MerchantOut_":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Always 'list'.","default":"list"},"data":{"items":{"$ref":"#/components/schemas/MerchantOut"},"type":"array","title":"Data","description":"Items, newest first."},"has_more":{"type":"boolean","title":"Has More","description":"True when another page exists."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as ?cursor= (or ?starting_after=) to fetch the next page, or null on the last page."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"The API path of this list, as Stripe's list object has it (for example /v1/customers). Null only in MCP tool results."}},"type":"object","required":["data","has_more","next_cursor"],"title":"ListOut[MerchantOut]"},"ListOut_PaymentMethodOut_":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Always 'list'.","default":"list"},"data":{"items":{"$ref":"#/components/schemas/PaymentMethodOut"},"type":"array","title":"Data","description":"Items, newest first."},"has_more":{"type":"boolean","title":"Has More","description":"True when another page exists."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as ?cursor= (or ?starting_after=) to fetch the next page, or null on the last page."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"The API path of this list, as Stripe's list object has it (for example /v1/customers). Null only in MCP tool results."}},"type":"object","required":["data","has_more","next_cursor"],"title":"ListOut[PaymentMethodOut]"},"ListOut_PaymentOut_":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Always 'list'.","default":"list"},"data":{"items":{"$ref":"#/components/schemas/PaymentOut"},"type":"array","title":"Data","description":"Items, newest first."},"has_more":{"type":"boolean","title":"Has More","description":"True when another page exists."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as ?cursor= (or ?starting_after=) to fetch the next page, or null on the last page."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"The API path of this list, as Stripe's list object has it (for example /v1/customers). Null only in MCP tool results."}},"type":"object","required":["data","has_more","next_cursor"],"title":"ListOut[PaymentOut]"},"ListOut_PriceOut_":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Always 'list'.","default":"list"},"data":{"items":{"$ref":"#/components/schemas/PriceOut"},"type":"array","title":"Data","description":"Items, newest first."},"has_more":{"type":"boolean","title":"Has More","description":"True when another page exists."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as ?cursor= (or ?starting_after=) to fetch the next page, or null on the last page."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"The API path of this list, as Stripe's list object has it (for example /v1/customers). Null only in MCP tool results."}},"type":"object","required":["data","has_more","next_cursor"],"title":"ListOut[PriceOut]"},"ListOut_ProductOut_":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Always 'list'.","default":"list"},"data":{"items":{"$ref":"#/components/schemas/ProductOut"},"type":"array","title":"Data","description":"Items, newest first."},"has_more":{"type":"boolean","title":"Has More","description":"True when another page exists."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as ?cursor= (or ?starting_after=) to fetch the next page, or null on the last page."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"The API path of this list, as Stripe's list object has it (for example /v1/customers). Null only in MCP tool results."}},"type":"object","required":["data","has_more","next_cursor"],"title":"ListOut[ProductOut]"},"ListOut_PromotionCodeOut_":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Always 'list'.","default":"list"},"data":{"items":{"$ref":"#/components/schemas/PromotionCodeOut"},"type":"array","title":"Data","description":"Items, newest first."},"has_more":{"type":"boolean","title":"Has More","description":"True when another page exists."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as ?cursor= (or ?starting_after=) to fetch the next page, or null on the last page."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"The API path of this list, as Stripe's list object has it (for example /v1/customers). Null only in MCP tool results."}},"type":"object","required":["data","has_more","next_cursor"],"title":"ListOut[PromotionCodeOut]"},"ListOut_RefundOut_":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Always 'list'.","default":"list"},"data":{"items":{"$ref":"#/components/schemas/RefundOut"},"type":"array","title":"Data","description":"Items, newest first."},"has_more":{"type":"boolean","title":"Has More","description":"True when another page exists."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as ?cursor= (or ?starting_after=) to fetch the next page, or null on the last page."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"The API path of this list, as Stripe's list object has it (for example /v1/customers). Null only in MCP tool results."}},"type":"object","required":["data","has_more","next_cursor"],"title":"ListOut[RefundOut]"},"ListOut_TerminalOut_":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Always 'list'.","default":"list"},"data":{"items":{"$ref":"#/components/schemas/TerminalOut"},"type":"array","title":"Data","description":"Items, newest first."},"has_more":{"type":"boolean","title":"Has More","description":"True when another page exists."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as ?cursor= (or ?starting_after=) to fetch the next page, or null on the last page."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"The API path of this list, as Stripe's list object has it (for example /v1/customers). Null only in MCP tool results."}},"type":"object","required":["data","has_more","next_cursor"],"title":"ListOut[TerminalOut]"},"ListOut_Union_CustomerOut__DeletedOut__":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Always 'list'.","default":"list"},"data":{"items":{"anyOf":[{"$ref":"#/components/schemas/CustomerOut"},{"$ref":"#/components/schemas/DeletedOut"}]},"type":"array","title":"Data","description":"Items, newest first."},"has_more":{"type":"boolean","title":"Has More","description":"True when another page exists."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as ?cursor= (or ?starting_after=) to fetch the next page, or null on the last page."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"The API path of this list, as Stripe's list object has it (for example /v1/customers). Null only in MCP tool results."}},"type":"object","required":["data","has_more","next_cursor"],"title":"ListOut[Union[CustomerOut, DeletedOut]]"},"ListOut_WebhookEndpointOut_":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Always 'list'.","default":"list"},"data":{"items":{"$ref":"#/components/schemas/WebhookEndpointOut"},"type":"array","title":"Data","description":"Items, newest first."},"has_more":{"type":"boolean","title":"Has More","description":"True when another page exists."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as ?cursor= (or ?starting_after=) to fetch the next page, or null on the last page."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"The API path of this list, as Stripe's list object has it (for example /v1/customers). Null only in MCP tool results."}},"type":"object","required":["data","has_more","next_cursor"],"title":"ListOut[WebhookEndpointOut]"},"MerchantCreate":{"properties":{"display_name":{"type":"string","maxLength":120,"minLength":1,"title":"Display Name","description":"Business name shown on receipts.","examples":["Corner Gym"]},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata","description":"Up to 50 string pairs."}},"additionalProperties":false,"type":"object","required":["display_name"],"title":"MerchantCreate"},"MerchantOut":{"properties":{"object":{"type":"string","const":"merchant","title":"Object","description":"Always 'merchant'.","default":"merchant"},"id":{"type":"string","title":"Id","description":"Merchant id, prefixed mch_.","examples":["mch_01j6z3k2wq7c8v9x0y1z2a3b4c"]},"created":{"type":"integer","title":"Created","description":"Unix seconds."},"livemode":{"type":"boolean","title":"Livemode","description":"False for sandbox merchants."},"display_name":{"type":"string","title":"Display Name","description":"Business name shown on receipts."},"state":{"type":"string","enum":["invited","boarded","active","read_only"],"title":"State","description":"Sandbox merchants are active immediately."},"processor_connected":{"type":"boolean","title":"Processor Connected","description":"True when the merchant is bound to a processor account. In sandbox this means keyed payments and physical-terminal discovery are available; simulated terminals work either way."},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata","description":"Your own key/value pairs, echoed back."},"processor_connected_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Processor Connected At","description":"Unix seconds when the merchant connected its own processor account; null for a sandbox merchant on the shared account or one not connected yet."},"processor_business_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processor Business Name","description":"The business name on the connected processor account, when connected."},"processor_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processor Currency","description":"The store currency the connected processor account reports (uppercase ISO 4217, for example USD; when its active stores report different currencies, the distinct values comma-joined, for example CAD,USD). Two special values: ??? stands for a store currency the account reports that is not a three-letter code, and MIXED for more distinct currencies than fit; both hold card payments. Null when it reports none, for a sandbox merchant on the shared account, or one not connected."},"processor_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processor Country","description":"The country the connected processor account reports (for example US); null when it reports none, for a sandbox merchant on the shared account, or one not connected."},"card_payments_held":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Card Payments Held","description":"True when the merchant is connected but its card payments are held: every payment, refund, void, terminal and card-form request for it answers 403 with the code in card_payments_hold_code and nothing is sent to the processor. ZeroPoint supports US businesses charging in USD only. False when they are not held. Null when not yet verified: the merchant connected before its account's currency was recorded, and its first card request reads the account and settles it.","default":false},"card_payments_hold_code":{"anyOf":[{"type":"string","const":"processor_currency_unsupported"},{"type":"null"}],"title":"Card Payments Hold Code","description":"Why card payments are held; null when they are not. processor_currency_unsupported: the connected processor account's store currency is not USD, or it reports no currency and its country is not US."}},"type":"object","required":["id","created","livemode","display_name","state","processor_connected","metadata"],"title":"MerchantOut"},"PartialApprovalOut":{"properties":{"processor_transaction_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processor Transaction Id","description":"The partially approved sale at the processor; null when it named none."},"approved_amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Approved Amount Cents","description":"What the processor approved; null when its answer did not say."},"requested_amount_cents":{"type":"integer","title":"Requested Amount Cents","description":"What was asked: the payment's amount."},"reversed":{"type":"boolean","title":"Reversed","description":"True once the void of the partially approved sale is confirmed. It never goes back to false; payment.reversed_late announces a later confirmation."},"reversed_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reversed At","description":"Unix seconds the void was confirmed."}},"type":"object","required":["processor_transaction_id","approved_amount_cents","requested_amount_cents","reversed","reversed_at"],"title":"PartialApprovalOut","description":"A partially approved sale behind a payment (card-on-file spec 4.5)."},"PaymentCreate":{"properties":{"merchant_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Merchant Id","description":"Required for method terminal and a plain keyed payment. Optional for card_on_file and a keyed payment with save_payment_method: without it, the ZeroPoint-Account header, else the platform's only merchant in this mode.","examples":["mch_01j6..."]},"amount_cents":{"type":"integer","maximum":99999999.0,"minimum":1.0,"title":"Amount Cents","description":"Integer cents, e.g. 1250 = $12.50."},"currency":{"type":"string","const":"usd","title":"Currency","description":"Lowercase ISO 4217; usd only.","default":"usd"},"platform_reference":{"type":"string","maxLength":120,"minLength":1,"title":"Platform Reference","description":"Your own id for this payment (order id, invoice id). Unique per merchant. References starting with zp: (any case) are reserved for ZeroPoint."},"method":{"type":"string","enum":["terminal","keyed","card_on_file"],"title":"Method","description":"terminal: card-present on a terminal_id. keyed: a Collect nonce. card_on_file: a saved payment method (payment_method)."},"terminal_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Terminal Id"},"nonce":{"anyOf":[{"type":"string","maxLength":2000,"minLength":1},{"type":"null"}],"title":"Nonce","description":"One-time value from the Collect form. Never logged."},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Description","description":"Shown on the receipt."},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata"},"terminal_options":{"anyOf":[{"$ref":"#/components/schemas/TerminalOptions"},{"type":"null"}],"description":"Terminal payments only: tip prompt and receipt screen. Both default false."},"payment_method":{"anyOf":[{"type":"string","maxLength":40,"minLength":1},{"type":"null"}],"title":"Payment Method","description":"card_on_file only, required: the id of the saved payment method (pm_...) to charge. Needs the payment_methods:charge scope."},"initiated_by":{"anyOf":[{"type":"string","enum":["customer","merchant"]},{"type":"null"}],"title":"Initiated By","description":"card_on_file: required, customer (the cardholder is paying now) or merchant (a renewal or a staff action). keyed with save_payment_method: optional, customer only. A record only; never sent to the processor."},"save_payment_method":{"anyOf":[{"$ref":"#/components/schemas/SavePaymentMethod"},{"type":"null"}],"description":"keyed only: save the card for a customer, then charge the saved card, in one call (needs the payment_methods:write scope). The card is saved first; a declined charge keeps the saved card. Present the merchant's terms first."}},"additionalProperties":false,"type":"object","required":["amount_cents","platform_reference","method"],"title":"PaymentCreate"},"PaymentMethodCard":{"properties":{"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand","description":"Card brand, lower case, e.g. visa."},"last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last4","description":"Last four digits of the card number."},"exp_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exp Month","description":"Expiry month 1 to 12, or null if not known."},"exp_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exp Year","description":"Four-digit expiry year, or null if not known."}},"type":"object","required":["brand","last4","exp_month","exp_year"],"title":"PaymentMethodCard"},"PaymentMethodCreate":{"properties":{"merchant_id":{"anyOf":[{"type":"string","maxLength":40,"minLength":1},{"type":"null"}],"title":"Merchant Id","description":"Optional. The merchant (mch_...); must be the customer's merchant. Without it: the ZeroPoint-Account header, else the platform's only merchant in this mode."},"customer":{"type":"string","maxLength":40,"minLength":1,"title":"Customer","description":"The customer (cus_...) the card is saved for."},"nonce":{"type":"string","maxLength":2000,"minLength":1,"title":"Nonce","description":"One-time value from the Collect form, or in test mode a test card token (tok_visa). Never logged or stored."},"consent":{"$ref":"#/components/schemas/Consent"},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata"}},"additionalProperties":false,"type":"object","required":["customer","nonce","consent"],"title":"PaymentMethodCreate"},"PaymentMethodOut":{"properties":{"object":{"type":"string","const":"payment_method","title":"Object","description":"Always 'payment_method'.","default":"payment_method"},"id":{"type":"string","title":"Id","description":"Payment method id, prefixed pm_.","examples":["pm_01j6z3k2wq7c8v9x0y1z2a3b4c"]},"created":{"type":"integer","title":"Created","description":"Unix seconds."},"livemode":{"type":"boolean","title":"Livemode","description":"False for sandbox methods (the merchant's mode)."},"merchant_id":{"type":"string","title":"Merchant Id","description":"The merchant this card was saved for."},"customer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer","description":"The customer (cus_...) the card belongs to; null once the method is deleted."},"type":{"type":"string","const":"card","title":"Type","description":"Always 'card'.","default":"card"},"card":{"$ref":"#/components/schemas/PaymentMethodCard"},"billing_details":{"$ref":"#/components/schemas/BillingDetails"},"status":{"type":"string","enum":["active","unusable","deleted"],"title":"Status","description":"Computed on every read: active, unusable (it cannot be charged) or deleted."},"status_reason":{"anyOf":[{"type":"string","enum":["processor_disconnected","processor_account_changed","application_changed","token_erased"]},{"type":"null"}],"title":"Status Reason","description":"Why the method is unusable; null when active or deleted."},"consent":{"$ref":"#/components/schemas/ConsentOut"},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata","description":"Your own key/value pairs, echoed back."}},"type":"object","required":["id","created","livemode","merchant_id","customer","card","status","status_reason","consent","metadata"],"title":"PaymentMethodOut","description":"A saved card. The processor token is never returned: there is no field for it."},"PaymentOut":{"properties":{"object":{"type":"string","const":"payment","title":"Object","default":"payment"},"id":{"type":"string","title":"Id","description":"Payment id, prefixed pay_."},"created":{"type":"integer","title":"Created","description":"Unix seconds."},"updated":{"type":"integer","title":"Updated","description":"Unix seconds of the last state change."},"livemode":{"type":"boolean","title":"Livemode","description":"False in sandbox."},"merchant_id":{"type":"string","title":"Merchant Id","description":"Merchant being paid."},"terminal_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terminal Id","description":"Terminal used for card-present payments."},"platform_reference":{"type":"string","title":"Platform Reference","description":"Your own id for this payment; unique per merchant."},"amount_cents":{"type":"integer","title":"Amount Cents","description":"Amount in the smallest currency unit."},"amount_refunded_cents":{"type":"integer","title":"Amount Refunded Cents","description":"Refund/void counter, including reservations for reversals in progress; not proof that all reversals completed."},"tip_cents":{"type":"integer","title":"Tip Cents","description":"Tip added on the terminal; 0 unless terminal_options.tip was true."},"currency":{"type":"string","title":"Currency","description":"Lowercase ISO 4217; usd in this release."},"method":{"type":"string","enum":["terminal","keyed","card_on_file"],"title":"Method","description":"terminal = card-present; keyed = Collect nonce; card_on_file = a saved payment method."},"payment_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method","description":"The id of the saved payment method (pm_...) this payment charged; null otherwise."},"initiated_by":{"anyOf":[{"type":"string","enum":["customer","merchant"]},{"type":"null"}],"title":"Initiated By","description":"card_on_file: who started the charge, as the builder recorded it."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Shown on the receipt."},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata","description":"Your key/value pairs."},"terminal_options":{"anyOf":[{"$ref":"#/components/schemas/TerminalOptions"},{"type":"null"}],"description":"What the terminal was told (terminal payments); null for keyed."},"state":{"type":"string","enum":["pending","processing","succeeded","failed","canceled","expired"],"title":"State","description":"pending: waiting for the terminal; processing: card presented; then exactly one of succeeded, failed, canceled, expired."},"failure_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Code","description":"Why it ended in failed/canceled/expired, e.g. card_declined."},"expires":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires","description":"Unix seconds after which a terminal payment expires if unanswered."},"card_last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Last4","description":"Last four digits once the card was read."},"card_brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Brand","description":"Lowercase brand once known, e.g. visa."},"processor_transaction_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processor Transaction Id","description":"Processor-side transaction id of the sale, once the processor named one. Set on succeeded payments charged at the processor. A failed payment can carry one too (a keyed decline, an unverified outcome): it names the processor's row for that attempt and is not evidence of a charge. Only state says whether money moved."},"receipt_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Url","description":"Hosted receipt URL once succeeded."},"partial_approval":{"anyOf":[{"$ref":"#/components/schemas/PartialApprovalOut"},{"type":"null"}],"description":"Null unless the processor approved this payment's sale for less than was asked. ZeroPoint never accepts a partial approval: the sale is voided and the payment fails (failure_code partial_approval, or processor_unverified when the answer came after the payment had already ended)."},"invoice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice","description":"The subscription invoice (in_ id) this payment is an attempt of; null for every payment you create yourself."},"checkout_session":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkout Session","description":"The hosted checkout session (cs_...) this payment is an attempt of; null for a payment made any other way."}},"type":"object","required":["id","created","updated","livemode","merchant_id","terminal_id","platform_reference","amount_cents","amount_refunded_cents","tip_cents","currency","method","description","metadata","terminal_options","state","failure_code","expires","card_last4","card_brand","processor_transaction_id","receipt_url","partial_approval","invoice"],"title":"PaymentOut"},"PilotHealth":{"properties":{"pilot":{"type":"string","enum":["ok","attention"],"title":"Pilot"},"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons"},"counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Counts"},"info":{"additionalProperties":{"type":"integer"},"type":"object","title":"Info","description":"Informational numbers. Unlike counts, a non-zero value is not a reason."},"alerts_enabled":{"type":"boolean","title":"Alerts Enabled","description":"Whether any alert channel can send. False means attention is only logged."}},"type":"object","required":["pilot","reasons","counts","info","alerts_enabled"],"title":"PilotHealth"},"PlatformOut":{"properties":{"object":{"type":"string","const":"platform","title":"Object","description":"Always 'platform'."},"id":{"type":"string","title":"Id","description":"Platform id, prefixed plat_.","examples":["plat_01j6z3k2wq7c8v9x0y1z2a3b4c"]},"name":{"type":"string","title":"Name","description":"Display name of the platform (your company or product)."},"created":{"type":"integer","title":"Created","description":"Unix seconds when the platform was created."},"livemode":{"type":"boolean","title":"Livemode","description":"False for zp_test_ keys; true only for live keys."},"key_id":{"type":"string","title":"Key Id","description":"Id of the API key that made this request, prefixed key_."}},"type":"object","required":["object","id","name","created","livemode","key_id"],"title":"PlatformOut"},"PortalSessionCreate":{"properties":{"customer":{"type":"string","maxLength":40,"minLength":1,"title":"Customer","description":"The customer (cus_...) the portal is for."},"return_url":{"anyOf":[{"type":"string","maxLength":4096,"minLength":1},{"type":"null"}],"title":"Return Url","description":"Where the portal's back link goes: https (http for localhost in test mode); in live mode the host must be on your live redirect list."}},"additionalProperties":false,"type":"object","required":["customer"],"title":"PortalSessionCreate"},"PreviewSubscriptionDetails":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SubscriptionItemChange"},"type":"array","maxItems":1,"minItems":1,"title":"Items","description":"The plan change to preview: [{id: si_..., price: price_...}]."},"proration_behavior":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Proration Behavior","description":"always_invoice, required for a change charged now (an upgrade or a monthly to annual switch), as on the update."},"proration_date":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Proration Date","description":"Unix seconds to prorate from, as on the update: inside the current period, not in the future, at most 1 hour old. Default: now. Send the answer's subscription_proration_date as proration_date on the update to be charged the same amount."}},"additionalProperties":false,"type":"object","required":["items"],"title":"PreviewSubscriptionDetails"},"PriceCreate":{"properties":{"merchant_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Merchant Id","description":"Optional. The merchant (mch_...). Without it: the ZeroPoint-Account header (Stripe-Account is accepted too), else the platform's only merchant in this mode.","examples":["mch_01j6..."]},"product":{"type":"string","maxLength":40,"title":"Product","description":"Product of the same merchant.","examples":["prod_01j6..."]},"unit_amount":{"type":"integer","maximum":99999999.0,"minimum":1.0,"title":"Unit Amount","description":"Integer cents, e.g. 2900 = $29.00. Never changes after create."},"currency":{"type":"string","const":"usd","title":"Currency","description":"Lowercase ISO 4217; usd only.","default":"usd"},"type":{"anyOf":[{"type":"string","enum":["one_time","recurring"]},{"type":"null"}],"title":"Type","description":"Derived from recurring; when sent it must agree."},"recurring":{"anyOf":[{"$ref":"#/components/schemas/PriceRecurring"},{"type":"null"}],"description":"Send it for a recurring price; leave it out for one_time."},"active":{"type":"boolean","title":"Active","default":true},"lookup_key":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,200}$"},{"type":"null"}],"title":"Lookup Key","description":"Your stable name for the price, unique per merchant."},"transfer_lookup_key":{"type":"boolean","title":"Transfer Lookup Key","description":"True moves lookup_key from the price that holds it to this one.","default":false},"nickname":{"anyOf":[{"type":"string","maxLength":250},{"type":"null"}],"title":"Nickname","description":"Internal label."},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata"},"stripe_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,255}$"},{"type":"null"}],"title":"Stripe Id","description":"The Stripe id this object was migrated from. Set once, on create or by PATCH while null. Unique per merchant."}},"additionalProperties":false,"type":"object","required":["product","unit_amount"],"title":"PriceCreate"},"PriceOut":{"properties":{"object":{"type":"string","const":"price","title":"Object","description":"Always 'price'.","default":"price"},"id":{"type":"string","title":"Id","description":"Price id, prefixed price_."},"created":{"type":"integer","title":"Created","description":"Unix seconds."},"livemode":{"type":"boolean","title":"Livemode","description":"False in sandbox."},"merchant_id":{"type":"string","title":"Merchant Id","description":"Merchant that owns the price."},"product":{"type":"string","title":"Product","description":"Product id. Never changes."},"active":{"type":"boolean","title":"Active","description":"False means archived: no new purchase can use it."},"type":{"type":"string","enum":["one_time","recurring"],"title":"Type","description":"Never changes."},"billing_scheme":{"type":"string","const":"per_unit","title":"Billing Scheme","description":"Always per_unit.","default":"per_unit"},"currency":{"type":"string","const":"usd","title":"Currency","description":"Lowercase ISO 4217; usd only. Never changes."},"unit_amount":{"type":"integer","title":"Unit Amount","description":"Integer cents, e.g. 2900 = $29.00. Never changes."},"recurring":{"anyOf":[{"$ref":"#/components/schemas/RecurringOut"},{"type":"null"}],"description":"Billing period, or null when one_time."},"lookup_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lookup Key","description":"Your stable name for this price, or null."},"nickname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nickname","description":"Internal label, never shown to customers."},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata","description":"Your key-value pairs."},"stripe_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Id","description":"The Stripe id this object was migrated from."}},"type":"object","required":["id","created","livemode","merchant_id","product","active","type","currency","unit_amount","recurring","lookup_key","nickname","metadata","stripe_id"],"title":"PriceOut"},"PriceRecurring":{"properties":{"interval":{"type":"string","enum":["month","year"],"title":"Interval","description":"Billing period: month or year."},"interval_count":{"type":"integer","maximum":1.0,"minimum":1.0,"title":"Interval Count","description":"1 only.","default":1},"trial_period_days":{"title":"Trial Period Days","description":"Not supported on prices; set trials on the subscription."}},"additionalProperties":false,"type":"object","required":["interval"],"title":"PriceRecurring"},"PriceUpdate":{"properties":{"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active","description":"False archives it."},"lookup_key":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,200}$"},{"type":"null"}],"title":"Lookup Key","description":"Null removes it."},"transfer_lookup_key":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Transfer Lookup Key"},"nickname":{"anyOf":[{"type":"string","maxLength":250},{"type":"null"}],"title":"Nickname"},"metadata":{"anyOf":[{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"string","const":""}],"description":"Merged into the stored metadata key by key. A key sent with \"\" is removed; metadata \"\" removes every key; {} changes nothing."},{"type":"null"}],"title":"Metadata","description":"Merged into the stored metadata key by key. A key sent with \"\" is removed; metadata \"\" removes every key; {} or no metadata changes nothing; null is refused."},"stripe_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,255}$"},{"type":"null"}],"title":"Stripe Id","description":"The Stripe id this object was migrated from. Set once, on create or by PATCH while null. Unique per merchant."},"unit_amount":{"title":"Unit Amount","description":"Cannot change after create; sending it answers parameter_immutable."},"currency":{"title":"Currency","description":"Cannot change after create; sending it answers parameter_immutable."},"type":{"title":"Type","description":"Cannot change after create; sending it answers parameter_immutable."},"recurring":{"title":"Recurring","description":"Cannot change after create; sending it answers parameter_immutable."},"product":{"title":"Product","description":"Cannot change after create; sending it answers parameter_immutable."}},"additionalProperties":false,"type":"object","title":"PriceUpdate"},"ProcessorConnectionOut":{"properties":{"object":{"type":"string","const":"processor_connection","title":"Object","default":"processor_connection"},"merchant_id":{"type":"string","title":"Merchant Id","description":"The merchant this link connects."},"connect_url":{"type":"string","title":"Connect Url","description":"Send the merchant here in a browser. It expires; request a new one after expires_at or after the merchant lands on your return_url with status=failed."},"expires_at":{"type":"integer","title":"Expires At","description":"Unix seconds after which the link stops working."},"status":{"type":"string","const":"pending","title":"Status","default":"pending"}},"type":"object","required":["merchant_id","connect_url","expires_at"],"title":"ProcessorConnectionOut","description":"A one-time link that sends a merchant to connect their own processor account."},"ProductCreate":{"properties":{"merchant_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Merchant Id","description":"Optional. The merchant (mch_...). Without it: the ZeroPoint-Account header (Stripe-Account is accepted too), else the platform's only merchant in this mode.","examples":["mch_01j6..."]},"name":{"type":"string","maxLength":250,"minLength":1,"title":"Name","description":"Shown to customers. 1 to 250 characters."},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description","description":"Up to 2,000."},"active":{"type":"boolean","title":"Active","description":"False archives it.","default":true},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata","description":"Up to 50 string pairs."},"stripe_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,255}$"},{"type":"null"}],"title":"Stripe Id","description":"The Stripe id this object was migrated from. Set once, on create or by PATCH while null. Unique per merchant."}},"additionalProperties":false,"type":"object","required":["name"],"title":"ProductCreate"},"ProductOut":{"properties":{"object":{"type":"string","const":"product","title":"Object","description":"Always 'product'.","default":"product"},"id":{"type":"string","title":"Id","description":"Product id, prefixed prod_."},"created":{"type":"integer","title":"Created","description":"Unix seconds."},"updated":{"type":"integer","title":"Updated","description":"Unix seconds of the last change."},"livemode":{"type":"boolean","title":"Livemode","description":"False in sandbox."},"merchant_id":{"type":"string","title":"Merchant Id","description":"Merchant that sells this product."},"name":{"type":"string","title":"Name","description":"Shown to customers."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Longer text, or null."},"active":{"type":"boolean","title":"Active","description":"False means archived: no new purchase can use it."},"default_price":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Price","description":"An active price of this product, or null."},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata","description":"Your key-value pairs."},"stripe_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Id","description":"The Stripe id this object was migrated from."}},"type":"object","required":["id","created","updated","livemode","merchant_id","name","description","active","default_price","metadata","stripe_id"],"title":"ProductOut"},"ProductUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":250,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description","description":"Null clears it."},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active","description":"False archives it."},"default_price":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Default Price","description":"An active price of this product; null clears it."},"metadata":{"anyOf":[{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"string","const":""}],"description":"Merged into the stored metadata key by key. A key sent with \"\" is removed; metadata \"\" removes every key; {} changes nothing."},{"type":"null"}],"title":"Metadata","description":"Merged into the stored metadata key by key. A key sent with \"\" is removed; metadata \"\" removes every key; {} or no metadata changes nothing; null is refused."},"stripe_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,255}$"},{"type":"null"}],"title":"Stripe Id","description":"The Stripe id this object was migrated from. Set once, on create or by PATCH while null. Unique per merchant."}},"additionalProperties":false,"type":"object","title":"ProductUpdate"},"PromotionCodeCreate":{"properties":{"merchant_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Merchant Id","description":"Optional. The merchant (mch_...). Without it: the ZeroPoint-Account header (Stripe-Account is accepted too), else the platform's only merchant in this mode.","examples":["mch_01j6..."]},"coupon":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Coupon","description":"Coupon of the same merchant."},"promotion":{"anyOf":[{"$ref":"#/components/schemas/PromotionIn"},{"type":"null"}],"description":"Stripe's current shape; must agree with coupon if both."},"code":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9-]{1,64}$"},{"type":"null"}],"title":"Code","description":"1 to 64 of A-Z a-z 0-9 -. Generated (8 characters) when left out."},"active":{"type":"boolean","title":"Active","default":true},"customer":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Customer","description":"Only this customer may use it."},"expires_at":{"anyOf":[{"type":"integer","maximum":4102444800.0,"minimum":0.0},{"type":"null"}],"title":"Expires At","description":"Unix seconds; not after the coupon's redeem_by."},"max_redemptions":{"anyOf":[{"type":"integer","maximum":1000000.0,"minimum":1.0},{"type":"null"}],"title":"Max Redemptions","description":"This code's cap."},"restrictions":{"anyOf":[{"$ref":"#/components/schemas/RestrictionsIn"},{"type":"null"}]},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata"},"stripe_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,255}$"},{"type":"null"}],"title":"Stripe Id","description":"The Stripe id this object was migrated from. Set once, on create or by PATCH while null. Unique per merchant."}},"additionalProperties":false,"type":"object","title":"PromotionCodeCreate"},"PromotionCodeOut":{"properties":{"object":{"type":"string","const":"promotion_code","title":"Object","default":"promotion_code"},"id":{"type":"string","title":"Id","description":"Promotion code id, prefixed promo_."},"created":{"type":"integer","title":"Created","description":"Unix seconds."},"livemode":{"type":"boolean","title":"Livemode","description":"False in sandbox."},"merchant_id":{"type":"string","title":"Merchant Id","description":"Merchant that owns the code."},"code":{"type":"string","title":"Code","description":"What the customer types, matched case-insensitively."},"promotion":{"$ref":"#/components/schemas/PromotionOut","description":"The coupon, in Stripe's current shape."},"coupon":{"type":"string","title":"Coupon","description":"The coupon id, in Stripe's older shape."},"active":{"type":"boolean","title":"Active","description":"False when deactivated or when its coupon is not valid."},"customer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer","description":"Only this customer may use it, or null."},"expires_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires At","description":"Unix seconds, or null."},"max_redemptions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Redemptions","description":"This code's own cap, or null."},"times_redeemed":{"type":"integer","title":"Times Redeemed","description":"Confirmed uses of this code."},"restrictions":{"$ref":"#/components/schemas/PromotionRestrictionsOut","description":"Who and what it applies to."},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata","description":"Your key-value pairs."},"stripe_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Id","description":"The Stripe id this object was migrated from."}},"type":"object","required":["id","created","livemode","merchant_id","code","promotion","coupon","active","customer","expires_at","max_redemptions","times_redeemed","restrictions","metadata","stripe_id"],"title":"PromotionCodeOut"},"PromotionCodeUpdate":{"properties":{"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active","description":"False deactivates it."},"metadata":{"anyOf":[{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"string","const":""}],"description":"Merged into the stored metadata key by key. A key sent with \"\" is removed; metadata \"\" removes every key; {} changes nothing."},{"type":"null"}],"title":"Metadata","description":"Merged into the stored metadata key by key. A key sent with \"\" is removed; metadata \"\" removes every key; {} or no metadata changes nothing; null is refused."},"stripe_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,255}$"},{"type":"null"}],"title":"Stripe Id","description":"The Stripe id this object was migrated from. Set once, on create or by PATCH while null. Unique per merchant."},"code":{"title":"Code","description":"Cannot change after create; sending it answers parameter_immutable."},"coupon":{"title":"Coupon","description":"Cannot change after create; sending it answers parameter_immutable."},"promotion":{"title":"Promotion","description":"Cannot change after create; sending it answers parameter_immutable."},"customer":{"title":"Customer","description":"Cannot change after create; sending it answers parameter_immutable."},"expires_at":{"title":"Expires At","description":"Cannot change after create; sending it answers parameter_immutable."},"max_redemptions":{"title":"Max Redemptions","description":"Cannot change after create; sending it answers parameter_immutable."},"restrictions":{"title":"Restrictions","description":"Cannot change after create; sending it answers parameter_immutable."}},"additionalProperties":false,"type":"object","title":"PromotionCodeUpdate"},"PromotionIn":{"properties":{"type":{"type":"string","const":"coupon","title":"Type","default":"coupon"},"coupon":{"type":"string","maxLength":40,"title":"Coupon","description":"Coupon id."}},"additionalProperties":false,"type":"object","required":["coupon"],"title":"PromotionIn"},"PromotionOut":{"properties":{"type":{"type":"string","const":"coupon","title":"Type","description":"Always 'coupon'.","default":"coupon"},"coupon":{"type":"string","title":"Coupon","description":"Coupon id."}},"type":"object","required":["coupon"],"title":"PromotionOut"},"PromotionRestrictionsOut":{"properties":{"minimum_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Minimum Amount","description":"Minimum subtotal in integer cents, or null."},"minimum_amount_currency":{"anyOf":[{"type":"string","const":"usd"},{"type":"null"}],"title":"Minimum Amount Currency","description":"usd, or null."},"once_per_customer":{"type":"boolean","title":"Once Per Customer","description":"One use per customer key."}},"type":"object","required":["minimum_amount","minimum_amount_currency","once_per_customer"],"title":"PromotionRestrictionsOut"},"ReceiptOut":{"properties":{"object":{"type":"string","const":"receipt","title":"Object","default":"receipt"},"payment_id":{"type":"string","title":"Payment Id","description":"Payment the receipt belongs to."},"url":{"type":"string","title":"Url","description":"Public HTML receipt; safe to show or email to the customer."}},"type":"object","required":["payment_id","url"],"title":"ReceiptOut"},"ReconcileHealth":{"properties":{"stalled":{"type":"integer","title":"Stalled","description":"Count of processor businesses whose reconciliation cursor has stopped advancing. Zero is healthy. Business ids are deliberately not exposed here: this endpoint is unauthenticated."},"oldest_cursor_age_s":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Oldest Cursor Age S","description":"How far behind the feed the oldest cursor's read point is, in seconds, or null when no business has been polled yet. Healthy is the age floor to the age floor plus one tick (300 to 600)."}},"type":"object","required":["stalled","oldest_cursor_age_s"],"title":"ReconcileHealth"},"RecurringOut":{"properties":{"interval":{"type":"string","enum":["month","year"],"title":"Interval","description":"Billing period."},"interval_count":{"type":"integer","title":"Interval Count","description":"Always 1 in this version."}},"type":"object","required":["interval","interval_count"],"title":"RecurringOut"},"RefundCreate":{"properties":{"amount_cents":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Amount Cents","description":"Partial amount; omit to refund the remaining balance."}},"additionalProperties":false,"type":"object","title":"RefundCreate"},"RefundOut":{"properties":{"object":{"type":"string","const":"refund","title":"Object","default":"refund"},"id":{"type":"string","title":"Id","description":"Refund id, prefixed rfd_."},"created":{"type":"integer","title":"Created","description":"Unix seconds."},"livemode":{"type":"boolean","title":"Livemode","description":"False in sandbox."},"payment_id":{"type":"string","title":"Payment Id","description":"Payment being reversed."},"kind":{"type":"string","enum":["refund","void"],"title":"Kind","description":"void reverses an unsettled payment in full; refund returns settled money."},"origin":{"type":"string","enum":["api","external"],"title":"Origin","description":"api when you asked for this reversal; external when it was made outside this API and reconciliation recorded it."},"amount_cents":{"type":"integer","title":"Amount Cents","description":"Amount reversed."},"state":{"type":"string","enum":["pending","succeeded","failed"],"title":"State","description":"Recorded reversal state. A failed processor_unverified outcome remains uncertain and may later be recovered."},"failure_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Code","description":"Why it failed, e.g. processor_rejected."},"processor_transaction_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processor Transaction Id","description":"Processor-side id of the reversal. Accepted processor refunds return their own refund id. Null for simulated payments; voids and legacy reversals may remain null until reconciliation identifies the reversal in the transaction feed."},"amount":{"type":"integer","title":"Amount","description":"Stripe's name for amount_cents."},"status":{"type":"string","enum":["pending","succeeded","failed"],"title":"Status","description":"Stripe's name for state, money first: a failed reversal whose outcome is unverified (failure_code processor_unverified) reads pending, never failed, so code that refunds again on failed does not."},"payment_intent":{"type":"string","title":"Payment Intent","description":"Stripe's name for payment_id (pay_...)."},"currency":{"type":"string","title":"Currency","description":"The payment's currency, lowercase ISO 4217."}},"type":"object","required":["id","created","livemode","payment_id","kind","origin","amount_cents","state","failure_code","processor_transaction_id","amount","status","payment_intent","currency"],"title":"RefundOut"},"RestrictionsIn":{"properties":{"minimum_amount":{"anyOf":[{"type":"integer","maximum":99999999.0,"minimum":1.0},{"type":"null"}],"title":"Minimum Amount","description":"Minimum subtotal in integer cents."},"minimum_amount_currency":{"anyOf":[{"type":"string","const":"usd"},{"type":"null"}],"title":"Minimum Amount Currency"},"once_per_customer":{"type":"boolean","title":"Once Per Customer","description":"One use per customer: by email when known, else by customer id.","default":false}},"additionalProperties":false,"type":"object","title":"RestrictionsIn"},"SavePaymentMethod":{"properties":{"customer":{"type":"string","maxLength":40,"minLength":1,"title":"Customer","description":"The customer (cus_...) of the same merchant the card is saved for."},"consent":{"$ref":"#/components/schemas/Consent"},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata","description":"Optional. The new payment method's metadata."}},"additionalProperties":false,"type":"object","required":["customer","consent"],"title":"SavePaymentMethod","description":"save_payment_method on a keyed payment: save the card, then charge it (spec 2.5)."},"ScorecardCheck":{"properties":{"id":{"type":"string","enum":["signed_event_delivered","responds_fast","replay_accepted","bad_signature_rejected"],"title":"Id","description":"Which check this is."},"passed":{"type":"boolean","title":"Passed","description":"Whether your receiver passed it."},"detail":{"type":"string","title":"Detail","description":"What we observed, e.g. 'HTTP 200 in 84 ms'."}},"type":"object","required":["id","passed","detail"],"title":"ScorecardCheck"},"SimulateRequest":{"properties":{"payment_id":{"type":"string","maxLength":40,"title":"Payment Id"},"outcome":{"type":"string","enum":["approve","decline","cancel","timeout"],"title":"Outcome","description":"approve: card read and approved; decline: card read and declined; cancel: customer pressed cancel; timeout: nobody presented a card, the payment expires."}},"additionalProperties":false,"type":"object","required":["payment_id","outcome"],"title":"SimulateRequest"},"StripeRefundCreate":{"properties":{"payment_intent":{"anyOf":[{"type":"string","maxLength":40,"minLength":1},{"type":"null"}],"title":"Payment Intent","description":"The payment to refund (pay_...). Required (or payment)."},"payment":{"anyOf":[{"type":"string","maxLength":40,"minLength":1},{"type":"null"}],"title":"Payment","description":"The same as payment_intent."},"charge":{"anyOf":[{"type":"string","maxLength":40,"minLength":1},{"type":"null"}],"title":"Charge","description":"Refused: ZeroPoint has no charge objects. Send payment_intent."},"amount":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Amount","description":"Partial amount in cents; omit to refund the remaining balance."},"reason":{"anyOf":[{"type":"string","enum":["duplicate","fraudulent","requested_by_customer"]},{"type":"null"}],"title":"Reason","description":"Echoed on this answer only; not stored and not sent to the processor."}},"additionalProperties":false,"type":"object","title":"StripeRefundCreate"},"SubscriptionCreate":{"properties":{"merchant_id":{"anyOf":[{"type":"string","maxLength":40,"minLength":1},{"type":"null"}],"title":"Merchant Id","description":"Optional. The merchant (mch_...). Without it: the ZeroPoint-Account header (Stripe-Account is accepted too), else the platform's only merchant in this mode."},"customer":{"type":"string","maxLength":40,"minLength":1,"title":"Customer","description":"The customer (cus_...) of that merchant."},"items":{"items":{"$ref":"#/components/schemas/SubscriptionItem"},"type":"array","maxItems":1,"minItems":1,"title":"Items","description":"Exactly one item: [{price}]."},"default_payment_method":{"anyOf":[{"type":"string","maxLength":40,"minLength":1},{"type":"null"}],"title":"Default Payment Method","description":"The customer's saved card (pm_...) to charge. Required."},"promotion_code":{"anyOf":[{"type":"string","maxLength":40,"minLength":1},{"type":"null"}],"title":"Promotion Code","description":"A promotion code (promo_...) to apply to the first invoice."},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata","description":"Up to 50 pairs."},"payment_behavior":{"type":"string","maxLength":40,"title":"Payment Behavior","description":"allow_incomplete (default): a declined first payment answers 200 with the subscription incomplete. error_if_incomplete: it answers 402 and the subscription ends incomplete_expired.","default":"allow_incomplete"},"proration_behavior":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Proration Behavior","description":"always_invoice only in v1."},"billing_cycle_anchor":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Billing Cycle Anchor","description":"Not supported in v1: the anchor is the create instant."}},"additionalProperties":false,"type":"object","required":["customer","items"],"title":"SubscriptionCreate"},"SubscriptionItem":{"properties":{"price":{"type":"string","maxLength":40,"minLength":1,"title":"Price","description":"The recurring price (price_...)."}},"additionalProperties":false,"type":"object","required":["price"],"title":"SubscriptionItem"},"SubscriptionItemChange":{"properties":{"id":{"type":"string","maxLength":40,"minLength":1,"title":"Id","description":"The subscription's item (si_...)."},"price":{"type":"string","maxLength":40,"minLength":1,"title":"Price","description":"The new recurring price (price_...)."}},"additionalProperties":false,"type":"object","required":["id","price"],"title":"SubscriptionItemChange"},"SubscriptionUpdate":{"properties":{"items":{"anyOf":[{"items":{"$ref":"#/components/schemas/SubscriptionItemChange"},"type":"array","maxItems":1,"minItems":1},{"type":"null"}],"title":"Items","description":"A plan change: [{id: si_..., price: price_...}]. A downgrade, a lateral change or an annual to monthly switch applies at the end of the current period."},"change_timing":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Change Timing","description":"period_end (the default for a downgrade); now is refused for a downgrade."},"proration_behavior":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Proration Behavior","description":"always_invoice, required for a change charged now (an upgrade or a monthly to annual switch); no other value is accepted."},"proration_date":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Proration Date","description":"Unix seconds to prorate from (pinned from a preview): inside the current period, not in the future and at most 1 hour old. Default: now."},"payment_behavior":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Payment Behavior","description":"pending_if_incomplete (the default): the plan changes only once the payment captures. allow_incomplete is refused."},"metadata":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Metadata","description":"Merged per key into the subscription's metadata; an empty value removes it."},"default_payment_method":{"anyOf":[{"type":"string","maxLength":40,"minLength":1},{"type":"null"}],"title":"Default Payment Method","description":"The customer's saved card (pm_...) to charge from now on."},"cancel_at_period_end":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Cancel At Period End","description":"true: end the subscription at the end of the current period (immediate while past_due, unpaid or incomplete). false: undo it before that period ends."}},"additionalProperties":false,"type":"object","title":"SubscriptionUpdate"},"TerminalCreate":{"properties":{"kind":{"type":"string","enum":["simulated","physical"],"title":"Kind","description":"simulated needs no hardware; physical registers a discovered device."},"label":{"type":"string","maxLength":80,"minLength":1,"title":"Label","description":"Your name for the terminal.","examples":["Front desk"]},"sim_behavior":{"type":"string","enum":["manual","auto_approve","auto_decline"],"title":"Sim Behavior","description":"Simulated only. manual: you call /v1/sandbox/terminals/{id}/simulate; auto_approve/auto_decline: the terminal answers by itself after sim_delay_s.","default":"manual"},"sim_delay_s":{"type":"integer","maximum":30.0,"minimum":0.0,"title":"Sim Delay S","description":"Simulated only.","default":0},"device_id":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Device Id","description":"Physical only: device_id from /terminals/discover."},"serial":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Serial"},"model":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Model"}},"additionalProperties":false,"type":"object","required":["kind","label"],"title":"TerminalCreate"},"TerminalOptions":{"properties":{"tip":{"type":"boolean","title":"Tip","description":"Let the customer add a tip on the terminal; it lands in tip_cents.","default":false},"receipt_screen":{"type":"boolean","title":"Receipt Screen","description":"Show the terminal's own receipt screen (print, SMS, email) after the sale.","default":false}},"additionalProperties":false,"type":"object","title":"TerminalOptions","description":"What a physical terminal is told for one sale. Simulated terminals store and echo it."},"TerminalOut":{"properties":{"object":{"type":"string","const":"terminal","title":"Object","default":"terminal"},"id":{"type":"string","title":"Id","description":"Terminal id, prefixed term_."},"created":{"type":"integer","title":"Created","description":"Unix seconds."},"livemode":{"type":"boolean","title":"Livemode","description":"False in sandbox."},"merchant_id":{"type":"string","title":"Merchant Id","description":"Owning merchant."},"kind":{"type":"string","enum":["physical","simulated"],"title":"Kind","description":"simulated terminals run the full payment lifecycle without hardware."},"label":{"type":"string","title":"Label","description":"Your name for it, e.g. 'Front desk'."},"status":{"type":"string","enum":["online","offline","unknown"],"title":"Status","description":"Last known state; POST /ping refreshes it."},"device_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id","description":"Processor device id for physical terminals."},"serial":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serial","description":"Hardware serial for physical terminals."},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Hardware model when known."},"store_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Store Id","description":"Processor store the device belongs to (physical only)."},"last_seen":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Seen","description":"Unix seconds of the last successful ping."},"sim_behavior":{"anyOf":[{"type":"string","enum":["manual","auto_approve","auto_decline"]},{"type":"null"}],"title":"Sim Behavior","description":"Simulated only. manual waits for POST /v1/sandbox/terminals/{id}/simulate; auto_approve and auto_decline resolve on their own after sim_delay_s."},"sim_delay_s":{"type":"integer","title":"Sim Delay S","description":"Seconds before an auto behavior fires (0-30)."}},"type":"object","required":["id","created","livemode","merchant_id","kind","label","status","device_id","serial","model","store_id","last_seen","sim_behavior","sim_delay_s"],"title":"TerminalOut"},"TerminalUpdate":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Label"},"sim_behavior":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Sim Behavior"},"sim_delay_s":{"anyOf":[{"type":"integer","maximum":30.0,"minimum":0.0},{"type":"null"}],"title":"Sim Delay S"}},"additionalProperties":false,"type":"object","title":"TerminalUpdate"},"TestCard":{"properties":{"brand":{"type":"string","title":"Brand","description":"Card brand."},"number":{"type":"string","title":"Number","description":"Card number to type into the sandbox card form."},"expiry":{"type":"string","title":"Expiry","description":"Any future MM/YY."},"cvv":{"type":"string","title":"Cvv","description":"Any 3 digits."},"outcome":{"type":"string","title":"Outcome","description":"What the sandbox does with it."}},"type":"object","required":["brand","number","expiry","cvv","outcome"],"title":"TestCard"},"TestClockAdvance":{"properties":{"frozen_time":{"type":"integer","maximum":253402300799.0,"minimum":0.0,"title":"Frozen Time","description":"Unix seconds to advance to: later than the current frozen_time, and at most two intervals of the shortest subscription on the clock ahead (two years with none)."}},"additionalProperties":false,"type":"object","required":["frozen_time"],"title":"TestClockAdvance"},"TestClockCreate":{"properties":{"frozen_time":{"type":"integer","maximum":253402300799.0,"minimum":0.0,"title":"Frozen Time","description":"Unix seconds: the clock's starting time."},"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Name","description":"Optional label."}},"additionalProperties":false,"type":"object","required":["frozen_time"],"title":"TestClockCreate"},"VoidBody":{"properties":{},"additionalProperties":false,"type":"object","title":"VoidBody","description":"No fields: a void always reverses the full amount, so amount_cents is rejected here."},"WebhookCreate":{"properties":{"url":{"type":"string","maxLength":2000,"minLength":12,"title":"Url","description":"HTTPS URL on a public host.","examples":["https://api.acme.test/zeropoint/webhook"]},"event_types":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Event Types","description":"Subscribe to these types. Empty means every payment event; billing events (checkout, invoice, subscription, customer, payment method) are sent only to endpoints that list them or use [\"*\"]. [\"*\"] must be the only entry. Valid: checkout.session.completed, checkout.session.expired, customer.created, customer.deleted, customer.subscription.created, customer.subscription.deleted, customer.subscription.updated, customer.updated, invoice.marked_uncollectible, invoice.paid, invoice.payment_failed, invoice.payment_succeeded, invoice.upcoming, invoice.voided, merchant.state_changed, payment.canceled, payment.expired, payment.failed, payment.needs_attention, payment.processing, payment.reversed_late, payment.succeeded, payment_method.attached, payment_method.detached, refund.failed, refund.succeeded, terminal.offline, terminal.online, webhook.test."},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Description"},"stripe_signature_header":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stripe Signature Header","description":"Optional, default false. true: each delivery also carries Stripe-Signature (the same value as ZeroPoint-Signature) for code that verifies with Stripe's webhooks.constructEvent. Leave it off for a URL that also receives real Stripe deliveries during a migration."},"stripe_compatible_payload":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stripe Compatible Payload","description":"Optional, default false. true: a checkout session whose payment is being confirmed is delivered with payment_status unpaid and zeropoint_payment_status processing, so code copied from Stripe's fulfilment guide grants nothing early."}},"additionalProperties":false,"type":"object","required":["url"],"title":"WebhookCreate"},"WebhookEndpointCreated":{"properties":{"object":{"type":"string","const":"webhook_endpoint","title":"Object","default":"webhook_endpoint"},"id":{"type":"string","title":"Id","description":"Endpoint id, prefixed whk_."},"created":{"type":"integer","title":"Created","description":"Unix seconds."},"livemode":{"type":"boolean","title":"Livemode","description":"False in sandbox."},"url":{"type":"string","title":"Url","description":"HTTPS URL we POST events to."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free text for your own bookkeeping."},"event_types":{"items":{"type":"string"},"type":"array","title":"Event Types","description":"Subscribed types; empty means every payment event."},"active":{"type":"boolean","title":"Active","description":"Inactive endpoints receive nothing."},"stripe_signature_header":{"type":"boolean","title":"Stripe Signature Header","description":"true: every delivery also carries Stripe-Signature with the same value as ZeroPoint-Signature, so Stripe's webhooks.constructEvent verifies it. Off by default.","default":false},"stripe_compatible_payload":{"type":"boolean","title":"Stripe Compatible Payload","description":"true: a checkout session whose payment is being confirmed is delivered with payment_status unpaid (zeropoint_payment_status says processing), as a Stripe SDK caller reads it. Off by default: the native payload.","default":false},"secret":{"type":"string","title":"Secret","description":"Signing secret, shown only on create and rotate-secret. Store it now."}},"type":"object","required":["id","created","livemode","url","description","event_types","active","secret"],"title":"WebhookEndpointCreated"},"WebhookEndpointOut":{"properties":{"object":{"type":"string","const":"webhook_endpoint","title":"Object","default":"webhook_endpoint"},"id":{"type":"string","title":"Id","description":"Endpoint id, prefixed whk_."},"created":{"type":"integer","title":"Created","description":"Unix seconds."},"livemode":{"type":"boolean","title":"Livemode","description":"False in sandbox."},"url":{"type":"string","title":"Url","description":"HTTPS URL we POST events to."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free text for your own bookkeeping."},"event_types":{"items":{"type":"string"},"type":"array","title":"Event Types","description":"Subscribed types; empty means every payment event."},"active":{"type":"boolean","title":"Active","description":"Inactive endpoints receive nothing."},"stripe_signature_header":{"type":"boolean","title":"Stripe Signature Header","description":"true: every delivery also carries Stripe-Signature with the same value as ZeroPoint-Signature, so Stripe's webhooks.constructEvent verifies it. Off by default.","default":false},"stripe_compatible_payload":{"type":"boolean","title":"Stripe Compatible Payload","description":"true: a checkout session whose payment is being confirmed is delivered with payment_status unpaid (zeropoint_payment_status says processing), as a Stripe SDK caller reads it. Off by default: the native payload.","default":false}},"type":"object","required":["id","created","livemode","url","description","event_types","active"],"title":"WebhookEndpointOut"},"WebhookScorecardOut":{"properties":{"object":{"type":"string","const":"webhook_scorecard","title":"Object","default":"webhook_scorecard"},"webhook_id":{"type":"string","title":"Webhook Id","description":"Endpoint that was exercised."},"livemode":{"type":"boolean","title":"Livemode","description":"False in sandbox."},"passed":{"type":"boolean","title":"Passed","description":"True only when every check passed."},"checks":{"items":{"$ref":"#/components/schemas/ScorecardCheck"},"type":"array","title":"Checks","description":"One entry per check, in the order they ran."},"delivery_id":{"type":"string","title":"Delivery Id","description":"The signed webhook.test delivery the first check made; GET /v1/deliveries/{id} shows it."},"replay_delivery_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Replay Delivery Id","description":"The second delivery of that same event id, made by the replay_accepted check; null when the first delivery failed and the replay was skipped. The bad-signature probe is not a delivery and has no id."}},"type":"object","required":["webhook_id","livemode","passed","checks","delivery_id","replay_delivery_id"],"title":"WebhookScorecardOut"},"WebhookUpdate":{"properties":{"url":{"anyOf":[{"type":"string","maxLength":2000,"minLength":12},{"type":"null"}],"title":"Url"},"event_types":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":50},{"type":"null"}],"title":"Event Types"},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Description"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"},"stripe_signature_header":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stripe Signature Header"},"stripe_compatible_payload":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stripe Compatible Payload"}},"additionalProperties":false,"type":"object","title":"WebhookUpdate"}}}}