{"openapi":"3.1.0","info":{"title":"FloatPay API","version":"1.0.0","description":"The FloatPay payment API (ADR-005). All requests and responses are JSON. Money is always integer minor units (1050 is $10.50). `created_at` on a Transaction or Customer is gateway-local with NO timezone offset — do not parse it as UTC (ADR-005 §6). Pagination is page-based, not cursor: `{data, page, limit, total, has_more}` (ADR-005 §7). Every POST requires an Idempotency-Key (ADR-005 §8), except where noted."},"servers":[{"url":"https://float-pay.com/api","description":"Production"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Transactions"},{"name":"Customers"},{"name":"Products & prices"},{"name":"Checkout Sessions"},{"name":"Payment Links"},{"name":"Invoices"},{"name":"Webhooks"},{"name":"Events"},{"name":"Public"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Authorization: Bearer fp_test_… or fp_live_…. The key decides test or live — there is no mode parameter, so nothing in a request can move a call between them (ADR-005 §4)."}},"schemas":{"Transaction":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"transaction"},"status":{"type":"string","enum":["succeeded","pending_settlement","requires_capture","failed","canceled","abandoned","processing","unknown"]},"amount":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units: 1050 is $10.50."},"amount_refunded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units, always positive."},"currency":{"type":"string"},"order_id":{"type":["string","null"]},"created_at":{"description":"ISO 8601 with NO timezone offset, in the gateway account's own local time (ADR-005 §6). Do not parse as UTC.","type":["string","null"]},"customer":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["first_name","last_name","email"],"additionalProperties":false},"payment_method":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"},"brand":{"type":["string","null"]},"last4":{"type":["string","null"]}},"required":["type","brand","last4"],"additionalProperties":false},{"type":"null"}]},"events":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"amount":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units."},"succeeded":{"type":"boolean"},"message":{"type":["string","null"]},"created_at":{"description":"Gateway-local, no timezone offset — ADR-005 §6.","type":["string","null"]}},"required":["type","amount","succeeded","message","created_at"],"additionalProperties":false}}},"required":["id","object","status","amount","amount_refunded","currency","order_id","created_at","customer","payment_method","events"],"additionalProperties":false},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","card_error","rate_limit_error","gateway_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"},"request_log_url":{"type":"string"},"transaction":{"description":"Present on card_error only.","anyOf":[{"$ref":"#/components/schemas/Transaction"},{"type":"null"}]}},"required":["type","code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"TransactionCreateRequest":{"type":"object","properties":{"amount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Minor units. 1050 is $10.50."},"payment_token":{"description":"Single-use token from FloatPay.js. Provide this OR customer_vault_id.","type":"string"},"customer_vault_id":{"description":"An existing stored profile.","type":"string"},"order_id":{"description":"Your own reference; shown in the dashboard and CSV export.","type":"string"},"capture":{"description":"false authorizes without charging; capture later. Defaults to true.","type":"boolean"},"customer":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string"}},"additionalProperties":false}},"required":["amount"],"additionalProperties":false},"RefundRequest":{"type":"object","properties":{"amount":{"description":"Minor units. Omit for a full refund.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"additionalProperties":false},"CaptureRequest":{"type":"object","properties":{"amount":{"description":"Minor units. Omit to capture the full hold.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"additionalProperties":false},"VoidRequest":{"type":"object","properties":{},"additionalProperties":false},"TransactionList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"has_more":{"type":"boolean"}},"required":["object","data","page","limit","total","has_more"],"additionalProperties":false},"Customer":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"customer"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"company":{"type":["string","null"]},"payment_method":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"},"brand":{"type":["string","null"]},"last4":{"type":["string","null"]},"exp_month":{"type":["string","null"]},"exp_year":{"type":["string","null"]}},"required":["type","brand","last4","exp_month","exp_year"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":["string","null"]},"updated_at":{"type":["string","null"]}},"required":["id","object","first_name","last_name","email","company","payment_method","created_at","updated_at"],"additionalProperties":false},"CustomerList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"has_more":{"type":"boolean"}},"required":["object","data","page","limit","total","has_more"],"additionalProperties":false},"ProductCreateRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":250},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"image_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"active":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["name"],"additionalProperties":false},"ProductUpdateRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":250},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"image_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"active":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"additionalProperties":false},"PriceCreateRequest":{"type":"object","properties":{"product":{"type":"string","minLength":1},"currency":{"type":"string","const":"USD"},"unit_amount":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["one_time","recurring"]},"recurring_interval":{"type":"string","enum":["day","week","month","year"]},"recurring_interval_count":{"type":"integer","minimum":1,"maximum":52},"nickname":{"anyOf":[{"type":"string","maxLength":250},{"type":"null"}]},"active":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["product","unit_amount","type"],"additionalProperties":false},"PriceUpdateRequest":{"type":"object","properties":{"active":{"type":"boolean"},"nickname":{"anyOf":[{"type":"string","maxLength":250},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"additionalProperties":false},"Product":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"product"},"name":{"type":"string"},"description":{"type":["string","null"]},"image_url":{"type":["string","null"]},"active":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","object","name","description","image_url","active","metadata","created_at","updated_at"],"additionalProperties":false},"ProductList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"has_more":{"type":"boolean"}},"required":["object","data","page","limit","total","has_more"],"additionalProperties":false},"DeletedProduct":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"product"},"deleted":{"type":"boolean","const":true}},"required":["id","object","deleted"],"additionalProperties":false},"Price":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"price"},"product":{"type":"string"},"currency":{"type":"string"},"unit_amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units. 1050 is $10.50."},"type":{"type":"string","enum":["one_time","recurring"]},"recurring":{"anyOf":[{"type":"object","properties":{"interval":{"type":"string","enum":["day","week","month","year"]},"interval_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["interval","interval_count"],"additionalProperties":false},{"type":"null"}]},"active":{"type":"boolean"},"nickname":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","object","product","currency","unit_amount","type","recurring","active","nickname","metadata","created_at","updated_at"],"additionalProperties":false},"PriceList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Price"}},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"has_more":{"type":"boolean"}},"required":["object","data","page","limit","total","has_more"],"additionalProperties":false},"CheckoutSessionCreateRequest":{"type":"object","properties":{"kind":{"description":"Only \"payment\" today.","type":"string","const":"payment"},"amount":{"description":"Minor units. Provide this OR line_items, never both.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"line_items":{"description":"Itemised, and snapshotted at creation — at most 20 entries.","type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"unit_amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units."},"quantity":{"description":"Defaults to 1.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["name","unit_amount"],"additionalProperties":false}},"currency":{"type":"string","const":"USD"},"customer_email":{"type":"string"},"customer_name":{"type":"string"},"description":{"description":"Shown on the pay page and stored with the charge.","type":"string"},"capture":{"description":"false authorizes without charging. Defaults to true.","type":"boolean"},"success_url":{"description":"https (http://localhost allowed in Test Mode). {CHECKOUT_SESSION_ID} is substituted.","type":"string"},"cancel_url":{"type":"string"},"expires_at":{"description":"ISO 8601 or Unix seconds. Clamped to 24 hours rather than rejected.","type":["string","number"]},"metadata":{"description":"At most 20 string values.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"additionalProperties":false},"SessionDiscount":{"type":"object","properties":{"promotion_code_id":{"type":"string"},"coupon_id":{"type":"string"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units, the amount deducted."}},"required":["promotion_code_id","coupon_id","amount"],"additionalProperties":false},"CheckoutSession":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"checkout.session"},"url":{"type":"string","description":"Send the customer here."},"kind":{"type":"string","enum":["payment","setup"]},"status":{"type":"string","enum":["open","complete","expired"]},"payment_status":{"type":"string","enum":["paid","unpaid"],"description":"The field to branch on — a browser arriving at success_url proves nothing."},"line_items":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"unit_amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["name","unit_amount","quantity"],"additionalProperties":false}},{"type":"null"}]},"subtotal":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units, BEFORE any promotion code."},"amount_total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units. The amount actually charged — after any discount."},"currency":{"type":"string"},"customer_email":{"type":["string","null"]},"customer_name":{"type":["string","null"]},"description":{"type":["string","null"]},"capture":{"type":"boolean"},"success_url":{"type":["string","null"]},"cancel_url":{"type":["string","null"]},"expires_at":{"type":"string"},"completed_at":{"type":["string","null"]},"transaction_id":{"description":"Set once the session is paid — the charge you can refund.","type":["string","null"]},"invoice":{"description":"The Invoice this session pays, when it was created from one.","type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"discount":{"anyOf":[{"$ref":"#/components/schemas/SessionDiscount"},{"type":"null"}]},"allow_promotion_codes":{"type":"boolean"},"livemode":{"type":"boolean"},"created_at":{"type":"string"}},"required":["id","object","url","kind","status","payment_status","line_items","subtotal","amount_total","currency","customer_email","customer_name","description","capture","success_url","cancel_url","expires_at","completed_at","transaction_id","invoice","metadata","discount","allow_promotion_codes","livemode","created_at"],"additionalProperties":false},"CheckoutSessionList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/CheckoutSession"}},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"has_more":{"type":"boolean"}},"required":["object","data","page","limit","total","has_more"],"additionalProperties":false},"WebhookEndpointCreateRequest":{"type":"object","properties":{"url":{"type":"string","description":"https, and reachable from the public internet."},"enabled_events":{"type":"array","items":{"type":"string"},"description":"Catalog event types, or [\"*\"] for every event — including ones added later."},"description":{"type":"string"}},"required":["url","enabled_events"],"additionalProperties":false},"WebhookEndpointUpdateRequest":{"type":"object","properties":{"url":{"type":"string"},"enabled_events":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"status":{"type":"string","enum":["enabled","disabled"]}},"additionalProperties":false},"WebhookEndpointRollSecretRequest":{"type":"object","properties":{"grace_hours":{"description":"24 (default) keeps the old secret signing alongside the new one; 0 cuts it now.","anyOf":[{"type":"number","const":0},{"type":"number","const":24}]}},"additionalProperties":false},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"webhook_endpoint"},"url":{"type":"string"},"description":{"type":["string","null"]},"enabled_events":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["enabled","disabled"]},"disabled_reason":{"type":["string","null"]},"livemode":{"type":"boolean"},"mode":{"type":"string","enum":["test","live"]},"secret_preview":{"type":"string"},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix seconds."},"updated":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix seconds."},"secret":{"description":"Present ONLY on create and secret roll — never again, by any call.","type":"string"}},"required":["id","object","url","description","enabled_events","status","disabled_reason","livemode","mode","secret_preview","created","updated"],"additionalProperties":false},"WebhookEndpointList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"has_more":{"type":"boolean"}},"required":["object","data","page","limit","total","has_more"],"additionalProperties":false},"DeletedWebhookEndpoint":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"webhook_endpoint"},"deleted":{"type":"boolean","const":true}},"required":["id","object","deleted"],"additionalProperties":false},"Event":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"event"},"type":{"type":"string","description":"A catalog event type, e.g. transaction.succeeded."},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix seconds."},"livemode":{"type":"boolean"},"data":{"type":"object","properties":{"object":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["object"],"additionalProperties":false},"request":{"type":"object","properties":{"id":{"type":["string","null"]},"idempotency_key":{"type":["string","null"]}},"required":["id","idempotency_key"],"additionalProperties":false}},"required":["id","object","type","created","livemode","data","request"],"additionalProperties":false},"EventList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"has_more":{"type":"boolean"}},"required":["object","data","page","limit","total","has_more"],"additionalProperties":false},"TestEventCreateRequest":{"type":"object","properties":{"type":{"type":"string","description":"A catalog type — see the Webhooks section for the list."},"data":{"description":"Merged over a realistic sample for the type. Omit it to send the sample as-is.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false},"PaymentLinkCreateRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":250},"line_items":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"price_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":250},"unit_amount":{"type":"integer","minimum":1,"maximum":99999999},"quantity":{"type":"integer","minimum":1,"maximum":999},"adjustable_quantity":{"type":"object","properties":{"enabled":{"type":"boolean"},"min":{"type":"integer","minimum":1,"maximum":999},"max":{"type":"integer","minimum":1,"maximum":999}},"required":["enabled"],"additionalProperties":false}},"additionalProperties":false}},"custom_amount":{"type":"object","properties":{"enabled":{"type":"boolean","const":true},"minimum":{"type":"integer","minimum":1,"maximum":99999999},"maximum":{"type":"integer","minimum":1,"maximum":99999999},"presets":{"maxItems":5,"type":"array","items":{"type":"integer","minimum":1,"maximum":99999999}},"label":{"type":"string","minLength":1,"maxLength":250}},"required":["minimum","maximum"],"additionalProperties":false},"collect":{"type":"object","properties":{"phone":{"type":"boolean"},"address":{"type":"boolean"}},"additionalProperties":false},"custom_fields":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9_]{1,30}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"type":"string","enum":["text","numeric","dropdown"]},"options":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"optional":{"type":"boolean"}},"required":["key","label","type"],"additionalProperties":false}},"after_completion":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"message":{"type":"string","minLength":1,"maxLength":500}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"redirect"},"url":{"type":"string","minLength":1,"maxLength":2048}},"required":["type","url"],"additionalProperties":false}]},"restrictions":{"anyOf":[{"type":"object","properties":{"completed_sessions":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":1000000}},"required":["limit"],"additionalProperties":false}},"required":["completed_sessions"],"additionalProperties":false},{"type":"null"}]},"inactive_message":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"active":{"type":"boolean"},"allow_promotion_codes":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["name"],"additionalProperties":false},"PaymentLinkUpdateRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":250},"active":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":500}},"after_completion":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"message":{"type":"string","minLength":1,"maxLength":500}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"redirect"},"url":{"type":"string","minLength":1,"maxLength":2048}},"required":["type","url"],"additionalProperties":false}]},"inactive_message":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"restrictions":{"anyOf":[{"type":"object","properties":{"completed_sessions":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":1000000}},"required":["limit"],"additionalProperties":false}},"required":["completed_sessions"],"additionalProperties":false},{"type":"null"}]},"allow_promotion_codes":{"type":"boolean"}},"additionalProperties":false},"PaymentLink":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"payment_link"},"url":{"type":"string","description":"Share this. It is the whole product."},"name":{"type":"string","description":"Your own label. The customer never sees it."},"active":{"type":"boolean"},"line_items":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"price_id":{"type":["string","null"]},"name":{"type":"string"},"unit_amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units."},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"adjustable_quantity":{"type":"object","properties":{"enabled":{"type":"boolean"},"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["enabled","min","max"],"additionalProperties":false}},"required":["price_id","name","unit_amount","quantity","adjustable_quantity"],"additionalProperties":false}},{"type":"null"}]},"custom_amount":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean","const":true},"minimum":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units."},"maximum":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units."},"presets":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"label":{"type":"string"}},"required":["enabled","minimum","maximum","presets"],"additionalProperties":false},{"type":"null"}]},"currency":{"type":"string"},"collect":{"type":"object","properties":{"phone":{"type":"boolean"},"address":{"type":"boolean"}},"required":["phone","address"],"additionalProperties":false},"custom_fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["text","numeric","dropdown"]},"options":{"type":"array","items":{"type":"string"}},"optional":{"type":"boolean"}},"required":["key","label","type","optional"],"additionalProperties":false}},"after_completion":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"redirect"},"url":{"type":"string"}},"required":["type","url"],"additionalProperties":false}]},"restrictions":{"anyOf":[{"type":"object","properties":{"completed_sessions":{"type":"object","properties":{"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["limit"],"additionalProperties":false}},"required":["completed_sessions"],"additionalProperties":false},{"type":"null"}]},"inactive_message":{"type":["string","null"]},"allow_promotion_codes":{"type":"boolean","description":"Off by default — shows a code field on the pay page."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"completed_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Payments taken through this link."},"livemode":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","object","url","name","active","line_items","custom_amount","currency","collect","custom_fields","after_completion","restrictions","inactive_message","allow_promotion_codes","metadata","completed_count","livemode","created_at","updated_at"],"additionalProperties":false},"PaymentLinkList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PaymentLink"}},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"has_more":{"type":"boolean"}},"required":["object","data","page","limit","total","has_more"],"additionalProperties":false},"InvoiceCreateRequest":{"type":"object","properties":{"customer_email":{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"customer_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"customer_vault_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"billing_address":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"state":{"type":"string","maxLength":100},"postal_code":{"type":"string","maxLength":20},"country":{"type":"string","maxLength":60}},"additionalProperties":false},{"type":"null"}]},"items":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"price":{"type":"string","minLength":1,"maxLength":64},"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount":{"type":"integer","minimum":0,"maximum":99999999}},"additionalProperties":false}},"discount_amount":{"type":"integer","minimum":0,"maximum":99999999},"tax_amount":{"type":"integer","minimum":0,"maximum":99999999},"due_date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"days_until_due":{"type":"integer","minimum":0,"maximum":365},"collection":{"type":"string","const":"send_invoice"},"memo":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"footer":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"custom_fields":{"maxItems":4,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":40},"value":{"type":"string","minLength":1,"maxLength":140}},"required":["label","value"],"additionalProperties":false}},"reminder_schedule":{"type":"object","properties":{"before_days":{"maxItems":4,"type":"array","items":{"type":"integer","minimum":1,"maximum":365}},"on_due":{"type":"boolean"},"after_days":{"maxItems":4,"type":"array","items":{"type":"integer","minimum":1,"maximum":365}}},"additionalProperties":false},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["customer_email"],"additionalProperties":false},"InvoiceUpdateRequest":{"type":"object","properties":{"customer_email":{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"customer_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"customer_vault_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"billing_address":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"state":{"type":"string","maxLength":100},"postal_code":{"type":"string","maxLength":20},"country":{"type":"string","maxLength":60}},"additionalProperties":false},{"type":"null"}]},"items":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"price":{"type":"string","minLength":1,"maxLength":64},"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount":{"type":"integer","minimum":0,"maximum":99999999}},"additionalProperties":false}},"discount_amount":{"type":"integer","minimum":0,"maximum":99999999},"tax_amount":{"type":"integer","minimum":0,"maximum":99999999},"due_date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"days_until_due":{"type":"integer","minimum":0,"maximum":365},"collection":{"type":"string","const":"send_invoice"},"memo":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"footer":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"custom_fields":{"maxItems":4,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":40},"value":{"type":"string","minLength":1,"maxLength":140}},"required":["label","value"],"additionalProperties":false}},"reminder_schedule":{"type":"object","properties":{"before_days":{"maxItems":4,"type":"array","items":{"type":"integer","minimum":1,"maximum":365}},"on_due":{"type":"boolean"},"after_days":{"maxItems":4,"type":"array","items":{"type":"integer","minimum":1,"maximum":365}}},"additionalProperties":false},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"additionalProperties":false},"Invoice":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"invoice"},"number":{"description":"\"INV-0001\". Null until finalized.","type":["string","null"]},"status":{"type":"string","enum":["draft","open","paid","void","uncollectible"]},"past_due":{"type":"boolean","description":"Derived, not stored: open, with a due date now behind us."},"customer_email":{"type":"string"},"customer_name":{"type":["string","null"]},"customer_vault_id":{"type":["string","null"]},"billing_address":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit_amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units."},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units."},"price":{"description":"The catalog price this line was taken from, if any.","type":["string","null"]}},"required":["description","quantity","unit_amount","amount","price"],"additionalProperties":false}},"subtotal":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units."},"discount_amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units."},"tax_amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units."},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units."},"amount_due":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"What is still owed. Zero once paid, void or written off — the field to branch on."},"currency":{"type":"string"},"due_date":{"description":"YYYY-MM-DD.","type":["string","null"]},"collection":{"type":"string","const":"send_invoice"},"memo":{"type":["string","null"]},"footer":{"type":["string","null"]},"custom_fields":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"],"additionalProperties":false}},"reminder_schedule":{"type":"object","properties":{"before_days":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"Days BEFORE the due date to remind."},"on_due":{"type":"boolean"},"after_days":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"Days AFTER the due date to chase."}},"required":["before_days","on_due","after_days"],"additionalProperties":false},"reminders_sent":{"type":"array","items":{"type":"string"},"description":"Reminder slots already sent: \"before_3\", \"on_due\", \"after_7\"."},"hosted_invoice_url":{"type":"string","description":"Send your customer here; also the link in the invoice email."},"invoice_pdf":{"type":"string"},"sent_at":{"type":["string","null"]},"finalized_at":{"type":["string","null"]},"paid_at":{"type":["string","null"]},"voided_at":{"type":["string","null"]},"marked_uncollectible_at":{"type":["string","null"]},"transaction_id":{"description":"The charge that paid it. Null when paid out of band.","type":["string","null"]},"paid_out_of_band":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"livemode":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","object","number","status","past_due","customer_email","customer_name","customer_vault_id","billing_address","lines","subtotal","discount_amount","tax_amount","total","amount_due","currency","due_date","collection","memo","footer","custom_fields","reminder_schedule","reminders_sent","hosted_invoice_url","invoice_pdf","sent_at","finalized_at","paid_at","voided_at","marked_uncollectible_at","transaction_id","paid_out_of_band","metadata","livemode","created_at","updated_at"],"additionalProperties":false},"InvoiceList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"has_more":{"type":"boolean"}},"required":["object","data","page","limit","total","has_more"],"additionalProperties":false},"DeletedInvoice":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"invoice"},"deleted":{"type":"boolean","const":true}},"required":["id","object","deleted"],"additionalProperties":false},"CouponCreateRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":250},"percent_off":{"type":"integer","minimum":1,"maximum":100},"amount_off":{"type":"integer","minimum":1,"maximum":99999999},"currency":{"type":"string","const":"USD"},"max_redemptions":{"type":"integer","minimum":1,"maximum":9007199254740991},"redeem_by":{"type":["string","number"]},"active":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["name"],"additionalProperties":false},"CouponUpdateRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":250},"active":{"type":"boolean"},"max_redemptions":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"redeem_by":{"type":["string","number","null"]},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"additionalProperties":false},"Coupon":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"coupon"},"name":{"type":"string"},"percent_off":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"1-100. Exactly one of percent_off/amount_off is set."},"amount_off":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units."},"currency":{"description":"Set only when amount_off is.","type":["string","null"]},"max_redemptions":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"times_redeemed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"redeem_by":{"type":["string","null"]},"active":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"livemode":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","object","name","percent_off","amount_off","currency","max_redemptions","times_redeemed","redeem_by","active","metadata","livemode","created_at","updated_at"],"additionalProperties":false},"CouponList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Coupon"}},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"has_more":{"type":"boolean"}},"required":["object","data","page","limit","total","has_more"],"additionalProperties":false},"PromotionCodeCreateRequest":{"type":"object","properties":{"coupon":{"type":"string","minLength":1},"code":{},"active":{"type":"boolean"},"max_redemptions":{"type":"integer","minimum":1,"maximum":9007199254740991},"first_time_transaction":{"type":"boolean"},"minimum_amount":{"type":"integer","minimum":0,"maximum":9007199254740991},"expires_at":{"type":["string","number"]}},"required":["coupon"],"additionalProperties":false},"PromotionCodeUpdateRequest":{"type":"object","properties":{"active":{"type":"boolean"}},"required":["active"],"additionalProperties":false},"PromotionCode":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"promotion_code"},"code":{"type":"string","description":"Uppercase. What the customer types on the pay page."},"coupon":{"type":"string","description":"The Coupon id this code activates."},"active":{"type":"boolean"},"max_redemptions":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"This code's own limit, on top of the coupon's."},"times_redeemed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"first_time_transaction":{"type":"boolean"},"minimum_amount":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units. The session subtotal must reach this."},"expires_at":{"type":["string","null"]},"livemode":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","object","code","coupon","active","max_redemptions","times_redeemed","first_time_transaction","minimum_amount","expires_at","livemode","created_at","updated_at"],"additionalProperties":false},"PromotionCodeList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PromotionCode"}},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"has_more":{"type":"boolean"}},"required":["object","data","page","limit","total","has_more"],"additionalProperties":false},"PublicConfig":{"type":"object","properties":{"tokenization_key":{"type":"string"},"host":{"type":"string"},"mode":{"type":"string","enum":["test","live"]}},"required":["tokenization_key","host","mode"],"additionalProperties":false}}},"paths":{"/v1/transactions":{"get":{"operationId":"get_v1_transactions","summary":"List transactions","description":"Defaults to the last 30 days. Pagination is page-based, not cursor (ADR-005 §7).","tags":["Transactions"],"security":[{"bearerAuth":[]}],"x-permission":"transactions:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Default 25, max 100."}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Default 1."}},{"name":"created_after","in":"query","required":false,"description":"YYYY-MM-DD.","schema":{"type":"string"}},{"name":"created_before","in":"query","required":false,"description":"YYYY-MM-DD.","schema":{"type":"string"}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"amount_min","in":"query","required":false,"description":"Minor units.","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},{"name":"amount_max","in":"query","required":false,"description":"Minor units.","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}],"responses":{"200":{"description":"A page of transactions.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionList"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"post_v1_transactions","summary":"Create a transaction","description":"A charge, or an authorization when capture is false. Never accepts card numbers (ADR-005 §3).","tags":["Transactions"],"security":[{"bearerAuth":[]}],"x-permission":"transactions:sale","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"A unique value you choose per operation (ADR-005 §8). A retry that reuses the same key and request body returns the original response with Idempotent-Replay: true; the same key with a DIFFERENT body is refused 409 idempotency_key_reused.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionCreateRequest"}}}},"responses":{"201":{"description":"The created transaction.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/transactions/{id}":{"get":{"operationId":"get_v1_transactions_id","summary":"Retrieve a transaction","description":"One transaction, with its full event history.","tags":["Transactions"],"security":[{"bearerAuth":[]}],"x-permission":"transactions:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^\\d{1,20}$","description":"Numeric."}}],"responses":{"200":{"description":"The transaction.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/transactions/{id}/capture":{"post":{"operationId":"post_v1_transactions_id_capture","summary":"Capture a transaction","description":"Settles a prior authorization.","tags":["Transactions"],"security":[{"bearerAuth":[]}],"x-permission":"transactions:capture","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^\\d{1,20}$","description":"Numeric."}},{"name":"Idempotency-Key","in":"header","required":true,"description":"A unique value you choose per operation (ADR-005 §8). A retry that reuses the same key and request body returns the original response with Idempotent-Replay: true; the same key with a DIFFERENT body is refused 409 idempotency_key_reused.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureRequest"}}}},"responses":{"200":{"description":"The captured transaction.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/transactions/{id}/refund":{"post":{"operationId":"post_v1_transactions_id_refund","summary":"Refund a transaction","description":"Omit amount for a full refund.","tags":["Transactions"],"security":[{"bearerAuth":[]}],"x-permission":"transactions:refund","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^\\d{1,20}$","description":"Numeric."}},{"name":"Idempotency-Key","in":"header","required":true,"description":"A unique value you choose per operation (ADR-005 §8). A retry that reuses the same key and request body returns the original response with Idempotent-Replay: true; the same key with a DIFFERENT body is refused 409 idempotency_key_reused.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundRequest"}}}},"responses":{"200":{"description":"The refunded transaction.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/transactions/{id}/void":{"post":{"operationId":"post_v1_transactions_id_void","summary":"Void a transaction","description":"Cancels a transaction that has not settled.","tags":["Transactions"],"security":[{"bearerAuth":[]}],"x-permission":"transactions:void","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^\\d{1,20}$","description":"Numeric."}},{"name":"Idempotency-Key","in":"header","required":true,"description":"A unique value you choose per operation (ADR-005 §8). A retry that reuses the same key and request body returns the original response with Idempotent-Replay: true; the same key with a DIFFERENT body is refused 409 idempotency_key_reused.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoidRequest"}}}},"responses":{"200":{"description":"The voided transaction.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/customers":{"get":{"operationId":"get_v1_customers","summary":"List customers","description":"Stored payment profiles (Customer Vault). Read-only in v1.","tags":["Customers"],"security":[{"bearerAuth":[]}],"x-permission":"customers:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Default 25, max 100."}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Default 1."}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A page of customers.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerList"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/customers/{id}":{"get":{"operationId":"get_v1_customers_id","summary":"Retrieve a customer","description":"One stored profile. Token and metadata only — no card number exists to return.","tags":["Customers"],"security":[{"bearerAuth":[]}],"x-permission":"customers:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The customer.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/products":{"get":{"operationId":"get_v1_products","summary":"List products","tags":["Products & prices"],"security":[{"bearerAuth":[]}],"x-permission":"catalog:read","parameters":[{"name":"active","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Default 25, max 100."}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Default 1."}}],"responses":{"200":{"description":"A page of products.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductList"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"post_v1_products","summary":"Create a product","tags":["Products & prices"],"security":[{"bearerAuth":[]}],"x-permission":"catalog:write","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"A unique value you choose per operation (ADR-005 §8). A retry that reuses the same key and request body returns the original response with Idempotent-Replay: true; the same key with a DIFFERENT body is refused 409 idempotency_key_reused.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreateRequest"}}}},"responses":{"201":{"description":"The created product.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/products/{id}":{"get":{"operationId":"get_v1_products_id","summary":"Retrieve a product","tags":["Products & prices"],"security":[{"bearerAuth":[]}],"x-permission":"catalog:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The product.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patch_v1_products_id","summary":"Update a product","description":"Archive it with { \"active\": false }.","tags":["Products & prices"],"security":[{"bearerAuth":[]}],"x-permission":"catalog:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdateRequest"}}}},"responses":{"200":{"description":"The updated product.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete_v1_products_id","summary":"Delete a product","description":"Fails 409 if it has any prices — archive it instead.","tags":["Products & prices"],"security":[{"bearerAuth":[]}],"x-permission":"catalog:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedProduct"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/prices":{"get":{"operationId":"get_v1_prices","summary":"List prices","tags":["Products & prices"],"security":[{"bearerAuth":[]}],"x-permission":"catalog:read","parameters":[{"name":"product","in":"query","required":false,"description":"A product id.","schema":{"type":"string"}},{"name":"active","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Default 25, max 100."}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Default 1."}}],"responses":{"200":{"description":"A page of prices.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceList"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"post_v1_prices","summary":"Create a price","tags":["Products & prices"],"security":[{"bearerAuth":[]}],"x-permission":"catalog:write","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"A unique value you choose per operation (ADR-005 §8). A retry that reuses the same key and request body returns the original response with Idempotent-Replay: true; the same key with a DIFFERENT body is refused 409 idempotency_key_reused.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceCreateRequest"}}}},"responses":{"201":{"description":"The created price.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Price"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/prices/{id}":{"get":{"operationId":"get_v1_prices_id","summary":"Retrieve a price","tags":["Products & prices"],"security":[{"bearerAuth":[]}],"x-permission":"catalog:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The price.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Price"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patch_v1_prices_id","summary":"Update a price","description":"Amount, currency, product and interval are fixed once a price exists — archive with { \"active\": false } and create a new one instead. No delete: a price may still be referenced.","tags":["Products & prices"],"security":[{"bearerAuth":[]}],"x-permission":"catalog:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceUpdateRequest"}}}},"responses":{"200":{"description":"The updated price.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Price"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/checkout/sessions":{"post":{"operationId":"post_v1_checkout_sessions","summary":"Create a Checkout Session","description":"A hosted pay page. Takes no card data — the same by-name rejection the charge endpoint uses.","tags":["Checkout Sessions"],"security":[{"bearerAuth":[]}],"x-permission":"checkout:write","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"A unique value you choose per operation (ADR-005 §8). A retry that reuses the same key and request body returns the original response with Idempotent-Replay: true; the same key with a DIFFERENT body is refused 409 idempotency_key_reused.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionCreateRequest"}}}},"responses":{"201":{"description":"The created session.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSession"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/checkout/sessions/{id}":{"get":{"operationId":"get_v1_checkout_sessions_id","summary":"Retrieve a Checkout Session","description":"Read payment_status and transaction_id — a browser landing on success_url proves nothing.","tags":["Checkout Sessions"],"security":[{"bearerAuth":[]}],"x-permission":"checkout:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The session.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSession"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/checkout/sessions/{id}/expire":{"post":{"operationId":"post_v1_checkout_sessions_id_expire","summary":"Expire a Checkout Session","description":"Closes it before its deadline. A session already paid returns 409.","tags":["Checkout Sessions"],"security":[{"bearerAuth":[]}],"x-permission":"checkout:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"A unique value you choose per operation (ADR-005 §8). A retry that reuses the same key and request body returns the original response with Idempotent-Replay: true; the same key with a DIFFERENT body is refused 409 idempotency_key_reused.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"The expired session.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSession"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhook_endpoints":{"get":{"operationId":"get_v1_webhook_endpoints","summary":"List webhook endpoints","description":"The endpoints for this key's Mode.","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"x-permission":"webhooks:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Default 25, max 100."}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Default 1."}}],"responses":{"200":{"description":"A page of endpoints.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointList"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"post_v1_webhook_endpoints","summary":"Create a webhook endpoint","description":"secret appears in this response and nowhere else, ever. Maximum 16 per Mode.","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"x-permission":"webhooks:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreateRequest"}}}},"responses":{"201":{"description":"The created endpoint, with its secret.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhook_endpoints/{id}":{"get":{"operationId":"get_v1_webhook_endpoints_id","summary":"Retrieve a webhook endpoint","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"x-permission":"webhooks:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The endpoint.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patch_v1_webhook_endpoints_id","summary":"Update a webhook endpoint","description":"Change the URL, description, subscribed events, or status (enabled / disabled).","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"x-permission":"webhooks:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointUpdateRequest"}}}},"responses":{"200":{"description":"The updated endpoint.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete_v1_webhook_endpoints_id","summary":"Delete a webhook endpoint","description":"Queued deliveries go with it.","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"x-permission":"webhooks:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedWebhookEndpoint"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhook_endpoints/{id}/secret/roll":{"post":{"operationId":"post_v1_webhook_endpoints_id_secret_roll","summary":"Roll a webhook endpoint's signing secret","description":"The second and last time a signing secret is ever returned.","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"x-permission":"webhooks:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointRollSecretRequest"}}}},"responses":{"200":{"description":"The endpoint, with its new secret.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/public/config":{"get":{"operationId":"get_v1_public_config","summary":"Boot the browser tokenizer","description":"The one unauthenticated /v1 route. Given a publishable key, returns what a checkout page needs to tokenize a card.","tags":["Public"],"security":[],"parameters":[{"name":"pk","in":"query","required":true,"description":"A publishable key, fp_pk_test_… or fp_pk_live_….","schema":{"type":"string"}}],"responses":{"200":{"description":"The tokenizer config.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicConfig"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/events":{"get":{"operationId":"get_v1_events","summary":"List events","description":"Newest first. Ordering is not a guarantee — a redelivered upstream event can land late.","tags":["Events"],"security":[{"bearerAuth":[]}],"x-permission":"events:read","parameters":[{"name":"type","in":"query","required":false,"description":"A catalog type, or several comma-separated.","schema":{"type":"string"}},{"name":"types[]","in":"query","required":false,"description":"Repeated, as an alternative to type.","schema":{"type":"array","items":{"type":"string"}}},{"name":"created[gte]","in":"query","required":false,"description":"Unix seconds.","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},{"name":"created[lte]","in":"query","required":false,"description":"Unix seconds.","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Default 25, max 100."}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Default 1."}}],"responses":{"200":{"description":"A page of events.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventList"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/events/{id}":{"get":{"operationId":"get_v1_events_id","summary":"Retrieve an event","tags":["Events"],"security":[{"bearerAuth":[]}],"x-permission":"events:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The event.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/events/stream":{"get":{"operationId":"get_v1_events_stream","summary":"Stream events (Server-Sent Events)","description":"Test Mode keys only. Sends event: floatpay.event for each new event, a heartbeat comment every 15s, and event: close at the 15-minute cap. At most 3 concurrent streams per key.","tags":["Events"],"security":[{"bearerAuth":[]}],"x-permission":"events:read","responses":{"200":{"description":"An SSE stream of events.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"text/event-stream":{"schema":{"type":"string"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/test/events":{"post":{"operationId":"post_v1_test_events","summary":"Fire a test event","description":"Test Mode keys only (403 test_mode_only on a live key). Fans out to every subscribed endpoint, same as a real event.","tags":["Events"],"security":[{"bearerAuth":[]}],"x-permission":"webhooks:write","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"A unique value you choose per operation (ADR-005 §8). A retry that reuses the same key and request body returns the original response with Idempotent-Replay: true; the same key with a DIFFERENT body is refused 409 idempotency_key_reused.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEventCreateRequest"}}}},"responses":{"201":{"description":"The created test event.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/payment_links":{"get":{"operationId":"get_v1_payment_links","summary":"List payment links","tags":["Payment Links"],"security":[{"bearerAuth":[]}],"x-permission":"payment_links:read","parameters":[{"name":"active","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Default 25, max 100."}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Default 1."}}],"responses":{"200":{"description":"A page of payment links.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLinkList"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"post_v1_payment_links","summary":"Create a payment link","description":"A pricing rule, not a payment — every visit mints a Checkout Session from it.","tags":["Payment Links"],"security":[{"bearerAuth":[]}],"x-permission":"payment_links:write","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"A unique value you choose per operation (ADR-005 §8). A retry that reuses the same key and request body returns the original response with Idempotent-Replay: true; the same key with a DIFFERENT body is refused 409 idempotency_key_reused.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLinkCreateRequest"}}}},"responses":{"201":{"description":"The created payment link.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLink"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/payment_links/{id}":{"get":{"operationId":"get_v1_payment_links_id","summary":"Retrieve a payment link","tags":["Payment Links"],"security":[{"bearerAuth":[]}],"x-permission":"payment_links:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The payment link.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLink"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patch_v1_payment_links_id","summary":"Update a payment link","description":"The price, questions and collection toggles are fixed once a link exists — create another link to sell something else.","tags":["Payment Links"],"security":[{"bearerAuth":[]}],"x-permission":"payment_links:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLinkUpdateRequest"}}}},"responses":{"200":{"description":"The updated payment link.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLink"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/payment_links/{id}/sessions":{"get":{"operationId":"get_v1_payment_links_id_sessions","summary":"List a payment link's Checkout Sessions","description":"Who paid through this link, newest first. Each completed one carries the transaction id.","tags":["Payment Links"],"security":[{"bearerAuth":[]}],"x-permission":"payment_links:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Default 25, max 100."}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Default 1."}}],"responses":{"200":{"description":"A page of Checkout Sessions.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionList"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invoices":{"get":{"operationId":"get_v1_invoices","summary":"List invoices","description":"status accepts \"past_due\", a view over open plus a calendar rather than a stored status.","tags":["Invoices"],"security":[{"bearerAuth":[]}],"x-permission":"invoices:read","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["all","draft","open","past_due","paid","void","uncollectible"]}},{"name":"search","in":"query","required":false,"description":"Number, customer name or email.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Default 25, max 100."}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Default 1."}}],"responses":{"200":{"description":"A page of invoices.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceList"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"post_v1_invoices","summary":"Create an invoice","description":"Builds a DRAFT. Nothing is emailed and no number is minted until /finalize.","tags":["Invoices"],"security":[{"bearerAuth":[]}],"x-permission":"invoices:write","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"A unique value you choose per operation (ADR-005 §8). A retry that reuses the same key and request body returns the original response with Idempotent-Replay: true; the same key with a DIFFERENT body is refused 409 idempotency_key_reused.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceCreateRequest"}}}},"responses":{"201":{"description":"The created invoice.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invoices/{id}":{"get":{"operationId":"get_v1_invoices_id","summary":"Retrieve an invoice","tags":["Invoices"],"security":[{"bearerAuth":[]}],"x-permission":"invoices:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The invoice, with its lines.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patch_v1_invoices_id","summary":"Update an invoice","description":"Drafts only — a finalized invoice is a document somebody already holds. Use /void for anything further along.","tags":["Invoices"],"security":[{"bearerAuth":[]}],"x-permission":"invoices:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceUpdateRequest"}}}},"responses":{"200":{"description":"The updated invoice.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete_v1_invoices_id","summary":"Delete an invoice","description":"Drafts only — a draft has no number to leave a hole in, and nobody outside the Workspace has seen it.","tags":["Invoices"],"security":[{"bearerAuth":[]}],"x-permission":"invoices:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedInvoice"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invoices/{id}/finalize":{"post":{"operationId":"post_v1_invoices_id_finalize","summary":"Finalize an invoice","description":"draft → open. Mints the number (INV-0001) from a per-Organization, per-Mode counter and locks the lines.","tags":["Invoices"],"security":[{"bearerAuth":[]}],"x-permission":"invoices:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"A unique value you choose per operation (ADR-005 §8). A retry that reuses the same key and request body returns the original response with Idempotent-Replay: true; the same key with a DIFFERENT body is refused 409 idempotency_key_reused.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"The finalized invoice.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invoices/{id}/send":{"post":{"operationId":"post_v1_invoices_id_send","summary":"Send an invoice","description":"Emails the customer the branded document with the PDF and the hosted pay link. Safe to call again to chase them; only the first send emits invoice.sent.","tags":["Invoices"],"security":[{"bearerAuth":[]}],"x-permission":"invoices:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"A unique value you choose per operation (ADR-005 §8). A retry that reuses the same key and request body returns the original response with Idempotent-Replay: true; the same key with a DIFFERENT body is refused 409 idempotency_key_reused.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"The sent invoice.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invoices/{id}/void":{"post":{"operationId":"post_v1_invoices_id_void","summary":"Void an invoice","description":"Cancels an open invoice. The number is kept, unlike a deleted draft.","tags":["Invoices"],"security":[{"bearerAuth":[]}],"x-permission":"invoices:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"A unique value you choose per operation (ADR-005 §8). A retry that reuses the same key and request body returns the original response with Idempotent-Replay: true; the same key with a DIFFERENT body is refused 409 idempotency_key_reused.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"The voided invoice.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invoices/{id}/mark_paid":{"post":{"operationId":"post_v1_invoices_id_mark_paid","summary":"Mark an invoice paid out of band","description":"A cheque, a bank transfer, cash. No transaction is created; paid_out_of_band says so.","tags":["Invoices"],"security":[{"bearerAuth":[]}],"x-permission":"invoices:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"A unique value you choose per operation (ADR-005 §8). A retry that reuses the same key and request body returns the original response with Idempotent-Replay: true; the same key with a DIFFERENT body is refused 409 idempotency_key_reused.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"The paid invoice.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invoices/{id}/mark_uncollectible":{"post":{"operationId":"post_v1_invoices_id_mark_uncollectible","summary":"Mark an invoice uncollectible","description":"The merchant has given up on it — distinct from void, which says it should never have existed.","tags":["Invoices"],"security":[{"bearerAuth":[]}],"x-permission":"invoices:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"A unique value you choose per operation (ADR-005 §8). A retry that reuses the same key and request body returns the original response with Idempotent-Replay: true; the same key with a DIFFERENT body is refused 409 idempotency_key_reused.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"The written-off invoice.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/coupons":{"get":{"operationId":"get_v1_coupons","summary":"List coupons","tags":["Coupons"],"security":[{"bearerAuth":[]}],"x-permission":"coupons:read","parameters":[{"name":"active","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Default 25, max 100."}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Default 1."}}],"responses":{"200":{"description":"A page of coupons.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponList"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"post_v1_coupons","summary":"Create a coupon","description":"The discount math — percent or amount off. Give it a promotion code to make it usable.","tags":["Coupons"],"security":[{"bearerAuth":[]}],"x-permission":"coupons:write","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"A unique value you choose per operation (ADR-005 §8). A retry that reuses the same key and request body returns the original response with Idempotent-Replay: true; the same key with a DIFFERENT body is refused 409 idempotency_key_reused.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponCreateRequest"}}}},"responses":{"201":{"description":"The created coupon.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Coupon"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/coupons/{id}":{"get":{"operationId":"get_v1_coupons_id","summary":"Retrieve a coupon","tags":["Coupons"],"security":[{"bearerAuth":[]}],"x-permission":"coupons:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The coupon.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Coupon"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patch_v1_coupons_id","summary":"Update a coupon","description":"Only `active` — deactivate it with { \"active\": false }. The discount is fixed once created.","tags":["Coupons"],"security":[{"bearerAuth":[]}],"x-permission":"coupons:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponUpdateRequest"}}}},"responses":{"200":{"description":"The updated coupon.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Coupon"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/promotion_codes":{"get":{"operationId":"get_v1_promotion_codes","summary":"List promotion codes","tags":["Coupons"],"security":[{"bearerAuth":[]}],"x-permission":"coupons:read","parameters":[{"name":"coupon","in":"query","required":false,"schema":{"type":"string"}},{"name":"active","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Default 25, max 100."}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Default 1."}}],"responses":{"200":{"description":"A page of promotion codes.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionCodeList"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"post_v1_promotion_codes","summary":"Create a promotion code","description":"The customer-facing word that activates a coupon. Omit `code` for a random one.","tags":["Coupons"],"security":[{"bearerAuth":[]}],"x-permission":"coupons:write","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"A unique value you choose per operation (ADR-005 §8). A retry that reuses the same key and request body returns the original response with Idempotent-Replay: true; the same key with a DIFFERENT body is refused 409 idempotency_key_reused.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionCodeCreateRequest"}}}},"responses":{"201":{"description":"The created promotion code.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionCode"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/promotion_codes/{id}":{"get":{"operationId":"get_v1_promotion_codes_id","summary":"Retrieve a promotion code","tags":["Coupons"],"security":[{"bearerAuth":[]}],"x-permission":"coupons:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The promotion code.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionCode"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patch_v1_promotion_codes_id","summary":"Update a promotion code","description":"Only `active` — deactivate it with { \"active\": false }.","tags":["Coupons"],"security":[{"bearerAuth":[]}],"x-permission":"coupons:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionCodeUpdateRequest"}}}},"responses":{"200":{"description":"The updated promotion code.","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionCode"}}}},"default":{"description":"An error. Every non-2xx /v1 response uses this one shape (ADR-005 §9).","headers":{"Request-Id":{"description":"Identifies this call. Paste it into Developers → Logs, or hand it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}