{"openapi":"3.1.0","info":{"title":"Secure Processing API","version":"2026-09-01","description":"Card payments for Belize.\n\nAuthenticate with a secret key as a bearer token: `Authorization: Bearer sk_test_...`. Keys beginning `sk_test_` operate on test data and never move real money.\n\nAmounts are integers in the currency's minor unit — 6000 is $60.00. A payment priced in USD settles in BZD, and the payment object carries the rate it was taken at.","contact":{"name":"Secure Processing","url":"https://secureprocessing.app"}},"servers":[{"url":"https://api.secureprocessing.app","description":"Production"}],"security":[{"secretKey":[]}],"components":{"securitySchemes":{"secretKey":{"type":"http","scheme":"bearer","description":"Your secret API key. `sk_test_...` operates on test data; `sk_live_...` moves real money."}},"responses":{"PermissionDenied":{"description":"Not permitted. `insufficient_permissions` when the caller does not hold the capability this operation needs — `required_capability` names it. Dashboard sessions may also see `step_up_required` or `mfa_required` for actions that need a recent second factor. With `Secure-Processing-Account`: `account_invalid` when the key cannot act as that account (or it does not exist), and `connect_not_allowed` when this operation acts only on your own account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Too many requests from this key (`rate_limit_error`, `rate_limit_exceeded`). Back off and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"ServerError":{"description":"Something went wrong on our side (`api_error`). The request was not completed, and an `Idempotency-Key` sent with it is free to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"ServiceUnavailable":{"description":"Temporarily unavailable (`api_error`, `service_unavailable`): our database could not be reached before this request did any database work, so nothing was read or written for it. Retry after `Retry-After` seconds with the same `Idempotency-Key`; a 503 is never stored against it. A database failure after any work had begun is a 500, not this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"PayloadTooLarge":{"description":"The body is larger than this endpoint accepts (`invalid_request_error`): `body_too_large` over 1 MB for JSON, `file_too_large` for an upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"UnsupportedMediaType":{"description":"The body was not sent as JSON (`invalid_request_error`, `unsupported_media_type`). Send it with `Content-Type: application/json` (or a `+json` type, lower-case).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"IdempotencyInProgress":{"description":"A request with this `Idempotency-Key` is still running (`idempotency_error`, `idempotency_in_progress`). Retry the same request, with the same key, in a few seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}}},"schemas":{"GatewayEvidence":{"type":["object","null"],"properties":{"order_id":{"type":["string","null"]},"order_status":{"type":["integer","null"]},"action_code":{"type":["string","null"]},"approval_code":{"type":["string","null"]},"masked_pan":{"type":["string","null"]},"card_brand":{"type":["string","null"]}},"required":["order_id","order_status","action_code","approval_code","masked_pan","card_brand"],"description":"What the acquiring bank reported for the latest attempt. Quote the order id when you write to us about this payment."},"PaymentIntent":{"type":"object","properties":{"id":{"type":"string","example":"pi_3KqL8xQpR2sT7vW9yZ1aB4cD"},"object":{"type":"string","enum":["payment_intent"]},"application":{"type":["string","null"],"description":"The platform that created this payment as a connected account, if one did."},"application_fee_amount":{"type":["integer","null"],"description":"What that platform asked to take from it, in the payment's currency and minor units."},"amount":{"type":"integer","description":"In minor units.","example":6000},"amount_received":{"type":"integer","description":"How much of `amount` has been collected, in the same currency: `amount` once an automatic payment succeeds, the captured amount for a hold, and 0 before then. Refunds do not reduce it; they are counted in `amount_refunded`."},"amount_capturable":{"type":"integer","description":"How much of a hold can still be captured. 0 unless `status` is `requires_capture`."},"amount_refunded":{"type":"integer","description":"The total of this payment's refunds that have succeeded, in the payment's currency."},"currency":{"type":"string","enum":["bzd","usd"],"description":"Three-letter ISO currency code, lowercase.","example":"usd"},"status":{"type":"string","enum":["requires_payment_method","processing","requires_action","requires_capture","succeeded","canceled"]},"capture_method":{"type":"string","enum":["automatic","manual"]},"customer":{"type":["string","null"]},"payment_method":{"type":["string","null"]},"description":{"type":["string","null"]},"receipt_email":{"type":["string","null"]},"client_secret":{"type":"string","description":"Deprecated: has no effect. Nothing in the API accepts it — the card is entered on the bank's hosted page, so there is no client-side confirmation for it to authorise, and the checkout needs only the session's `url`. Still returned so existing integrations keep working; do not build on it, and do not send it to a browser.","deprecated":true},"settlement_amount":{"type":["integer","null"],"description":"What the card was charged, in the settlement currency. A payment priced in USD settles in BZD at the rate recorded on the payment."},"settlement_currency":{"type":["string","null"],"description":"The currency the card was charged in, as an UPPERCASE ISO code — always `BZD` today. The casing is guaranteed and will not change. Every other currency in the API, `currency` included, is lowercase, so compare the two case-insensitively.","example":"BZD"},"fx_rate":{"type":["number","null"]},"last_payment_error":{"type":["object","null"],"properties":{"type":{"type":"string"},"code":{"type":"string"},"decline_code":{"type":"string"},"message":{"type":"string"}},"required":["type","code","message"],"description":"Why the latest attempt did not pay. A refused card is `card_error` / `card_declined` with a `decline_code`; a risk rule is `card_error` / `payment_blocked` with `decline_code: blocked`. A bank page that expired, or that the customer left, before any card was tried is `invalid_request_error` / `payment_intent_payment_attempt_expired` with no `decline_code`: nothing was refused, so do not tell the customer their card failed. Show `message` rather than composing your own."},"next_action":{"type":["object","null"],"additionalProperties":{}},"gateway":{"$ref":"#/components/schemas/GatewayEvidence"},"risk_outcome":{"type":["string","null"],"enum":["allow","block","review"],"description":"What our risk rules decided before the bank was called. `null` means the payment was never assessed — it predates the check, or nobody has tried to pay it yet (no press of Pay by card on a checkout page, and no `confirm: true` charge of a saved card). Treat null as unknown, not as allowed."},"review":{"type":["string","null"],"description":"The review a `review` outcome opened once the payment succeeded, if any.","example":"prv_2bC4dE6fG8hJ0kL2mN4pQ6rS"},"disputed":{"type":"boolean","description":"Whether a chargeback or an inquiry has ever been raised against this payment. A boolean rather than an id, because a payment can be disputed more than once — list `/v1/disputes?payment_intent=…` for the detail."},"cancellation_reason":{"type":["string","null"]},"livemode":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"created":{"type":"integer","description":"Unix timestamp, seconds."}},"required":["id","object","application","application_fee_amount","amount","amount_received","amount_capturable","amount_refunded","currency","status","capture_method","customer","payment_method","description","receipt_email","client_secret","settlement_amount","settlement_currency","fx_rate","last_payment_error","next_action","gateway","risk_outcome","review","disputed","cancellation_reason","livemode","metadata","created"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","card_error","idempotency_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"},"decline_code":{"type":"string"},"request_id":{"type":"string"},"required_capability":{"type":"string","description":"Present on `insufficient_permissions`: the capability this request needed and the caller does not hold, such as `payments:refund`.","example":"payments:refund"}},"required":["type","code","message"]}},"required":["error"]},"CreatePaymentIntent":{"type":"object","properties":{"amount":{"type":"integer","exclusiveMinimum":0,"description":"In minor units. 6000 is $60.00.","example":6000},"application_fee_amount":{"type":"integer","exclusiveMinimum":0,"description":"What your platform takes from this payment, in the payment's currency and minor units. Only when making the request as a connected account with `Secure-Processing-Account`. It cannot exceed `amount`, and is capped at what the payment leaves the account after our fee.","example":150},"currency":{"type":"string","enum":["bzd","usd"],"description":"Three-letter ISO currency code, lowercase.","example":"usd"},"capture_method":{"type":"string","enum":["automatic","manual"],"default":"automatic","description":"`automatic` charges the card straight away. `manual` places a hold you capture later — useful when the final amount is not known until the service is delivered. A hold needs the customer on a checkout session: `manual` with `confirm: true` is refused with a 400, because the bank does not allow a hold on a saved-card charge made with nobody present."},"customer":{"type":"string"},"payment_method":{"type":"string","description":"A saved card to charge. Requires `customer`, the customer it belongs to."},"off_session":{"type":"boolean","default":false,"description":"True when charging a saved card with nobody present to authenticate. Accepted and stored but not returned; a `confirm: true` saved-card charge is always made as merchant-initiated whether or not this is set."},"confirm":{"type":"boolean","default":false,"description":"Charge a saved card immediately, rather than waiting for a checkout session. Requires `customer` and `payment_method`: without them the request is refused with a 400 (`param: customer`, or `param: payment_method` if no card was given) before anything is created, so no intent and no `payment_intent.created` event is left behind. Always taken in full: combining it with `capture_method: manual` is refused with a 400 the same way."},"setup_future_usage":{"type":"string","enum":["off_session"],"description":"Ask the cardholder to save this card for later merchant-initiated charges."},"description":{"type":"string","maxLength":120,"description":"Shown on the payment in your dashboard and in the API, and sent to the bank with it. Lead with your own reference.","example":"SCU-B0161 — Blue Hole Two-Tank"},"receipt_email":{"type":"string","format":"email","description":"Sent to the bank with the payment, which emails the cardholder a receipt. It is also the address the risk rules count payment attempts against."},"statement_descriptor_suffix":{"type":"string","maxLength":22,"description":"Deprecated: has no effect. Accepted, stored and included in the payments export, but never sent to the bank and never shown on the cardholder's statement — the bank has not confirmed any field that would carry it. What does reach the bank's records is `description`.","deprecated":true},"return_url":{"type":"string","maxLength":2000,"format":"uri","description":"Only for `confirm: true` on a saved card: where the bank sends the cardholder if it asks them to authenticate. Defaults to our own result page. Ignored otherwise — a checkout session has its own `success_url`."},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Key-value pairs of your own, returned exactly as you sent them. At most 50 keys of up to 40 characters, without square brackets; string values of up to 500. The payments list can be filtered by them: `GET /v1/payment_intents?metadata[shop_id]=scuba-sensation`.","example":{"shop_id":"scuba-sensation","booking_id":"SCU-B0161"},"maxProperties":50}},"required":["amount","currency"]},"SearchPaymentIntents":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":254,"description":"An email address, the last four digits of the card, or a bank reference (RRN, processing id, network reference, order id). A payment id also works. Exact match. A full card number is refused.","example":"ana@example.bz"}},"required":["query"],"additionalProperties":false},"Review":{"type":"object","properties":{"id":{"type":"string","example":"prv_2bC4dE6fG8hJ0kL2mN4pQ6rS"},"object":{"type":"string","enum":["review"]},"payment_intent":{"type":"string"},"risk_evaluation":{"type":["string","null"]},"reason":{"type":["string","null"],"description":"Which rules asked for a look, in words."},"status":{"type":"string","enum":["open","approved","refunded"]},"opened":{"type":"integer"},"closed":{"type":["integer","null"]},"closed_reason":{"type":["string","null"]},"livemode":{"type":"boolean"}},"required":["id","object","payment_intent","risk_evaluation","reason","status","opened","closed","closed_reason","livemode"]},"Refund":{"type":"object","properties":{"id":{"type":"string","example":"re_5dF8gH2jK4lM6nP8qR0sT2uV"},"object":{"type":"string","enum":["refund"]},"payment_intent":{"type":"string"},"amount":{"type":"integer","description":"In minor units of the PAYMENT's currency. A refund of a USD payment is in USD cents, and returns BZD to the card at the payment's own rate."},"currency":{"type":"string","enum":["bzd","usd"],"description":"The payment's currency, lowercase.","example":"usd"},"status":{"type":"string","enum":["pending","succeeded","failed","canceled"],"description":"`pending`: sent to the bank, answer not yet known. Its amount is held, so a second refund cannot exceed what is left; it usually becomes `succeeded` or `failed` within minutes, from the bank's own records — rarely `canceled` — and stays `pending` longer while it is held: a refund callback from the bank, or a disagreement between the bank's records and ours, keeps it pending until it is resolved. `succeeded`: the money went back. `failed`: the bank refused it, or still had no trace of it some twenty minutes after it was sent — nothing moved, and `refund.failed` fires. `canceled`: rare, and set only after we have checked with the bank — the bank did make this refund, but its money is already counted under another refund on the same payment. Nothing is owed and no event fires; do not refund again."},"reason":{"type":["string","null"]},"origin":{"type":"string","enum":["api","dashboard","bank_portal","reconcile","review"]},"failure_reason":{"type":["string","null"]},"livemode":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"created":{"type":"integer"}},"required":["id","object","payment_intent","amount","currency","status","reason","origin","failure_reason","livemode","metadata","created"]},"ExpandedPaymentIntent":{"allOf":[{"$ref":"#/components/schemas/PaymentIntent"},{"type":"object","properties":{"review":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Review"},{"type":"null"}],"description":"The review's id — or, with `expand[]=review`, the review itself."},"refunds":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Refund"}}},"required":["object","url","has_more","data"],"description":"Only with `expand[]=refunds`: this payment's refunds, newest first, up to 100."}}}]},"CheckoutSession":{"type":"object","properties":{"id":{"type":"string","example":"cs_7hJ2kL9mN4pQ6rS8tU0vW3xY"},"object":{"type":"string","enum":["checkout_session"]},"payment_intent":{"type":"string"},"status":{"type":"string","enum":["open","complete","expired"]},"url":{"type":["string","null"],"description":"Send the customer here. The card is entered on the bank's own page, never yours. `null` once the session is `complete` or `expired` — and a session reads `expired` the moment it passes `expires_at` — so a finished session cannot be paid twice."},"success_url":{"type":"string","description":"As you sent it, with any `{CHECKOUT_SESSION_ID}` still in place. The customer is sent to it with the placeholder replaced."},"cancel_url":{"type":["string","null"]},"customer_email":{"type":["string","null"]},"amount_total":{"type":"integer"},"currency":{"type":"string","enum":["bzd","usd"],"description":"Three-letter ISO currency code, lowercase.","example":"usd"},"expires_at":{"type":"integer","description":"Unix timestamp, seconds — 24 hours after creation. The bank's payment page closes no later than the session: it is open for about twenty minutes at most, and a page opened near the end gets only the time the session has left, less a minute. With under two minutes left, our checkout page shows the session as expired and no longer offers to pay, although `status` reads `open` until this moment."},"livemode":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"created":{"type":"integer"}},"required":["id","object","payment_intent","status","url","success_url","cancel_url","customer_email","amount_total","currency","expires_at","livemode","metadata","created"]},"CreateCheckoutSession":{"type":"object","properties":{"payment_intent":{"type":"string","description":"An existing payment intent. Omit it and pass `amount` to create one inline."},"amount":{"type":"integer","exclusiveMinimum":0},"currency":{"type":"string","enum":["bzd","usd"],"description":"Three-letter ISO currency code, lowercase.","example":"usd"},"success_url":{"type":"string","maxLength":2000,"format":"uri","description":"Where the customer goes after paying. The bank returns them to our result page; once the payment is confirmed, its Continue button takes them here. `{CHECKOUT_SESSION_ID}` anywhere in the URL is replaced with this session's id, so you know which payment came back. Display only — fulfil on the webhook.","example":"https://example.com/thanks?session={CHECKOUT_SESSION_ID}"},"cancel_url":{"type":"string","maxLength":2000,"format":"uri","description":"Shown as a \"Cancel and return\" link on our checkout page, before the customer reaches the bank. Not used after a decline: the customer is offered another try instead."},"customer":{"type":"string"},"customer_email":{"type":"string","format":"email"},"line_items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"amount":{"type":"integer"},"quantity":{"type":"integer"}},"required":["name"]},"maxItems":100,"description":"Shown on the checkout page, at most 100. The payment amount is authoritative."},"description":{"type":"string","maxLength":120},"setup_future_usage":{"type":"string","enum":["off_session"]},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Key-value pairs of your own, stored on the session. When the session creates its own payment intent (you passed `amount` rather than `payment_intent`), the same metadata is written on that intent too, which is what the payments list filters on. At most 50 keys of up to 40 characters, without square brackets; string values of up to 500.","example":{"shop_id":"scuba-sensation","booking_id":"SCU-B0161"},"maxProperties":50}},"required":["success_url"]},"CreateRefund":{"type":"object","properties":{"payment_intent":{"type":"string"},"amount":{"type":"integer","exclusiveMinimum":0,"description":"In minor units of the payment's currency. Omit to refund everything that is left. More than is left — counting refunds still `pending` — is refused with a 400 (`parameter_invalid`, `param: amount`) whose message says how much remains."},"reason":{"type":"string","enum":["duplicate","fraudulent","requested_by_customer","other"]},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Key-value pairs of your own, stored on the object and returned exactly as you sent them. At most 50 keys; keys up to 40 characters, without square brackets; values are strings of up to 500 characters. Never shown to the customer.","example":{"shop_id":"scuba-sensation","booking_id":"SCU-B0161"},"maxProperties":50},"refund_application_fee":{"type":"boolean","description":"Return your platform's application fee's share of this refund. Only as a connected account. Without it you keep that share and the account bears it, as at Stripe for a direct charge, and asking on a later refund does not bring it back. A refund made in the bank's own portal never returns the fee."}},"required":["payment_intent"]},"Customer":{"type":"object","properties":{"id":{"type":"string","example":"cus_9aB1cD3eF5gH7iJ9kL1mN3oP"},"object":{"type":"string","enum":["customer"]},"email":{"type":["string","null"]},"name":{"type":["string","null"]},"phone":{"type":["string","null"]},"description":{"type":["string","null"]},"livemode":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"created":{"type":"integer"}},"required":["id","object","email","name","phone","description","livemode","metadata","created"]},"CreateCustomer":{"type":"object","properties":{"email":{"type":"string","format":"email"},"name":{"type":"string"},"phone":{"type":"string"},"description":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Key-value pairs of your own, stored on the object and returned exactly as you sent them. At most 50 keys; keys up to 40 characters, without square brackets; values are strings of up to 500 characters. Never shown to the customer.","example":{"shop_id":"scuba-sensation","booking_id":"SCU-B0161"},"maxProperties":50}}},"PaymentMethod":{"type":"object","properties":{"id":{"type":"string","example":"pm_2xY4zA6bC8dE0fG2hI4jK6lM"},"object":{"type":"string","enum":["payment_method"]},"type":{"type":"string","enum":["card"]},"customer":{"type":"string"},"card":{"type":"object","properties":{"brand":{"type":["string","null"]},"last4":{"type":["string","null"]},"exp_month":{"type":["integer","null"]},"exp_year":{"type":["integer","null"]}},"required":["brand","last4","exp_month","exp_year"]},"status":{"type":"string","enum":["active","detached","expired"]},"livemode":{"type":"boolean"},"created":{"type":"integer"}},"required":["id","object","type","customer","card","status","livemode","created"]},"Product":{"type":"object","properties":{"id":{"type":"string","example":"prod_8kM2nP4qR6sT8uV0wX2yZ4aB"},"object":{"type":"string","enum":["product"]},"active":{"type":"boolean","description":"False means archived. Its prices are left alone."},"name":{"type":"string"},"description":{"type":["string","null"]},"images":{"type":"array","items":{"type":"string"}},"statement_descriptor":{"type":["string","null"]},"livemode":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"created":{"type":"integer","description":"Unix timestamp, seconds."},"updated":{"type":"integer","description":"Unix timestamp, seconds."}},"required":["id","object","active","name","description","images","statement_descriptor","livemode","metadata","created","updated"]},"CreateProduct":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":250,"example":"Blue Hole Two-Tank Dive"},"description":{"type":"string","maxLength":2000},"active":{"type":"boolean","default":true},"images":{"type":"array","items":{"type":"string","format":"uri"},"maxItems":8,"description":"Up to 8 https image URLs, shown on a checkout page.","example":["https://example.bz/dive.jpg"]},"statement_descriptor":{"type":"string","maxLength":22,"description":"What the cardholder sees on their statement for this product. 22 characters."},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Key-value pairs of your own, stored on the object and returned exactly as you sent them. At most 50 keys; keys up to 40 characters, without square brackets; values are strings of up to 500 characters. Never shown to the customer.","example":{"shop_id":"scuba-sensation","booking_id":"SCU-B0161"},"maxProperties":50}},"required":["name"]},"UpdateProduct":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":250},"description":{"type":["string","null"],"maxLength":2000},"active":{"type":"boolean","description":"False archives it. Its prices are untouched."},"images":{"type":"array","items":{"type":"string","format":"uri"},"maxItems":8,"description":"Up to 8 https image URLs, shown on a checkout page.","example":["https://example.bz/dive.jpg"]},"statement_descriptor":{"type":"string","maxLength":22,"description":"What the cardholder sees on their statement for this product. 22 characters."},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Key-value pairs of your own, stored on the object and returned exactly as you sent them. At most 50 keys; keys up to 40 characters, without square brackets; values are strings of up to 500 characters. Never shown to the customer.","example":{"shop_id":"scuba-sensation","booking_id":"SCU-B0161"},"maxProperties":50}}},"CustomUnitAmount":{"type":["object","null"],"properties":{"minimum":{"type":"integer","exclusiveMinimum":0,"description":"In minor units.","example":500},"maximum":{"type":"integer","exclusiveMinimum":0,"description":"In minor units.","example":100000},"preset":{"type":"integer","exclusiveMinimum":0,"description":"In minor units. What the field is filled in with before the payer changes it.","example":2500}},"required":["minimum","maximum"],"description":"A range the payer chooses an amount within — a donation, a deposit, a tip. Minor units."},"Price":{"type":"object","properties":{"id":{"type":"string","example":"price_3cD5eF7gH9jK1lM3nP5qR7sT"},"object":{"type":"string","enum":["price"]},"active":{"type":"boolean"},"product":{"type":"string"},"currency":{"type":"string","enum":["bzd","usd"],"description":"Three-letter ISO currency code, lowercase.","example":"usd"},"type":{"type":"string","enum":["one_time"]},"billing_scheme":{"type":"string","enum":["per_unit"]},"unit_amount":{"type":["integer","null"],"description":"In minor units. 6000 is $60.00. Null when the price takes a custom amount.","example":6000},"custom_unit_amount":{"$ref":"#/components/schemas/CustomUnitAmount"},"nickname":{"type":["string","null"]},"livemode":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"created":{"type":"integer","description":"Unix timestamp, seconds."}},"required":["id","object","active","product","currency","type","billing_scheme","unit_amount","custom_unit_amount","nickname","livemode","metadata","created"]},"CreatePrice":{"type":"object","properties":{"product":{"type":"string","description":"The product this price belongs to.","example":"prod_8kM2nP4qR6sT8uV0wX2yZ4aB"},"currency":{"type":"string","enum":["bzd","usd"],"description":"Three-letter ISO currency code, lowercase.","example":"usd"},"unit_amount":{"type":"integer","exclusiveMinimum":0,"description":"In minor units. 6000 is $60.00. Give this or `custom_unit_amount`, never both.","example":6000},"custom_unit_amount":{"allOf":[{"$ref":"#/components/schemas/CustomUnitAmount"},{"type":"object"}]},"nickname":{"type":"string","maxLength":250},"active":{"type":"boolean","default":true},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Key-value pairs of your own, stored on the object and returned exactly as you sent them. At most 50 keys; keys up to 40 characters, without square brackets; values are strings of up to 500 characters. Never shown to the customer.","example":{"shop_id":"scuba-sensation","booking_id":"SCU-B0161"},"maxProperties":50}},"required":["product","currency"]},"UpdatePrice":{"type":"object","properties":{"active":{"type":"boolean","description":"False archives it. Nothing new can use it."},"nickname":{"type":["string","null"],"maxLength":250},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Key-value pairs of your own, stored on the object and returned exactly as you sent them. At most 50 keys; keys up to 40 characters, without square brackets; values are strings of up to 500 characters. Never shown to the customer.","example":{"shop_id":"scuba-sensation","booking_id":"SCU-B0161"},"maxProperties":50}},"additionalProperties":false},"AdjustableQuantity":{"type":["object","null"],"properties":{"enabled":{"type":"boolean"},"minimum":{"type":"integer","minimum":1,"maximum":999},"maximum":{"type":"integer","minimum":1,"maximum":999}},"required":["enabled"],"description":"Lets the payer change how many. Both bounds are required when `enabled` is true: the quantity multiplies the amount, and an unbounded multiplier on a public URL is a way to register an order nobody agreed to."},"PaymentLinkCustomField":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9_]{1,40}$","description":"Where the answer lands in the payment's metadata.","example":"boat_name"},"label":{"type":"string","minLength":1,"maxLength":100},"type":{"type":"string","enum":["text","numeric","dropdown"]},"optional":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":1,"maxItems":20,"description":"Required for `dropdown`, and refused for anything else."}},"required":["key","label","type"]},"AfterCompletion":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["hosted_confirmation"]},"message":{"type":"string","maxLength":500}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["redirect"]},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["type","url"]}],"description":"What the payer sees once they have paid: our hosted confirmation, or a redirect to a page of yours with `?session_id=` appended. A redirect must be https — the payer arrives there with a session id in the URL."},"PaymentLink":{"type":"object","properties":{"id":{"type":"string","example":"plink_7nQ9rS1tU3vW5xY7zA9bC1dE"},"object":{"type":"string","enum":["payment_link"]},"active":{"type":"boolean","description":"False means the URL answers 404. Paid links are never deleted."},"url":{"type":"string","description":"The page to share. The id in it is the token — treat it as public, because it is.","example":"https://checkout.secureprocessing.app/pay/plink_7nQ9rS1tU3vW5xY7zA9bC1dE"},"price":{"type":"string","description":"The price the link charges. It cannot be changed."},"quantity":{"type":"integer","exclusiveMinimum":0},"adjustable_quantity":{"$ref":"#/components/schemas/AdjustableQuantity"},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/PaymentLinkCustomField"}},"after_completion":{"$ref":"#/components/schemas/AfterCompletion"},"collect_customer_name":{"type":"boolean"},"collect_phone":{"type":"boolean"},"livemode":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"created":{"type":"integer","description":"Unix timestamp, seconds."}},"required":["id","object","active","url","price","quantity","adjustable_quantity","custom_fields","after_completion","collect_customer_name","collect_phone","livemode","metadata","created"]},"CreatePaymentLink":{"type":"object","properties":{"price":{"type":"string","description":"An ACTIVE price of yours. Its amount is what the link charges, for ever.","example":"price_3cD5eF7gH9jK1lM3nP5qR7sT"},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":999,"default":1},"adjustable_quantity":{"allOf":[{"$ref":"#/components/schemas/AdjustableQuantity"},{"type":"object"}]},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/PaymentLinkCustomField"},"maxItems":3,"description":"Up to three questions asked on the page. The answers arrive in the payment's metadata."},"after_completion":{"$ref":"#/components/schemas/AfterCompletion"},"collect_customer_name":{"type":"boolean","default":false},"collect_phone":{"type":"boolean","default":false},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Key-value pairs of your own, stored on the object and returned exactly as you sent them. At most 50 keys; keys up to 40 characters, without square brackets; values are strings of up to 500 characters. Never shown to the customer.","example":{"shop_id":"scuba-sensation","booking_id":"SCU-B0161"},"maxProperties":50}},"required":["price"]},"UpdatePaymentLink":{"type":"object","properties":{"active":{"type":"boolean","description":"False and the page stops answering."},"after_completion":{"$ref":"#/components/schemas/AfterCompletion"},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/PaymentLinkCustomField"},"maxItems":3},"adjustable_quantity":{"$ref":"#/components/schemas/AdjustableQuantity"},"collect_customer_name":{"type":"boolean"},"collect_phone":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Key-value pairs of your own, stored on the object and returned exactly as you sent them. At most 50 keys; keys up to 40 characters, without square brackets; values are strings of up to 500 characters. Never shown to the customer.","example":{"shop_id":"scuba-sensation","booking_id":"SCU-B0161"},"maxProperties":50}},"additionalProperties":false},"TaxRate":{"type":"object","properties":{"id":{"type":"string","example":"txr_5jK7lM9nP1qR3sT5uV7wX9yZ"},"object":{"type":"string","enum":["tax_rate"]},"display_name":{"type":"string","example":"GST"},"percentage":{"type":"number","description":"The rate as a percentage, to three decimal places. 12.5 means 12.5%.","example":12.5},"inclusive":{"type":"boolean","description":"True when a line's amount ALREADY contains the tax and it is backed out of it; false when the tax is added on top. 1000 at an inclusive 12.5% is 111 of tax on 889 net; the same rate exclusive is 125 of tax on 1000 net."},"jurisdiction":{"type":["string","null"]},"active":{"type":"boolean","description":"Archived rates cannot be put on new lines. Existing invoices keep theirs."},"livemode":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"created":{"type":"integer"}},"required":["id","object","display_name","percentage","inclusive","jurisdiction","active","livemode","metadata","created"]},"CreateTaxRate":{"type":"object","properties":{"display_name":{"type":"string","minLength":1,"maxLength":50,"example":"GST"},"percentage":{"type":"number","minimum":0,"maximum":100,"example":12.5},"inclusive":{"type":"boolean","description":"No default: getting it wrong is a 12.5% error."},"jurisdiction":{"type":"string","maxLength":50},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Key-value pairs of your own, stored on the object and returned exactly as you sent them. At most 50 keys; keys up to 40 characters, without square brackets; values are strings of up to 500 characters. Never shown to the customer.","example":{"shop_id":"scuba-sensation","booking_id":"SCU-B0161"},"maxProperties":50}},"required":["display_name","percentage","inclusive"]},"UpdateTaxRate":{"type":"object","properties":{"display_name":{"type":"string","minLength":1,"maxLength":50},"active":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Key-value pairs of your own, stored on the object and returned exactly as you sent them. At most 50 keys; keys up to 40 characters, without square brackets; values are strings of up to 500 characters. Never shown to the customer.","example":{"shop_id":"scuba-sensation","booking_id":"SCU-B0161"},"maxProperties":50}},"additionalProperties":false},"InvoiceLineItem":{"type":"object","properties":{"id":{"type":"string","example":"ii_7nQ9rS1tU3vW5xY7zA9bC1dE"},"object":{"type":"string","enum":["line_item"]},"description":{"type":"string"},"quantity":{"type":"integer","exclusiveMinimum":0},"unit_amount":{"type":"integer"},"amount":{"type":"integer"},"tax_amount":{"type":"integer"},"price":{"type":["string","null"],"description":"The price this line quotes, when it quotes one."},"tax_rate":{"type":["string","null"]},"metadata":{"type":"object","additionalProperties":{"type":"string"}}},"required":["id","object","description","quantity","unit_amount","amount","tax_amount","price","tax_rate","metadata"]},"Invoice":{"type":"object","properties":{"id":{"type":"string","example":"in_1aB3cD5eF7gH9jK1lM3nP5qR"},"object":{"type":"string","enum":["invoice"]},"status":{"type":"string","enum":["draft","open","paid","void","uncollectible"],"description":"`draft` until finalized, then `open`. `paid` when what has been received covers the total. `void` is issued-in-error; `uncollectible` is issued, owed and written off. All three of those are final — there is no un-voiding a document somebody already has."},"number":{"type":["string","null"],"description":"Assigned at finalize from your own consecutive sequence. Null while a draft.","example":"INV-0007"},"customer":{"type":"string"},"currency":{"type":"string","enum":["bzd","usd"],"description":"Three-letter ISO currency code, lowercase.","example":"usd"},"collection_method":{"type":"string","enum":["send_invoice"]},"subtotal":{"type":"integer","description":"Net of tax, in minor units."},"tax":{"type":"integer","description":"Minor units."},"total":{"type":"integer","description":"`subtotal + tax`, in minor units."},"amount_paid":{"type":"integer","description":"Minor units. Can exceed `total` — see `amount_due`."},"amount_due":{"type":"integer","description":"`total − amount_paid`, in minor units. NEGATIVE on an overpayment, which happens when two browser tabs on the hosted page are both paid. It is reported rather than clamped: money that moved is money the merchant owes back."},"allow_partial":{"type":"boolean","description":"Whether the hosted page lets the customer pay less than the whole balance."},"hosted_invoice_url":{"type":"string","description":"The page to send the customer. Its token is NOT this object's id — the id is safe in a log and this URL is not, because the page names the customer and what they owe."},"invoice_pdf":{"type":"string","description":"The invoice as a PDF. Requires your API key."},"due_date":{"type":["integer","null"],"description":"Unix timestamp, seconds."},"description":{"type":["string","null"]},"memo":{"type":["string","null"],"description":"Shown to the customer on the hosted page and the PDF."},"footer":{"type":["string","null"],"description":"Small print at the bottom of the document."},"custom_fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"]}},"lines":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceLineItem"}}},"required":["object","data"]},"finalized_at":{"type":["integer","null"]},"paid_at":{"type":["integer","null"]},"voided_at":{"type":["integer","null"]},"sent_at":{"type":["integer","null"],"description":"When `/send` last emailed the customer. Set only when the email was actually sent: a send that answered `503 email_not_sent` leaves it as it was."},"reminder_count":{"type":"integer"},"latest_payment_intent":{"type":["string","null"]},"livemode":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"created":{"type":"integer"}},"required":["id","object","status","number","customer","currency","collection_method","subtotal","tax","total","amount_paid","amount_due","allow_partial","hosted_invoice_url","invoice_pdf","due_date","description","memo","footer","custom_fields","lines","finalized_at","paid_at","voided_at","sent_at","reminder_count","latest_payment_intent","livemode","metadata","created"]},"InvoiceCustomField":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":40},"value":{"type":"string","minLength":1,"maxLength":140}},"required":["name","value"]},"CreateInvoice":{"type":"object","properties":{"customer":{"type":"string","example":"cus_9aB1cD3eF5gH7iJ9kL1mN3oP"},"currency":{"type":"string","enum":["bzd","usd"],"description":"Defaults to your account's currency. Every line on the invoice is in it.","example":"usd"},"due_date":{"type":"integer","description":"Unix timestamp, seconds. Exactly UTC midnight means that calendar day, which is how the API returns a due date. Any other second means the day it falls on in Belize. Give this OR `days_until_due`, not both."},"days_until_due":{"type":"integer","minimum":0,"maximum":365,"description":"Counted from the moment you finalize, not from now. Give this OR `due_date`."},"description":{"type":"string","maxLength":1500},"memo":{"type":"string","maxLength":1500},"footer":{"type":"string","maxLength":1500},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceCustomField"},"maxItems":4},"allow_partial":{"type":"boolean","default":false},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Key-value pairs of your own, stored on the object and returned exactly as you sent them. At most 50 keys; keys up to 40 characters, without square brackets; values are strings of up to 500 characters. Never shown to the customer.","example":{"shop_id":"scuba-sensation","booking_id":"SCU-B0161"},"maxProperties":50}},"required":["customer"]},"UpdateInvoice":{"type":"object","properties":{"due_date":{"type":"integer"},"days_until_due":{"type":"integer","minimum":0,"maximum":365},"description":{"type":"string","maxLength":1500},"memo":{"type":"string","maxLength":1500},"footer":{"type":"string","maxLength":1500},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceCustomField"},"maxItems":4},"allow_partial":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Key-value pairs of your own, stored on the object and returned exactly as you sent them. At most 50 keys; keys up to 40 characters, without square brackets; values are strings of up to 500 characters. Never shown to the customer.","example":{"shop_id":"scuba-sensation","booking_id":"SCU-B0161"},"maxProperties":50}},"additionalProperties":false},"InvoiceSendResult":{"allOf":[{"$ref":"#/components/schemas/Invoice"},{"type":"object","properties":{"test_email_suppressed":{"type":"boolean","enum":[true],"description":"Test mode only: nothing was sent by THIS request, because the customer's address is not a member of your team. Absent otherwise. ⚠️ Read this rather than `sent_at`: an earlier send to a team address leaves `sent_at` set, and it stays set on a later suppressed send."}}}]},"PayInvoice":{"type":"object","properties":{"payment_method":{"type":"string","description":"A card the customer has already saved with you.","example":"pm_2xY4zA6bC8dE0fG2hI4jK6lM"}},"required":["payment_method"]},"CreateInvoiceItem":{"type":"object","properties":{"invoice":{"type":"string","description":"The DRAFT invoice to add the line to."},"price":{"type":"string","description":"A price of yours. Its amount and currency are copied onto the line."},"unit_amount":{"type":"integer","minimum":0,"description":"Minor units. Give this and `description`, or give `price`."},"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":1000000,"default":1},"tax_rate":{"type":"string","description":"An active tax rate of yours."},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Key-value pairs of your own, stored on the object and returned exactly as you sent them. At most 50 keys; keys up to 40 characters, without square brackets; values are strings of up to 500 characters. Never shown to the customer.","example":{"shop_id":"scuba-sensation","booking_id":"SCU-B0161"},"maxProperties":50}},"required":["invoice"]},"UpdateInvoiceItem":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"unit_amount":{"type":"integer","minimum":0},"tax_rate":{"type":["string","null"]},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Key-value pairs of your own, stored on the object and returned exactly as you sent them. At most 50 keys; keys up to 40 characters, without square brackets; values are strings of up to 500 characters. Never shown to the customer.","example":{"shop_id":"scuba-sensation","booking_id":"SCU-B0161"},"maxProperties":50}},"additionalProperties":false},"Deleted":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]},"Event":{"type":"object","properties":{"id":{"type":"string","description":"Unique, and the same on every retry and resend of this event: deduplicate on it.","example":"evt_4gH6jK8lM0nP2qR4sT6uV8wX"},"object":{"type":"string","enum":["event"]},"type":{"type":"string","description":"What happened. The full list is on the webhooks page of the docs.","example":"payment_intent.succeeded"},"api_version":{"type":"string","description":"The API version the object in `data` was written in.","example":"2026-09-01"},"account":{"type":"string","description":"The account this happened on. Your own, or one of your connected accounts on a Connect endpoint.","example":"acct_1aB2cD3eF4gH5iJ6kL7mN8oP"},"data":{"type":"object","properties":{"object":{"type":"object","additionalProperties":{},"description":"The object the event is about — a payment intent, a refund, a payout and so on — as it stood when the event happened. Its own `object` field says which. Retrieve it by id for its state now."}},"required":["object"],"description":"Always `{ object: … }`."},"livemode":{"type":"boolean"},"created":{"type":"integer","description":"When it happened. Unix timestamp, seconds."}},"required":["id","object","type","api_version","account","data","livemode","created"],"description":"Delivered to your webhook endpoints as the request body, and readable from `/v1/events`. The body is signed: verify `Secure-Processing-Signature` against the raw bytes before parsing it."},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","example":"we_6mN8pQ0rS2tU4vW6xY8zA0bC"},"object":{"type":"string","enum":["webhook_endpoint"]},"url":{"type":"string"},"description":{"type":["string","null"]},"enabled_events":{"type":"array","items":{"type":"string"},"description":"The event types sent to this endpoint. `[\"*\"]` means every type."},"connect":{"type":"boolean","description":"Receives your connected accounts' events and not your own. Each carries `account`, and arrives only in the mode of this endpoint: a live Connect endpoint never receives test events."},"status":{"type":"string","enum":["enabled","disabled"],"description":"`disabled` when you disabled it, or when we did after twenty deliveries in a row failed. A disabled endpoint receives nothing until you switch it back on with `disabled: false`."},"secret":{"type":"string","description":"The signing secret: `whsec_` and 32 letters and digits. Present only in the response that created the endpoint or rotated its secret, and never again — we keep only an encrypted copy. Store it as it arrives.","example":"whsec_4fT9kQ2mX7pL1vB8nR3cY6hJ0wZ5sD2a"},"livemode":{"type":"boolean"},"created":{"type":"integer"}},"required":["id","object","url","description","enabled_events","connect","status","livemode","created"]},"CreateWebhookEndpoint":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri","description":"Where we POST each event. Must be https for a live endpoint; a test endpoint may be http, for a tunnel to your machine. Must answer 2xx within 10 seconds and must not redirect — a redirect counts as a failure.","example":"https://example.com/webhooks/secure-processing"},"description":{"type":"string"},"enabled_events":{"type":"array","items":{"type":"string","maxLength":100},"maxItems":100,"default":["*"],"description":"Event types to send, or `[\"*\"]` for everything. Defaults to `[\"*\"]`.","example":["payment_intent.succeeded","refund.succeeded"]},"connect":{"type":"boolean","description":"Receive your connected accounts' events on this endpoint instead of your own. Fixed when the endpoint is created. A live one needs a platform we have enabled; a test one needs only an active business. It receives events in its own mode only, unlike Stripe, where a live Connect endpoint also receives test events."}},"required":["url"]},"UpdateWebhookEndpoint":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"},"description":{"type":"string"},"enabled_events":{"type":"array","items":{"type":"string","maxLength":100},"maxItems":100},"disabled":{"type":"boolean","description":"`false` switches a disabled endpoint back on — whether you disabled it or we did after repeated failures — and clears its failure count. `true` disables it, as DELETE does. The secret is unchanged either way."}}},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string","example":"wd_9kL1mN3pQ5rS7tU9vW1xY3zA"},"object":{"type":"string","enum":["webhook_delivery"]},"endpoint":{"type":"string"},"event":{"type":"string"},"event_type":{"type":"string"},"status":{"type":"string","enum":["pending","succeeded","dead"]},"attempt_count":{"type":"integer"},"next_attempt_at":{"type":["integer","null"]},"last_response_status":{"type":["integer","null"]},"last_error":{"type":["string","null"]},"created":{"type":"integer"}},"required":["id","object","endpoint","event","event_type","status","attempt_count","next_attempt_at","last_response_status","last_error","created"]},"ApiKey":{"type":"object","properties":{"id":{"type":"string","example":"key_4hJ6kL8mN0pQ2rS4tU6vW8xY"},"object":{"type":"string","enum":["api_key"]},"livemode":{"type":"boolean"},"prefix":{"type":"string","example":"sk_test_"},"last4":{"type":"string"},"name":{"type":["string","null"]},"secret":{"type":"string","description":"Shown once, here. We store only a hash and cannot show it again."},"last_used_at":{"type":["integer","null"]},"expires_at":{"type":["integer","null"]},"revoked_at":{"type":["integer","null"]},"created":{"type":"integer"}},"required":["id","object","livemode","prefix","last4","name","last_used_at","expires_at","revoked_at","created"]},"Balance":{"type":"object","properties":{"object":{"type":"string","enum":["balance"]},"pending":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"integer"},"currency":{"type":"string"}},"required":["amount","currency"]}},"available":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"integer"},"currency":{"type":"string"}},"required":["amount","currency"]}},"payouts_in_transit":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"integer"},"currency":{"type":"string"}},"required":["amount","currency"]}},"reserved":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"integer"},"currency":{"type":"string"}},"required":["amount","currency"]},"description":"Held for open disputes. Still yours until each dispute closes: released when you win, gone when you lose. Neither available nor pending, so it is in neither of those."},"livemode":{"type":"boolean"}},"required":["object","pending","available","payouts_in_transit","reserved","livemode"]},"BalanceTransaction":{"type":"object","properties":{"id":{"type":"string","example":"btxn_9f4c1e2a7b8d4f0aa1c3e5d7b9f0a2c4"},"object":{"type":"string","enum":["balance_transaction"]},"type":{"type":"string","enum":["charge","refund","payout","payout_reversal","adjustment","dispute","dispute_reversal","application_fee","application_fee_refund","connect_collection_transfer"]},"amount":{"type":"integer","description":"Signed, positive in your favour, in minor units of `currency` — always BZD. For a charge this is what the card was charged (the payment's `settlement_amount`), not the amount it was priced at: a USD 25.00 payment is a charge of 5000. Refunds and payouts are negative."},"fee":{"type":"integer","description":"Our fee on this movement. Positive on a charge; negative on a refund that returns part of it; 0 where there is none."},"net":{"type":"integer","description":"`amount - fee`: what actually moved your balance. Summed over the whole list it equals `pending + available` from `/v1/balance`."},"currency":{"type":"string","description":"Lowercase. Always `bzd` today.","example":"bzd"},"source":{"type":"string","description":"What this movement belongs to. A `charge` names the payment intent (`pi_…`); a `refund` names the refund (`re_…`), whose `payment_intent` leads back to the payment; a `payout` or `payout_reversal` names the payout (`po_…`); a `dispute` or `dispute_reversal` names the dispute; an `adjustment` names the adjustment.","example":"pi_3KqL8xQpR2sT7vW9yZ1aB4cD"},"status":{"type":"string","enum":["pending","available"],"description":"`pending` until the settlement delay has passed, then `available` to be paid out."},"available_on":{"type":"integer"},"created":{"type":"integer"},"description":{"type":["string","null"],"description":"What it was for: a payment's or a refund's `description`, or an adjustment's reason. Null where there is none."},"customer_name":{"type":["string","null"],"description":"The name on the customer of a payment or a refund, when there is one."}},"required":["id","object","type","amount","fee","net","currency","source","status","available_on","created","description","customer_name"]},"PayoutDestination":{"type":"object","properties":{"bank_name":{"type":["string","null"]},"account_name":{"type":["string","null"]},"account_last4":{"type":["string","null"]}},"required":["bank_name","account_name","account_last4"]},"Payout":{"type":"object","properties":{"id":{"type":"string","example":"po_7Kq2LxR9sT4vW8yZ1aB3cD5e"},"object":{"type":"string","enum":["payout"]},"amount":{"type":"integer","description":"In minor units of the settlement currency."},"currency":{"type":"string","enum":["bzd"],"description":"Payouts are always in Belize dollars: it is what leaves the pooled merchant account, whatever currency a payment was priced in."},"status":{"type":"string","enum":["pending","in_transit","paid","canceled","failed","returned"],"description":"`pending` — cut, and the transfer has not been made. `in_transit` — the transfer has been initiated. `paid` — the bank confirmed it, and `bank_reference` names it. `canceled` / `failed` — the money went back to your available balance. `returned` — it left and the bank sent it back; the money is in your available balance again."},"method":{"type":"string","enum":["bank_transfer"]},"destination":{"$ref":"#/components/schemas/PayoutDestination"},"arrival_date":{"type":["string","null"]},"bank_reference":{"type":["string","null"]},"failure_reason":{"type":["string","null"]},"failure_code":{"type":["string","null"],"enum":["account_closed","no_account","invalid_account_number","incorrect_account_holder_name","account_frozen","bank_account_restricted","invalid_currency","declined","could_not_process"],"description":"Why the bank refused or returned it. Null otherwise, and on payouts from before this existed."},"return_reference":{"type":["string","null"],"description":"The bank's reference for the return, when `status` is `returned`."},"returned_at":{"type":["integer","null"]},"returned_amount":{"type":["integer","null"],"description":"What the bank took back from the transfer, before its fee, in minor units. Null unless `status` is `returned`."},"return_fee":{"type":["integer","null"],"description":"What the bank kept for returning it, in minor units. What reached your balance is `returned_amount` less this."},"livemode":{"type":"boolean"},"created":{"type":"integer"},"paid_at":{"type":["integer","null"]}},"required":["id","object","amount","currency","status","method","destination","arrival_date","bank_reference","failure_reason","failure_code","return_reference","returned_at","returned_amount","return_fee","livemode","created","paid_at"]},"PayoutTimelineEntry":{"type":"object","properties":{"type":{"type":"string","enum":["created","in_transit","paid","statement_sent","returned","failed","canceled"],"description":"`created` — the money was set aside from your balance. `in_transit` — the transfer was entered at our bank. `paid` — it left; `bank_reference` names it. `statement_sent` — the payout statement was emailed. `returned`, `failed`, `canceled` — the endings, as on the payout's `status`."},"created":{"type":"integer"},"started_by":{"type":["string","null"],"enum":["schedule","business","secure_processing"],"description":"On `created` only: whether your schedule, you, or we started it. Null on every other type."},"bank_reference":{"type":["string","null"],"description":"On `paid`: the bank's reference for the transfer."},"return_reference":{"type":["string","null"],"description":"On `returned`: the bank's reference for the return."},"recipients":{"type":["integer","null"],"description":"On `statement_sent`: how many people it was emailed to."}},"required":["type","created","started_by","bank_reference","return_reference","recipients"]},"PayoutTimeline":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PayoutTimelineEntry"}},"included_again_in":{"type":["string","null"],"description":"For a `canceled`, `failed` or `returned` payout: the payout that carried the money again. Null until one has."},"included_again_on":{"type":["integer","null"],"description":"When that payout was made, unix seconds."},"covers":{"type":"object","properties":{"lines":{"type":"integer","description":"How many balance transactions the payout covers, all of them."},"payments":{"type":"object","properties":{"count":{"type":"integer"},"amount":{"type":"integer"}},"required":["count","amount"]},"refunds":{"type":"object","properties":{"count":{"type":"integer"},"amount":{"type":"integer"}},"required":["count","amount"]},"disputes":{"type":"object","properties":{"count":{"type":"integer"},"amount":{"type":"integer"}},"required":["count","amount"]},"adjustments":{"type":"object","properties":{"count":{"type":"integer"},"amount":{"type":"integer"}},"required":["count","amount"]},"fees":{"type":"integer","description":"Our fees across those lines, positive as they are on a charge."},"net":{"type":"integer","description":"The lines' `net`, summed. It equals the payout's `amount`."}},"required":["lines","payments","refunds","disputes","adjustments","fees","net"],"description":"What the payout covers, totalled over every line, so a page of `/v1/balance_transactions?payout=` is never mistaken for the whole."}},"required":["object","url","data","included_again_in","included_again_on","covers"]},"Statement":{"type":"object","properties":{"id":{"type":"string","example":"stmt_9f4c1e2a7b8d4f0aa1c3e5d7"},"object":{"type":"string","enum":["statement"]},"kind":{"type":"string","enum":["monthly"]},"period":{"type":"object","properties":{"start":{"type":"string","description":"The first day, Belize time.","example":"2026-10-01"},"end":{"type":"string","description":"The last day covered, inclusive.","example":"2026-10-31"}},"required":["start","end"]},"made":{"type":"integer","description":"When it was made, unix seconds."},"fingerprint":{"type":"string","description":"sha256 of the statement as made. The same on every copy."},"currency":{"type":"string"},"opening_balance":{"type":"integer","description":"Available, pending and held for disputes, at the start."},"closing_balance":{"type":"integer"},"payments":{"type":"object","properties":{"count":{"type":"integer"},"gross":{"type":"integer"}},"required":["count","gross"]},"fees":{"type":"integer","description":"Our fees on the period's payments, positive."},"refunds":{"type":"object","properties":{"count":{"type":"integer"},"amount":{"type":"integer"}},"required":["count","amount"]},"fees_returned":{"type":"integer","description":"Fees given back with refunds, positive."},"disputes":{"type":"object","properties":{"count":{"type":"integer"},"amount":{"type":"integer"},"fees":{"type":"integer"}},"required":["count","amount","fees"]},"adjustments":{"type":"object","properties":{"count":{"type":"integer"},"amount":{"type":"integer"}},"required":["count","amount"]},"payouts_sent":{"type":"object","properties":{"count":{"type":"integer"},"amount":{"type":"integer"}},"required":["count","amount"]},"payouts_returned":{"type":"object","properties":{"count":{"type":"integer"},"amount":{"type":"integer"}},"required":["count","amount"]},"lines":{"type":"integer","description":"How many balance transactions it lists."},"livemode":{"type":"boolean"}},"required":["id","object","kind","period","made","fingerprint","currency","opening_balance","closing_balance","payments","fees","refunds","fees_returned","disputes","adjustments","payouts_sent","payouts_returned","lines","livemode"]},"PaymentsSummary":{"type":"object","properties":{"object":{"type":"string","enum":["payments_summary"]},"livemode":{"type":"boolean"},"currencies":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","example":"usd"},"succeeded_last_24h":{"type":"object","properties":{"count":{"type":"integer"},"amount":{"type":"integer","description":"`amount_received`, summed, in minor units, of payments that SUCCEEDED in the last 24 hours."}},"required":["count","amount"]},"refunded_last_30d":{"type":"object","properties":{"count":{"type":"integer"},"amount":{"type":"integer","description":"Refunds that succeeded in the last 30 days, in minor units."}},"required":["count","amount"]},"awaiting_capture":{"type":"object","properties":{"count":{"type":"integer"},"amount":{"type":"integer","description":"`amount_capturable`, summed, in minor units."}},"required":["count","amount"]}},"required":["currency","succeeded_last_24h","refunded_last_30d","awaiting_capture"]}}},"required":["object","livemode","currencies"]},"BalanceSide":{"type":"object","properties":{"available":{"type":"integer","description":"What a payout would draw on."},"pending":{"type":"integer","description":"Captured, still inside the settlement delay."},"reserved":{"type":"integer","description":"Held for open disputes. Not part of `available + pending`, which is what `reconciled` checks."}},"required":["available","pending","reserved"]},"BalanceSummaryActivityAmount":{"type":"object","properties":{"count":{"type":"integer"},"amount":{"type":"integer"}},"required":["count","amount"]},"BalanceSummaryDisputeActivity":{"type":"object","properties":{"count":{"type":"integer"},"amount":{"type":"integer","description":"Signed: the amounts held for chargebacks, plus the ones released when you won. Negative means money is held or gone."},"fees":{"type":"integer","description":"Our handling fees on lost chargebacks, positive. `amount − fees` is what disputes moved in the period."}},"required":["count","amount","fees"]},"BalanceSummaryActivity":{"type":"object","properties":{"charges":{"type":"object","properties":{"count":{"type":"integer"},"gross":{"type":"integer","description":"What the cards were charged."},"fees":{"type":"integer","description":"What we took, positive."},"net":{"type":"integer","description":"`gross − fees`: what reached your balance."}},"required":["count","gross","fees","net"]},"refunds":{"type":"object","properties":{"count":{"type":"integer"},"amount":{"type":"integer","description":"Negative: money going back out."},"fees_returned":{"type":"integer","description":"Negative: fee revenue we gave back with it."}},"required":["count","amount","fees_returned"]},"payouts":{"$ref":"#/components/schemas/BalanceSummaryActivityAmount"},"payout_reversals":{"$ref":"#/components/schemas/BalanceSummaryActivityAmount"},"application_fees":{"$ref":"#/components/schemas/BalanceSummaryActivityAmount"},"adjustments":{"$ref":"#/components/schemas/BalanceSummaryActivityAmount"},"disputes":{"$ref":"#/components/schemas/BalanceSummaryDisputeActivity"}},"required":["charges","refunds","payouts","payout_reversals","application_fees","adjustments","disputes"]},"BalanceSummary":{"type":"object","properties":{"object":{"type":"string","enum":["balance_summary"]},"currency":{"type":"string"},"period":{"type":"object","properties":{"start":{"type":"integer","description":"Inclusive, unix seconds."},"end":{"type":"integer","description":"EXCLUSIVE, unix seconds."}},"required":["start","end"]},"starting_balance":{"$ref":"#/components/schemas/BalanceSide"},"activity":{"$ref":"#/components/schemas/BalanceSummaryActivity"},"ending_balance":{"$ref":"#/components/schemas/BalanceSide"},"ledger":{"allOf":[{"$ref":"#/components/schemas/BalanceSide"},{"description":"The same two figures recomputed from the ledger's entries at the moment of the request, by the same function a real payout is cut against."}]},"reconciled":{"type":"boolean","description":"Whether the derived figures and the ledger agree. **`false` is an incident, not a display quirk** — it means your statement and your balance disagree about what moved. Get in touch rather than reconciling around it."},"livemode":{"type":"boolean"}},"required":["object","currency","period","starting_balance","activity","ending_balance","ledger","reconciled","livemode"]},"RiskCondition":{"type":"object","properties":{"attr":{"type":"string","enum":["amount_minor","currency","email","email_domain","ip_country","velocity_email_1h","velocity_email_24h","velocity_ip_1h","velocity_ip_24h","attempts_email_24h"]},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","in","not_in","contains","ends_with"]},"value":{"anyOf":[{"type":"number"},{"type":"string","minLength":1,"maxLength":200},{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":50},{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":50}]}},"required":["attr","op","value"],"description":"One test. `amount_minor` and the five counts take numbers; `currency`, `email`, `email_domain` and `ip_country` take strings. `gt`/`gte`/`lt`/`lte` are for numbers, `contains`/`ends_with` for strings, and `in`/`not_in` take an array of the attribute's own type."},"RiskPredicate":{"type":"object","properties":{"all":{"type":"array","items":{"$ref":"#/components/schemas/RiskCondition"},"minItems":1,"maxItems":8}},"required":["all"],"description":"An AND of one to eight conditions. There is no `any` and no nesting: an OR is two rules, which is also two rows you can switch off independently."},"RiskRule":{"type":"object","properties":{"id":{"type":"string","example":"rr_4eF6gH8jK0lM2nP4qR6sT8uV"},"object":{"type":"string","enum":["risk_rule"]},"name":{"type":"string"},"action":{"type":"string","enum":["block","review"]},"predicate":{"$ref":"#/components/schemas/RiskPredicate"},"enabled":{"type":"boolean"},"priority":{"type":"integer"},"platform_default":{"type":"boolean"},"livemode":{"type":["boolean","null"],"description":"Null on a platform default, which applies in test and live alike."},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"created":{"type":"integer"},"updated":{"type":"integer"}},"required":["id","object","name","action","predicate","enabled","priority","platform_default","livemode","metadata","created","updated"]},"CreateRiskRule":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"example":"Review payments from outside Belize"},"action":{"type":"string","enum":["block","review"],"description":"`block` refuses the payment before the bank is called. `review` lets it through and opens a review once it succeeds."},"predicate":{"$ref":"#/components/schemas/RiskPredicate"},"enabled":{"type":"boolean","default":true},"priority":{"type":"integer","minimum":0,"maximum":10000,"default":100,"description":"Lower runs first. It orders the reasons on a review; it does not change the outcome."},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Key-value pairs of your own, stored on the object and returned exactly as you sent them. At most 50 keys; keys up to 40 characters, without square brackets; values are strings of up to 500 characters. Never shown to the customer.","example":{"shop_id":"scuba-sensation","booking_id":"SCU-B0161"},"maxProperties":50}},"required":["name","action","predicate"]},"UpdateRiskRule":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"enabled":{"type":"boolean"},"priority":{"type":"integer","minimum":0,"maximum":10000},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Key-value pairs of your own, stored on the object and returned exactly as you sent them. At most 50 keys; keys up to 40 characters, without square brackets; values are strings of up to 500 characters. Never shown to the customer.","example":{"shop_id":"scuba-sensation","booking_id":"SCU-B0161"},"maxProperties":50}},"additionalProperties":false},"RiskListItem":{"type":"object","properties":{"id":{"type":"string","example":"rli_7gH9jK1lM3nP5qR7sT9uV1wX"},"object":{"type":"string","enum":["risk_list_item"]},"list":{"type":"string","enum":["allow","block"]},"kind":{"type":"string","enum":["email","email_domain","ip","card_fingerprint"]},"value":{"type":"string"},"note":{"type":["string","null"]},"livemode":{"type":"boolean"},"created":{"type":"integer"}},"required":["id","object","list","kind","value","note","livemode","created"]},"CreateRiskListItem":{"type":"object","properties":{"list":{"type":"string","enum":["allow","block"],"description":"An `allow` entry beats every rule, including ours. A `block` entry refuses the payment."},"kind":{"type":"string","enum":["email","email_domain","ip","card_fingerprint"],"description":"`card_fingerprint` can only be matched on a charge against a card already saved — the card number is entered on the bank's page, so there is nothing to fingerprint on a first visit to a checkout."},"value":{"type":"string","minLength":1,"maxLength":255,"example":"diver@example.com"},"note":{"type":"string","maxLength":500}},"required":["list","kind","value"]},"AccountRequirements":{"type":["object","null"],"properties":{"currently_due":{"type":"array","items":{"type":"string"},"description":"What you must supply or fix to keep this account enabled, from the same requirements engine the database's submit check uses. The keys are ours, namespaced and close to Stripe's where you would guess them, and are not Stripe's field paths. A key may name a person (`person.mper_….verification.document`). Always empty on a test shop or a sandbox, which can never activate.","example":["business.legal_name","representative.verification.document"]},"eventually_due":{"type":"array","items":{"type":"string"},"description":"Everything you will have to supply. Always includes `currently_due`."},"past_due":{"type":"array","items":{"type":"string"},"description":"The part of `currently_due` whose deadline has passed."},"pending_verification":{"type":"array","items":{"type":"string"},"description":"Supplied and waiting for us to check. Nothing for you to do."},"current_deadline":{"type":["integer","null"],"description":"When the earliest thing in `currently_due` falls due, as a Unix timestamp."},"disabled_reason":{"type":["string","null"],"enum":["requirements.past_due","requirements.pending_submission","under_review","action_required.requested_capabilities","account_suspended","rejected.other","rejected.platform","rejected.platform_fraud","rejected.platform_terms_of_service","rejected.platform_other"],"description":"Why charges are not enabled in the mode of your key, or null when they are."},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"reason":{"type":"string"},"requirement":{"type":"string"}},"required":["code","reason","requirement"]}},"alternatives":{"type":"array","items":{"type":"object","properties":{"original_fields_due":{"type":"array","items":{"type":"string"}},"alternative_fields_due":{"type":"array","items":{"type":"string"}}},"required":["original_fields_due","alternative_fields_due"]},"description":"Where supplying a different thing would satisfy a requirement."}},"required":["currently_due","eventually_due","past_due","pending_verification","current_deadline","disabled_reason","errors","alternatives"],"description":"Null to a platform's test key on a real account."},"PayoutSchedule":{"type":"object","properties":{"interval":{"type":"string","enum":["manual","daily","weekly","monthly"]},"weekly_anchor":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"monthly_anchor":{"type":"integer","minimum":1,"maximum":31},"delay_days":{"type":"integer","minimum":0,"maximum":30}},"required":["interval","weekly_anchor","monthly_anchor","delay_days"]},"Account":{"type":"object","properties":{"id":{"type":"string","example":"acct_1aB2cD3eF4gH5iJ6kL7mN8oP"},"object":{"type":"string","enum":["account"]},"name":{"type":"string"},"live_enabled":{"type":["boolean","null"],"description":"Whether this account may take real money. False until we have approved it. Null to a platform's test key on a real account, which reads test-mode information only."},"test_only":{"type":"boolean","description":"A test shop or a sandbox: it exists in test mode only and can never go live. When you are ready for live, create a separate real account."},"sandbox":{"type":"boolean","description":"A Sandbox: a separate practice copy of a business, with its own keys and settings. Always test mode."},"business_profile":{"type":"object","properties":{"name":{"type":"string"},"mcc":{"type":["string","null"]},"support_email":{"type":["string","null"],"description":"Null when you may not manage this account's settings (see `settings`), and to a platform's test key on a real account."}},"required":["name","mcc","support_email"]},"country":{"type":"string","example":"BZ"},"default_currency":{"type":"string","enum":["usd","bzd"]},"controller":{"type":"object","properties":{"type":{"type":"string","enum":["account","application"],"description":"`application` when a platform controls this account; `account` when it controls itself."},"is_controller":{"type":"boolean","description":"Whether YOU are this account's controlling platform."},"application":{"type":["string","null"],"description":"The controlling platform's account id."},"fees":{"type":"object","properties":{"payer":{"type":"string","enum":["account","application"]}},"required":["payer"]},"losses":{"type":"object","properties":{"payments":{"type":"string","enum":["secure_processing","application"]}},"required":["payments"]},"requirement_collection":{"type":"string","enum":["secure_processing"],"description":"Always `secure_processing`: we collect and decide verification for every business."},"dashboard":{"type":"object","properties":{"type":{"type":"string","enum":["full","express","none"]}},"required":["type"]}},"required":["type","is_controller","application","fees","losses","requirement_collection","dashboard"],"description":"Who answers for this account. Written once, when the account is created."},"capabilities":{"type":["object","null"],"properties":{"card_payments":{"type":"string","enum":["inactive","pending","active"]},"payouts":{"type":"string","enum":["inactive","pending","active"]}},"required":["card_payments","payouts"],"description":"What this account may do, per capability. Null to a platform's test key on a real account."},"charges_enabled":{"type":"boolean","description":"Whether card payments are accepted now, in the mode of your key: a test key answers for test mode."},"payouts_enabled":{"type":"boolean","description":"Whether payouts can be made now, in the mode of your key: a bank account on file and no hold, and in live mode the payouts capability active."},"disabled_reason":{"type":["string","null"],"description":"The first reason this account cannot take live payments or be paid out, from the verification engine, or null. Live, whichever key asks: `charges_enabled` answers for the key's mode. Null on a test shop or a sandbox, and to a platform's test key on a real account.","example":"requirements.pending_submission"},"details_submitted":{"type":["boolean","null"],"description":"Whether the activation application has ever been submitted. Null to a platform's test key on a real account."},"application_status":{"type":["string","null"],"enum":["draft","submitted","in_review","approved","rejected","more_info"],"description":"Null until the application has been started from the dashboard, and to a platform's test key on a real account."},"requirements":{"$ref":"#/components/schemas/AccountRequirements"},"settings":{"type":["object","null"],"properties":{"payouts":{"type":"object","properties":{"schedule":{"$ref":"#/components/schemas/PayoutSchedule"},"debit_negative_balances":{"type":"boolean","enum":[false],"description":"Always false: a negative balance is recovered from future payments, never debited from a bank."}},"required":["schedule","debit_negative_balances"]}},"required":["payouts"],"description":"Null unless you may manage it: as the controlling platform, `connect:write`; as the business itself, `payouts:manage` or `settings:business`. An analyst or a viewer reads the account, not its settings."},"platform_rejection":{"type":["object","null"],"properties":{"reason":{"type":"string","enum":["fraud","terms_of_service","other"],"description":"The platform's own reason. Shown only to that platform, never to the business it rejected."},"at":{"type":"string"}},"required":["at"],"description":"Set when the controlling platform ended the relationship on its side."},"metadata":{"type":["object","null"],"additionalProperties":{"type":"string","maxLength":500},"description":"Null when you may not manage this account's settings, and to a platform's test key on a real account.","example":{"shop_id":"scuba-sensation","booking_id":"SCU-B0161"},"maxProperties":50},"created":{"type":"integer"}},"required":["id","object","name","live_enabled","test_only","sandbox","business_profile","country","default_currency","controller","capabilities","charges_enabled","payouts_enabled","disabled_reason","details_submitted","application_status","requirements","settings","platform_rejection","created"]},"Address":{"type":["object","null"],"properties":{"line1":{"type":"string","minLength":1,"maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","minLength":1,"maxLength":200},"state":{"type":"string","maxLength":200},"postal_code":{"type":"string","maxLength":200},"country":{"type":"string","minLength":1,"maxLength":200}},"required":["line1","city","country"]},"ApplicationPerson":{"type":"object","properties":{"id":{"type":"string","example":"mper_4kR7tW2xY9zA1bC3dE5fG6hJ"},"object":{"type":"string","enum":["application_person"]},"role":{"type":"string","enum":["owner","director","representative"]},"first_name":{"type":"string"},"last_name":{"type":"string"},"date_of_birth":{"type":["string","null"]},"nationality":{"type":["string","null"]},"id_type":{"type":["string","null"],"enum":["passport","social_security","drivers_licence"]},"id_number_last4":{"type":["string","null"]},"is_representative":{"type":"boolean","description":"The one person who acts for the business with us."},"is_owner":{"type":"boolean"},"is_director":{"type":"boolean"},"is_executive":{"type":"boolean","description":"Controls the business without owning 25% of it."},"title":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"political_exposure":{"type":["string","null"],"enum":["none","existing","undeclared"]},"id_issuing_country":{"type":["string","null"]},"id_expires_on":{"type":["string","null"]},"confirmed_in_session":{"type":"boolean","description":"Whether a signed-in user has said they are this person, by making their declarations themselves."},"ownership_percent":{"type":["number","null"]},"address":{"$ref":"#/components/schemas/Address"},"id_document":{"type":["string","null"]},"proof_of_address":{"type":["string","null"]}},"required":["id","object","role","first_name","last_name","date_of_birth","nationality","id_type","id_number_last4","is_representative","is_owner","is_director","is_executive","title","email","phone","political_exposure","id_issuing_country","id_expires_on","confirmed_in_session","ownership_percent","address","id_document","proof_of_address"]},"ApplicationDocument":{"type":"object","properties":{"id":{"type":"string","example":"adoc_4kR7tW2xY9zA1bC3dE5fG6hJ"},"object":{"type":"string","enum":["application_document"]},"requirement":{"type":"string"},"file":{"type":"string"},"side":{"type":["string","null"],"enum":["front","back"]}},"required":["id","object","requirement","file","side"]},"ApplicationEntity":{"type":"object","properties":{"id":{"type":"string","example":"aent_4kR7tW2xY9zA1bC3dE5fG6hJ"},"object":{"type":"string","enum":["application_entity"]},"legal_name":{"type":"string"},"registration_number":{"type":["string","null"]},"country":{"type":["string","null"]},"percent":{"type":["number","null"]},"parent_entity":{"type":["string","null"]}},"required":["id","object","legal_name","registration_number","country","percent","parent_entity"]},"Requirements":{"type":"object","properties":{"currently_due":{"type":"array","items":{"type":"string"},"description":"What you must supply or fix to keep this account enabled. These keys are ours, namespaced and close to Stripe's where you would guess them, and they are not Stripe's field paths. A key may name a person (`person.mper_….verification.document`), and an older key is reported beside the one that replaced it for one API version.","example":["business.legal_name","representative.verification.document"]},"eventually_due":{"type":"array","items":{"type":"string"},"description":"Everything you will have to supply. Always includes `currently_due`."},"past_due":{"type":"array","items":{"type":"string"},"description":"The part of `currently_due` whose deadline has passed."},"pending_verification":{"type":"array","items":{"type":"string"},"description":"Supplied, and waiting on us. There is nothing for you to do about these."},"current_deadline":{"type":["string","null"],"description":"When the earliest thing in `currently_due` falls due."},"errors":{"type":"array","items":{"type":"object","properties":{"requirement":{"type":"string"},"code":{"type":"string"},"reason":{"type":"string"}},"required":["requirement","code","reason"]},"description":"What we checked and could not accept, and what to supply instead."},"alternatives":{"type":"array","items":{"type":"object","properties":{"original_fields_due":{"type":"array","items":{"type":"string"}},"alternative_fields_due":{"type":"array","items":{"type":"string"}}},"required":["original_fields_due","alternative_fields_due"]},"description":"Where supplying a different thing would satisfy a requirement."}},"required":["currently_due","eventually_due","past_due","pending_verification","current_deadline","errors","alternatives"]},"TermsStatus":{"type":"object","properties":{"document":{"type":"string","enum":["sponsored_merchant_agreement","privacy_notice","biometric_consent","ownership_declaration","directorship_declaration","representative_declaration","pep_declaration"]},"version":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","published"],"description":"`draft`: our wording, awaiting counsel. `published`: the version in force."},"required":{"type":"boolean","description":"Whether submitting the application needs this version accepted."},"per_person":{"type":"boolean","description":"Accepted by each person for themselves, not by the business."},"accepted_by_persons":{"type":"array","items":{"type":"string"},"description":"For a person's own declaration: the people who have made it."},"accepted_at":{"type":["string","null"],"description":"When this version was accepted for the business, or null."}},"required":["document","version","title","status","required","per_person","accepted_by_persons","accepted_at"]},"InformationRequest":{"type":"object","properties":{"id":{"type":"string","example":"ireq_7hJ2kL4mN6pQ8rS0tU1vW3xY"},"object":{"type":"string","enum":["information_request"]},"requirement":{"type":"string","description":"What the ask is about: a requirement key from the checklist, a person, or `custom`.","example":"documents.business_registration"},"title":{"type":"string","description":"The heading of the ask, in our words.","example":"Your business registration document"},"kind":{"type":"string","enum":["fix","document","explain"],"description":"`fix`: correct a field. `document`: upload or replace a document. `explain`: answer in words."},"status":{"type":"string","enum":["open","answered","closed"],"description":"`open` waits for you; `answered` waits for us; `closed` needs nothing further."},"message":{"type":"string","description":"What we asked, in our words."},"error_code":{"type":["string","null"]},"due_at":{"type":["string","null"]},"response_text":{"type":["string","null"]},"response_files":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string"},"answered_at":{"type":["string","null"]},"closed_at":{"type":["string","null"]}},"required":["id","object","requirement","title","kind","status","message","error_code","due_at","response_text","response_files","created_at","answered_at","closed_at"]},"Application":{"type":"object","properties":{"id":{"type":"string","example":"mapp_9pQ3rS5tU7vX1yZ2aB4cD6eF"},"object":{"type":"string","enum":["application"]},"status":{"type":"string","enum":["draft","submitted","in_review","approved","rejected","more_info"]},"requirements_policy":{"type":"integer","description":"Which list of requirements applies. `1` is the original thirteen; `2` asks per business type and per person (KYC K1). The dashboard's step-by-step form is for `2`.","example":2},"business":{"type":"object","properties":{"legal_name":{"type":["string","null"]},"trading_name":{"type":["string","null"]},"business_type":{"type":["string","null"],"enum":["individual","sole_proprietor","company","partnership","ngo"]},"registration_number":{"type":["string","null"]},"tax_id":{"type":["string","null"]},"incorporation_date":{"type":["string","null"]},"website":{"type":["string","null"]},"description":{"type":["string","null"]},"mcc":{"type":["string","null"]},"address":{"$ref":"#/components/schemas/Address"},"phone":{"type":["string","null"]},"support_email":{"type":["string","null"]},"structure":{"type":["string","null"],"enum":["general","limited_liability_partnership","private_company","llc","registered_business_name","registered_non_profit"]},"principal_address":{"$ref":"#/components/schemas/Address"},"statement_descriptor":{"type":["string","null"]},"business_name_expires_on":{"type":["string","null"]},"good_standing_issued_on":{"type":["string","null"]},"expected_monthly_volume":{"type":["integer","null"],"description":"In minor units."},"average_ticket":{"type":["integer","null"],"description":"In minor units."}},"required":["legal_name","trading_name","business_type","registration_number","tax_id","incorporation_date","website","description","mcc","address","phone","support_email","structure","principal_address","statement_descriptor","business_name_expires_on","good_standing_issued_on","expected_monthly_volume","average_ticket"]},"bank":{"type":"object","properties":{"bank_name":{"type":["string","null"]},"bank_account_name":{"type":["string","null"]},"account_last4":{"type":["string","null"]},"statement_file":{"type":["string","null"]}},"required":["bank_name","bank_account_name","account_last4","statement_file"]},"documents":{"type":"object","properties":{"business_registration":{"type":["string","null"]},"tax_certificate":{"type":["string","null"]}},"required":["business_registration","tax_certificate"]},"persons":{"type":"array","items":{"$ref":"#/components/schemas/ApplicationPerson"}},"additional_documents":{"type":"array","items":{"$ref":"#/components/schemas/ApplicationDocument"},"description":"Documents beyond the three named above, each against the requirement it answers."},"entities":{"type":"array","items":{"$ref":"#/components/schemas/ApplicationEntity"},"description":"Companies that own part of this business."},"requirements":{"$ref":"#/components/schemas/Requirements"},"terms":{"type":"array","items":{"$ref":"#/components/schemas/TermsStatus"},"description":"The agreements and declarations that have a version in force, and whether each has been accepted. Documents still awaiting counsel are not listed until they have a text."},"phone_confirmation":{"type":"object","properties":{"status":{"type":"string","enum":["verified","unverified","unavailable"],"description":"`verified`: a code texted to `business.phone` was typed back. `unverified`: send one with `POST /v1/account/application/phone_confirmation`. `unavailable`: we cannot send texts yet, and nothing waits on it."},"verified_at":{"type":["string","null"]}},"required":["status","verified_at"],"description":"Whether the business phone has been confirmed by a code sent to it."},"information_requests":{"type":"array","items":{"$ref":"#/components/schemas/InformationRequest"},"description":"What we have asked you for. Resubmitting the application answers every open `fix` and `document` ask; an `explain` ask is answered with `POST /v1/account/application/information_requests/{id}/respond`."},"submitted_at":{"type":["string","null"]},"decided_at":{"type":["string","null"]},"decision_reason":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","object","status","requirements_policy","business","bank","documents","persons","additional_documents","entities","requirements","terms","phone_confirmation","information_requests","submitted_at","decided_at","decision_reason","created_at","updated_at"]},"ApplicationUpdate":{"type":"object","properties":{"legal_name":{"type":["string","null"],"maxLength":200},"trading_name":{"type":["string","null"],"maxLength":200},"business_type":{"type":["string","null"],"enum":["individual","sole_proprietor","company","partnership","ngo"]},"registration_number":{"type":["string","null"],"maxLength":80},"tax_id":{"type":["string","null"],"maxLength":80},"incorporation_date":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD."},"website":{"type":["string","null"],"maxLength":300},"description":{"type":["string","null"],"maxLength":2000},"mcc":{"type":["string","null"],"pattern":"^[0-9]{4}$"},"address":{"$ref":"#/components/schemas/Address"},"phone":{"type":["string","null"],"maxLength":40},"support_email":{"type":["string","null"],"maxLength":255,"format":"email"},"expected_monthly_volume":{"type":["integer","null"],"exclusiveMinimum":0},"average_ticket":{"type":["integer","null"],"exclusiveMinimum":0},"bank_name":{"type":["string","null"],"maxLength":120},"bank_account_name":{"type":["string","null"],"maxLength":120},"bank_account_number":{"type":["string","null"],"pattern":"^[0-9\\s-]{4,60}$"},"bank_statement_file":{"type":["string","null"]},"business_registration_file":{"type":["string","null"]},"tax_certificate_file":{"type":["string","null"]},"structure":{"type":["string","null"],"enum":["general","limited_liability_partnership","private_company","llc","registered_business_name","registered_non_profit"]},"principal_address":{"$ref":"#/components/schemas/Address"},"statement_descriptor":{"type":["string","null"],"minLength":5,"maxLength":22},"business_name_expires_on":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD."},"good_standing_issued_on":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD."}}},"ApplicationPersonInput":{"type":"object","properties":{"role":{"type":"string","enum":["owner","director","representative"]},"first_name":{"type":"string","minLength":1,"maxLength":100},"last_name":{"type":"string","minLength":1,"maxLength":100},"date_of_birth":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"nationality":{"type":["string","null"],"maxLength":80},"id_type":{"type":["string","null"],"enum":["passport","social_security","drivers_licence"]},"id_number":{"type":["string","null"],"maxLength":60},"ownership_percent":{"type":["number","null"],"minimum":0,"maximum":100},"address":{"$ref":"#/components/schemas/Address"},"id_document":{"type":["string","null"]},"proof_of_address":{"type":["string","null"]},"is_representative":{"type":"boolean","description":"Only one person at a time."},"is_owner":{"type":"boolean"},"is_director":{"type":"boolean"},"is_executive":{"type":"boolean"},"title":{"type":["string","null"],"maxLength":100},"email":{"type":["string","null"],"maxLength":320,"format":"email"},"phone":{"type":["string","null"],"maxLength":40},"political_exposure":{"type":["string","null"],"enum":["none","existing","undeclared"]},"id_issuing_country":{"type":["string","null"],"maxLength":80},"id_expires_on":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD."}},"required":["role","first_name","last_name"]},"ApplicationDocumentInput":{"type":"object","properties":{"requirement":{"type":"string","pattern":"^(documents\\.(constitution|bo_register|good_standing|annual_return|directors_register)|representative\\.authority|entity\\.aent_[0-9A-Za-z]{24}\\.register)$","example":"documents.constitution"},"file":{"type":"string"},"side":{"type":["string","null"],"enum":["front","back"]}},"required":["requirement","file"]},"ApplicationEntityInput":{"type":"object","properties":{"legal_name":{"type":"string","minLength":1,"maxLength":200},"registration_number":{"type":["string","null"],"maxLength":80},"country":{"type":["string","null"],"maxLength":80},"percent":{"type":["number","null"],"minimum":0,"maximum":100},"parent_entity":{"type":["string","null"],"description":"The company on this application that holds this one."}},"required":["legal_name"]},"PhoneConfirmation":{"type":"object","properties":{"object":{"type":"string","enum":["phone_confirmation"]},"status":{"type":"string","enum":["sent","verified"]},"sent_to":{"type":["string","null"],"description":"The last four digits, when a code was sent.","example":"•••• 0001"},"verified_at":{"type":["string","null"]}},"required":["object","status","sent_to","verified_at"]},"Industry":{"type":"object","properties":{"mcc":{"type":"string","example":"7999"},"label":{"type":"string","example":"Recreation services"}},"required":["mcc","label"]},"IndustryList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Industry"}}},"required":["object","data"]},"InformationRequestResponse":{"type":"object","properties":{"text":{"type":"string","maxLength":4000,"description":"Your answer, in words."},"files":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":10,"description":"Up to ten of your own uploaded file ids (`file_…`) that answer it."}}},"TermsDocument":{"type":"object","properties":{"object":{"type":"string","enum":["terms_document"]},"document":{"type":"string","enum":["sponsored_merchant_agreement","privacy_notice","biometric_consent","ownership_declaration","directorship_declaration","representative_declaration","pep_declaration"]},"version":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","published"]},"text":{"type":"string","description":"The exact text. Accepting records its sha256."},"sha256":{"type":"string"}},"required":["object","document","version","title","status","text","sha256"]},"TermsAcceptance":{"type":"object","properties":{"document":{"type":"string","enum":["sponsored_merchant_agreement","privacy_notice","biometric_consent","ownership_declaration","directorship_declaration","representative_declaration","pep_declaration"]},"version":{"type":"string","description":"The version you were shown. Refused unless it is the one in force."}},"required":["document","version"]},"PersonDeclarationLink":{"type":"object","properties":{"object":{"type":"string","enum":["person_declaration_link"]},"person":{"type":"string"},"sent_to":{"type":"string"},"expires_at":{"type":"string"},"emailed":{"type":"boolean","description":"False when the email could not be sent: send another."}},"required":["object","person","sent_to","expires_at","emailed"]},"PersonDeclarationLinkRequest":{"type":"object","properties":{"email":{"type":"string","maxLength":320,"description":"That person's own email address. The link goes there and is never shown to you."}},"required":["email"]},"PersonSelfDeclaration":{"type":"object","properties":{"accept":{"type":"array","items":{"type":"object","properties":{"document":{"type":"string","enum":["sponsored_merchant_agreement","privacy_notice","biometric_consent","ownership_declaration","directorship_declaration","representative_declaration","pep_declaration"]},"version":{"type":"string","maxLength":60}},"required":["document","version"]},"minItems":1,"maxItems":7,"description":"The declarations you are making, each with the version you read."}},"required":["accept"]},"CreateAccount":{"type":"object","properties":{"business_profile":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":80,"example":"Scuba Sensation"},"support_email":{"type":"string","maxLength":254,"format":"email"}},"required":["name"],"additionalProperties":false},"default_currency":{"type":"string","enum":["usd","bzd"],"default":"usd"},"controller":{"type":"object","properties":{"fees":{"type":"object","properties":{"payer":{"type":"string","enum":["account","application"]}},"required":["payer"],"additionalProperties":false},"losses":{"type":"object","properties":{"payments":{"type":"string","enum":["secure_processing","application"]}},"required":["payments"],"additionalProperties":false},"dashboard":{"type":"object","properties":{"type":{"type":"string","enum":["full","express","none"]}},"required":["type"],"additionalProperties":false}},"additionalProperties":false,"description":"Who answers for the account, written once. Anything you leave out comes from your platform's defaults: the account pays our fee, your platform covers its losses, and it gets the full dashboard. Only those values can be chosen here: `losses.payments: secure_processing`, `fees.payer: application` and a dashboard other than `full` are agreed with us."},"settings":{"type":"object","properties":{"payouts":{"type":"object","properties":{"schedule":{"type":"object","properties":{"interval":{"type":"string","enum":["manual","daily","weekly","monthly"]},"weekly_anchor":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"monthly_anchor":{"type":"integer","minimum":1,"maximum":31},"delay_days":{"type":"integer","minimum":0,"maximum":30}},"additionalProperties":false,"description":"When this account is paid, on the books of your key's mode: a live key sets the live schedule and a test key the test one. Where it is paid is never settable: the bank account is verified and set by us."}},"required":["schedule"],"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Key-value pairs of your own, stored on the object and returned exactly as you sent them. At most 50 keys; keys up to 40 characters, without square brackets; values are strings of up to 500 characters. Never shown to the customer.","example":{"shop_id":"scuba-sensation","booking_id":"SCU-B0161"},"maxProperties":50}},"required":["business_profile"],"additionalProperties":false},"UpdateAccount":{"type":"object","properties":{"business_profile":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":80},"support_email":{"type":["string","null"],"maxLength":254,"format":"email"}},"additionalProperties":false},"settings":{"type":"object","properties":{"payouts":{"type":"object","properties":{"schedule":{"type":"object","properties":{"interval":{"type":"string","enum":["manual","daily","weekly","monthly"]},"weekly_anchor":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"monthly_anchor":{"type":"integer","minimum":1,"maximum":31},"delay_days":{"type":"integer","minimum":0,"maximum":30}},"additionalProperties":false,"description":"When this account is paid, on the books of your key's mode: a live key sets the live schedule and a test key the test one. Where it is paid is never settable: the bank account is verified and set by us."}},"required":["schedule"],"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Key-value pairs of your own, stored on the object and returned exactly as you sent them. At most 50 keys; keys up to 40 characters, without square brackets; values are strings of up to 500 characters. Never shown to the customer.","example":{"shop_id":"scuba-sensation","booking_id":"SCU-B0161"},"maxProperties":50}},"additionalProperties":false},"RejectAccount":{"type":"object","properties":{"reason":{"type":"string","enum":["fraud","terms_of_service","other"]}},"required":["reason"],"additionalProperties":false},"DeletedAccount":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["account"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]},"ApplicationFee":{"type":"object","properties":{"id":{"type":"string","example":"fee_1aB2cD3eF4gH5iJ6kL7mN8oP"},"object":{"type":"string","enum":["application_fee"]},"account":{"type":"string","description":"The connected account the payment was on."},"amount":{"type":"integer","description":"In minor units of `currency`, the payment's own."},"amount_refunded":{"type":"integer"},"currency":{"type":"string"},"settlement_amount":{"type":"integer","description":"What actually moved, in minor units of `settlement_currency`. Capped at what the payment left after our fee."},"settlement_amount_refunded":{"type":"integer"},"settlement_currency":{"type":"string"},"charge":{"type":"string","description":"The payment intent it was taken from."},"refunded":{"type":"boolean"},"livemode":{"type":"boolean"},"created":{"type":"integer"}},"required":["id","object","account","amount","amount_refunded","currency","settlement_amount","settlement_amount_refunded","settlement_currency","charge","refunded","livemode","created"]},"CreateApplicationFeeRefund":{"type":"object","properties":{"amount":{"type":"integer","exclusiveMinimum":0,"description":"In minor units of the fee's currency. Omit to refund all that is left."}},"additionalProperties":false},"ApplicationFeeRefund":{"type":"object","properties":{"id":{"type":"string","example":"fr_1aB2cD3eF4gH5iJ6kL7mN8oP"},"object":{"type":"string","enum":["fee_refund"]},"fee":{"type":"string"},"amount":{"type":"integer"},"settlement_amount":{"type":"integer"},"refund":{"type":["string","null"],"description":"The payment refund that returned it, or null if you refunded it yourself."},"created":{"type":"integer"}},"required":["id","object","fee","amount","settlement_amount","refund","created"]},"File":{"type":"object","properties":{"id":{"type":"string","example":"file_7hQ2xR9mT4vW8yZ1aB3cD5eF"},"object":{"type":"string","enum":["file"]},"purpose":{"type":"string","enum":["identity_document","business_document","bank_statement","dispute_evidence","other"]},"filename":{"type":"string"},"content_type":{"type":"string","enum":["application/pdf","image/png","image/jpeg"]},"size":{"type":"integer","description":"In bytes."},"created_at":{"type":"string"},"purged":{"type":"boolean","description":"Whether the document's retention period has ended. The documents of an application that was never submitted are retired after 90 days without activity; a rejected application's after 5 years; an approved business's are kept while it is active and for 7 years after the account is closed. Nothing is retired while an open dispute or a legal hold names it. A purged file keeps its row and loses its contents, so `url` is null."},"url":{"type":["string","null"],"description":"A link that works for five minutes. Only present on a retrieve — a list does not mint one per row, because most of them would expire unclicked."}},"required":["id","object","purpose","filename","content_type","size","created_at","purged","url"]},"DisputeEvidence":{"type":"object","properties":{"access_activity_log":{"type":["string","null"],"maxLength":20000},"billing_address":{"type":["string","null"],"maxLength":20000},"cancellation_policy":{"type":["string","null"],"pattern":"^file_[0-9A-Za-z]{24}$"},"cancellation_policy_disclosure":{"type":["string","null"],"maxLength":20000},"cancellation_rebuttal":{"type":["string","null"],"maxLength":20000},"customer_communication":{"type":["string","null"],"pattern":"^file_[0-9A-Za-z]{24}$"},"customer_email_address":{"type":["string","null"],"maxLength":20000},"customer_name":{"type":["string","null"],"maxLength":20000},"customer_purchase_ip":{"type":["string","null"],"maxLength":20000},"customer_signature":{"type":["string","null"],"pattern":"^file_[0-9A-Za-z]{24}$"},"duplicate_charge_documentation":{"type":["string","null"],"pattern":"^file_[0-9A-Za-z]{24}$"},"duplicate_charge_explanation":{"type":["string","null"],"maxLength":20000},"duplicate_charge_id":{"type":["string","null"],"maxLength":20000},"product_description":{"type":["string","null"],"maxLength":20000},"receipt":{"type":["string","null"],"pattern":"^file_[0-9A-Za-z]{24}$"},"refund_policy":{"type":["string","null"],"pattern":"^file_[0-9A-Za-z]{24}$"},"refund_policy_disclosure":{"type":["string","null"],"maxLength":20000},"refund_refusal_explanation":{"type":["string","null"],"maxLength":20000},"service_date":{"type":["string","null"],"maxLength":20000},"service_documentation":{"type":["string","null"],"pattern":"^file_[0-9A-Za-z]{24}$"},"shipping_address":{"type":["string","null"],"maxLength":20000},"shipping_carrier":{"type":["string","null"],"maxLength":20000},"shipping_date":{"type":["string","null"],"maxLength":20000},"shipping_documentation":{"type":["string","null"],"pattern":"^file_[0-9A-Za-z]{24}$"},"shipping_tracking_number":{"type":["string","null"],"maxLength":20000},"uncategorized_file":{"type":["string","null"],"pattern":"^file_[0-9A-Za-z]{24}$"},"uncategorized_text":{"type":["string","null"],"maxLength":20000}},"additionalProperties":false},"Dispute":{"type":"object","properties":{"id":{"type":"string","example":"dp_4fH7jK9mN2pQ5rT8vX1zA3bC"},"object":{"type":"string","enum":["dispute"]},"amount":{"type":"integer","description":"In the payment's own currency, minor units."},"currency":{"type":"string"},"settlement_amount":{"type":"integer","description":"What the ledger moves, in BZD minor units, at the rate the payment was taken at."},"settlement_currency":{"type":"string"},"payment_intent":{"type":"string"},"reason":{"type":"string","enum":["bank_cannot_process","check_returned","credit_not_processed","customer_initiated","debit_not_authorized","duplicate","fraudulent","general","incorrect_account_details","insufficient_funds","product_not_received","product_unacceptable","subscription_canceled","unrecognized"]},"status":{"type":"string","enum":["warning_needs_response","warning_under_review","warning_closed","needs_response","under_review","won","lost"],"description":"A `warning_` status is an inquiry (a retrieval request): no money has been taken and none is held. Everything else is a chargeback, and the disputed amount is out of your balance until it closes."},"evidence":{"$ref":"#/components/schemas/DisputeEvidence"},"evidence_details":{"type":"object","properties":{"due_by":{"type":"integer","description":"Unix seconds. The bank gives no second chance."},"has_evidence":{"type":"boolean"},"submission_count":{"type":"integer"},"past_due":{"type":"boolean"},"submission_open":{"type":"boolean"}},"required":["due_by","has_evidence","submission_count","past_due","submission_open"]},"balance_transactions":{"type":"array","items":{"type":"string"},"description":"The hold, the release or loss, and the handling fee, as they hit your balance."},"is_charge_refundable":{"type":"boolean"},"network_reason_code":{"type":["string","null"]},"bank_case_reference":{"type":"string","description":"The bank's own reference for the case. Quote it when you write to us about it."},"bank_opened_at":{"type":["string","null"]},"dispute_fee":{"type":"integer","description":"What we charged for handling a loss, in BZD minor units."},"outcome_note":{"type":["string","null"]},"merchant_accepted":{"type":"boolean"},"closed_at":{"type":["integer","null"]},"livemode":{"type":"boolean"},"created":{"type":"integer"}},"required":["id","object","amount","currency","settlement_amount","settlement_currency","payment_intent","reason","status","evidence","evidence_details","balance_transactions","is_charge_refundable","network_reason_code","bank_case_reference","bank_opened_at","dispute_fee","outcome_note","merchant_accepted","closed_at","livemode","created"]},"DisputeUpdateParams":{"type":"object","properties":{"evidence":{"allOf":[{"$ref":"#/components/schemas/DisputeEvidence"},{"description":"Fields to set. This MERGES with what is already there, so a form that posts one section does not erase the others. Pass `null` to clear a field."}]},"submit":{"type":"boolean","description":"Send what is on file to us for forwarding to the bank. After this the evidence is frozen."}}}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes a POST safe to retry. The first request with a key that starts executing is performed and its response — a 4xx included — is stored for 24 hours; a retry with the same key and the byte-identical body, to the same path, gets that response back with `Idempotent-Replayed: true`. A request refused before it starts — a body that fails validation, a missing permission — stores nothing and leaves the key free, so correct it and send it again under the same key. The same key with a different body or path is refused with `idempotency_key_in_use`, and a retry while the first is still running gets `409 idempotency_in_progress` — or `500 outcome_unknown` once the first has reached the bank and is still running after a minute; retry later with the same key. A 5xx is not stored and frees the key, except `outcome_unknown`, which means the bank may have acted and is stored and replayed. Longer than 255 characters is a 400 naming this header. Keys belong to the account and mode, not to one endpoint.","schema":{"type":"string","maxLength":255,"example":"order-1042"}},"ConnectAccount":{"name":"Secure-Processing-Account","in":"header","required":false,"description":"Make this request as one of your connected accounts (`acct_…`), with your own secret key. The object is created on, or read from, that account's books. With a test key, any active business may act on a test shop it created, and a platform on its real accounts' test books; a live key needs a platform we have enabled. The account must be one you created or adopted; anything else, such as another business's account or one that does not exist, is `403 account_invalid`, and the request is never quietly made on your own account instead. Naming your own account is the same as sending no header. In live mode both your account and the connected account must be enabled for live payments.","schema":{"type":"string","pattern":"^acct_[0-9A-Za-z]{24}$","example":"acct_1a2B3c4D5e6F7g8H9i0J1k2L"}},"RequestId":{"name":"X-Request-Id","in":"header","required":false,"description":"Optional. Your own id for this request, 1–64 letters, digits, `_` or `-`. If it is well-formed it is used as the request id and echoed back; otherwise one is generated.","schema":{"type":"string","pattern":"^[\\w-]{1,64}$"}}},"headers":{"RequestId":{"description":"This request's id, on every response — success or error. Quote it to support. An error body carries the same value as `error.request_id` — except on an idempotent replay (`Idempotent-Replayed: true`), where the body is the original response, so its `error.request_id` is the original request's and this header is the replay's.","schema":{"type":"string","example":"req_8fK2mN4pQ6rSaB3c"}},"RetryAfter":{"description":"Seconds to wait before retrying. Sent only with `503 service_unavailable`; not sent with other 503s.","schema":{"type":"integer","example":5}},"IdempotentReplayed":{"description":"`true` when this response is a replay of an earlier request with the same `Idempotency-Key`, rather than the result of doing the work again. Absent otherwise.","schema":{"type":"string","enum":["true"]}}}},"paths":{"/v1/health":{"get":{"tags":["Meta"],"summary":"Health check","description":"Unauthenticated. `?deep=1` also checks the database.","security":[],"parameters":[{"schema":{"type":"string"},"required":false,"name":"deep","in":"query"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"Service status","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"service":{"type":"string"},"db":{"type":"string","enum":["ok","unchecked","error"]}},"required":["ok","service","db"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/payment_intents":{"post":{"tags":["Payments"],"summary":"Create a payment intent","description":"A payment intent tracks one payment from start to finish. Create it, then either create a checkout session to send the customer to, or confirm it against a saved card.\n\nWith `confirm: true`, a charge whose outcome the bank has not yet told us comes back as a 200 with `status: processing`. The card may have been charged: do not retry it as a new payment. It settles on its own within minutes, to `succeeded` or `requires_payment_method`, and the matching webhook follows. A `503 gateway_unavailable` is only returned when nothing was sent to the bank, and is safe to retry.","x-required-capabilities":["payments:write"],"x-connect":"allowed","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentIntent"}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIntent"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"402":{"description":"Only with `confirm: true`. The card was refused (`card_error`, `card_declined`, with a `decline_code`), or a risk rule refused the payment before the bank was asked (`card_error`, `payment_blocked`). The intent exists, at `requires_payment_method`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"`outcome_unknown`: the request reached the bank and we could not confirm the result. Retrying with the same key is always safe and never reaches the bank again: if this answer was stored it is replayed, and if an earlier request under the key is still running, a later retry gets that request's stored result once it finishes. Do not repeat it under a new key: the payment or refund settles on its own and its webhook follows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"503":{"description":"`gateway_unavailable`: nothing was sent to the bank — it could not be reached, or the request was refused before it left. Nothing moved, and it is safe to retry. Or our database could not be reached before any work was done (`service_unavailable`, with `Retry-After`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}]},"get":{"tags":["Payments"],"summary":"List payment intents","description":"Newest first. Filter by status, by when they were created, by the payment link or invoice that took them, or by your own metadata — `metadata[shop_id]=scuba-sensation` returns only that shop's payments.","x-required-capabilities":["payments:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many objects to return. Between 1 and 100.","example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"A cursor for the next page: the id of the LAST object on the page you have. Returns the objects created before it, newest first."},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string","description":"A cursor for the previous page: the id of the FIRST object on the page you have. Returns the objects created immediately after it — the page before yours — still newest first. `has_more` then says whether there are newer objects still. Pass one cursor or the other."},"required":false,"name":"ending_before","in":"query"},{"schema":{"type":"string","enum":["requires_payment_method","processing","requires_action","requires_capture","succeeded","canceled"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer","in":"query"},{"schema":{"type":"string","description":"Every payment taken through one payment link.","example":"plink_7nQ9rS1tU3vW5xY7zA9bC1dE"},"required":false,"name":"payment_link","in":"query"},{"schema":{"type":"string","description":"Every payment taken against one invoice. An invoice that allows partial payment has more than one.","example":"in_1aB3cD5eF7gH9jK1lM3nP5qR"},"required":false,"name":"invoice","in":"query"},{"schema":{"type":"string","enum":["api","checkout","dashboard","payment_link","invoice"],"description":"How the payment came to exist."},"required":false,"name":"created_via","in":"query"},{"schema":{"type":"string","enum":["allow","block","review"],"description":"What our risk rules decided. Payments taken before the check existed have no outcome at all and are returned by none of these values."},"required":false,"name":"risk_outcome","in":"query"},{"schema":{"type":["integer","null"],"description":"Only payments created at or after this Unix timestamp, in seconds."},"required":false,"name":"created_gte","in":"query"},{"schema":{"type":["integer","null"],"description":"Only payments created at or before this Unix timestamp, in seconds."},"required":false,"name":"created_lte","in":"query"},{"schema":{"type":"object","additionalProperties":{"type":"string"},"description":"Only payments whose metadata has every one of these pairs, compared exactly: `metadata[shop_id]=scuba-sensation`. Repeat it to require more than one key.","example":{"shop_id":"scuba-sensation"}},"required":false,"style":"deepObject","explode":true,"name":"metadata","in":"query"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"A list of payment intents","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PaymentIntent"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/payment_intents/search":{"post":{"tags":["Payments"],"summary":"Search payment intents","description":"Finds this account's payments in the current mode, newest first, at most 50. A POST so that what you search for is never in a URL. It reads and changes nothing, so it takes no `Idempotency-Key`.","x-required-capabilities":["payments:read"],"x-connect":"allowed","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchPaymentIntents"}}}},"responses":{"200":{"description":"The payments that match","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PaymentIntent"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}]}},"/v1/payment_intents/{id}":{"get":{"tags":["Payments"],"summary":"Retrieve a payment intent","description":"`expand[]=review` returns the review in place of its id, and `expand[]=refunds` adds the payment's refunds, so a payment's page needs one request rather than three.","x-required-capabilities":["payments:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"anyOf":[{"type":"string","enum":["review","refunds"]},{"type":"array","items":{"type":"string","enum":["review","refunds"]},"maxItems":2}],"description":"Related objects to return in place: `review`, `refunds`."},"required":false,"name":"expand[]","in":"query"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"The payment intent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpandedPaymentIntent"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/payment_intents/{id}/capture":{"post":{"tags":["Payments"],"summary":"Capture a held payment","description":"Settles a payment created with `capture_method: manual`. Capture less than was authorised and the rest of the hold is released.","x-required-capabilities":["payments:capture"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount_to_capture":{"type":"integer","exclusiveMinimum":0,"description":"In minor units. Omit to capture the full authorised amount."},"application_fee_amount":{"type":"integer","minimum":0,"description":"Replaces the fee set on the payment, and 0 removes it. Only as a connected account. Otherwise the original stands, capped at what is captured: it is not prorated."}}}}}},"responses":{"200":{"description":"Captured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIntent"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"402":{"description":"The bank refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"`outcome_unknown`: the request reached the bank and we could not confirm the result. Retrying with the same key is always safe and never reaches the bank again: if this answer was stored it is replayed, and if an earlier request under the key is still running, a later retry gets that request's stored result once it finishes. Do not repeat it under a new key: the payment or refund settles on its own and its webhook follows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"503":{"description":"`gateway_unavailable`: nothing was sent to the bank — it could not be reached, or the request was refused before it left. Nothing moved, and it is safe to retry. Or our database could not be reached before any work was done (`service_unavailable`, with `Retry-After`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}}}}},"/v1/payment_intents/{id}/cancel":{"post":{"tags":["Payments"],"summary":"Cancel a payment","description":"Releases a hold that has not been captured, or abandons a payment nobody has completed. A payment that has already succeeded is refunded rather than cancelled.\n\nBefore cancelling, the bank is asked about the payment's latest attempt. If the customer has already paid, the payment is settled and this answers `400` saying so — refund it instead. If the customer is completing 3-D Secure, or the bank's payment page was opened less than 30 minutes ago and may still be paid, this answers `409 payment_in_progress` and cancels nothing: the bank has no way to close a page it has handed out, so a cancel now could be followed by a payment. Retry after the time in the message, or let the payment expire on its own.","x-required-capabilities":["payments:write","payments:capture"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"cancellation_reason":{"type":"string","enum":["requested_by_customer","abandoned","duplicate","fraudulent"]}}}}}},"responses":{"200":{"description":"Cancelled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIntent"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"description":"The customer may be paying this right now (`payment_in_progress`). Nothing was cancelled. Or a request with this `Idempotency-Key` is still running (`idempotency_in_progress`): retry it, with the same key, in a few seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"`outcome_unknown`: the request reached the bank and we could not confirm the result. Retrying with the same key is always safe and never reaches the bank again: if this answer was stored it is replayed, and if an earlier request under the key is still running, a later retry gets that request's stored result once it finishes. Do not repeat it under a new key: the payment or refund settles on its own and its webhook follows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"503":{"description":"The bank could not be asked about the payment's latest attempt (`gateway_unavailable`). Nothing was cancelled; retry. Or our database could not be reached before any work was done (`service_unavailable`, with `Retry-After`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}}}}},"/v1/checkout_sessions":{"post":{"tags":["Checkout"],"summary":"Create a checkout session","description":"Returns a `url` to send your customer to. The card is entered on the bank's own hosted page, so card details never touch your servers or ours.","x-required-capabilities":["payments:write"],"x-connect":"allowed","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutSession"}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSession"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}]},"get":{"tags":["Checkout"],"summary":"List checkout sessions","x-required-capabilities":["payments:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many objects to return. Between 1 and 100.","example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"A cursor for the next page: the id of the LAST object on the page you have. Returns the objects created before it, newest first."},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string","description":"A cursor for the previous page: the id of the FIRST object on the page you have. Returns the objects created immediately after it — the page before yours — still newest first. `has_more` then says whether there are newer objects still. Pass one cursor or the other."},"required":false,"name":"ending_before","in":"query"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"A list of checkout sessions","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/CheckoutSession"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/checkout_sessions/{id}":{"get":{"tags":["Checkout"],"summary":"Retrieve a checkout session","x-required-capabilities":["payments:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"The session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSession"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/checkout_sessions/{id}/expire":{"post":{"tags":["Checkout"],"summary":"Expire a checkout session","description":"Closes a session so the link stops working and the payment can be started again.","x-required-capabilities":["payments:write"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"Expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSession"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/refunds":{"post":{"tags":["Refunds"],"summary":"Refund a payment","description":"Refunds all or part of a captured payment. A full refund of a payment that has not settled yet is sent as a reversal, which is faster and often never appears on the cardholder's statement at all. You do not need to choose: we pick whichever the bank will accept.\n\nA refund can come back with `status: pending`. That means it was sent to the bank and the bank's answer has not reached us yet; the money may already be on its way back. Do not refund again — the pending amount is held against what is refundable, and the refund settles on its own within minutes to `succeeded` or `failed`, with `refund.succeeded` or `refund.failed` to say which. A 402 means the bank refused it and nothing was returned.","x-required-capabilities":["payments:refund"],"x-connect":"allowed","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRefund"}}}},"responses":{"200":{"description":"The refund","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refund"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Branch on `error.code`. `refund_not_yet_possible` is not a mistake in the request: it is a partial refund on a payment the bank has not settled yet, and nothing was refunded. Retry once it has settled, with a NEW `Idempotency-Key` — this answer came from the bank, so it is stored against the key and replayed to a retry that uses it, and a new key cannot refund twice because nothing was refunded. A new key is safe for this code only. If nothing has been refunded yet, a full refund can be made now. Otherwise: an invalid request (`invalid_request_error`, `parameter_invalid`), or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"402":{"description":"The bank refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"`outcome_unknown`: the request reached the bank and we could not confirm the result. Retrying with the same key is always safe and never reaches the bank again: if this answer was stored it is replayed, and if an earlier request under the key is still running, a later retry gets that request's stored result once it finishes. Do not repeat it under a new key: the payment or refund settles on its own and its webhook follows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"503":{"description":"`gateway_unavailable`: nothing was sent to the bank — it could not be reached, or the request was refused before it left. Nothing moved, and it is safe to retry. Or our database could not be reached before any work was done (`service_unavailable`, with `Retry-After`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}]},"get":{"tags":["Refunds"],"summary":"List refunds","description":"Includes refunds made directly at the bank rather than through us, which we discover and record for you.","x-required-capabilities":["payments:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many objects to return. Between 1 and 100.","example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"A cursor for the next page: the id of the LAST object on the page you have. Returns the objects created before it, newest first."},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string","description":"A cursor for the previous page: the id of the FIRST object on the page you have. Returns the objects created immediately after it — the page before yours — still newest first. `has_more` then says whether there are newer objects still. Pass one cursor or the other."},"required":false,"name":"ending_before","in":"query"},{"schema":{"type":"string"},"required":false,"name":"payment_intent","in":"query"},{"schema":{"type":"string","enum":["pending","succeeded","failed","canceled"],"description":"Only refunds in this state."},"required":false,"name":"status","in":"query"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"A list of refunds","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Refund"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/refunds/{id}":{"get":{"tags":["Refunds"],"summary":"Retrieve a refund","x-required-capabilities":["payments:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"The refund","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refund"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/customers":{"post":{"tags":["Customers"],"summary":"Create a customer","description":"A customer is what a saved card belongs to. Create one before saving a card.","x-required-capabilities":["customers:write"],"x-connect":"allowed","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomer"}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}]},"get":{"tags":["Customers"],"summary":"List customers","x-required-capabilities":["customers:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many objects to return. Between 1 and 100.","example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"A cursor for the next page: the id of the LAST object on the page you have. Returns the objects created before it, newest first."},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string","description":"A cursor for the previous page: the id of the FIRST object on the page you have. Returns the objects created immediately after it — the page before yours — still newest first. `has_more` then says whether there are newer objects still. Pass one cursor or the other."},"required":false,"name":"ending_before","in":"query"},{"schema":{"type":"string"},"required":false,"name":"email","in":"query"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"A list of customers","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/customers/{id}":{"get":{"tags":["Customers"],"summary":"Retrieve a customer","x-required-capabilities":["customers:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"The customer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/customers/{id}/payment_methods":{"get":{"tags":["Customers"],"summary":"List a customer's saved cards","x-required-capabilities":["customers:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"The customer's saved cards","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/payment_methods/{id}/detach":{"post":{"tags":["Customers"],"summary":"Forget a saved card","description":"The card can no longer be charged. Payments already made with it are untouched — detaching is about what happens next, not about erasing what happened.","x-required-capabilities":["customers:write"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"Detached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethod"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/products":{"post":{"tags":["Products"],"summary":"Create a product","description":"A product is something you sell. It carries no amount of its own — create a price against it for that.","x-required-capabilities":["products:write"],"x-connect":"allowed","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProduct"}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}]},"get":{"tags":["Products"],"summary":"List products","x-required-capabilities":["payments:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many objects to return. Between 1 and 100.","example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"A cursor for the next page: the id of the LAST object on the page you have. Returns the objects created before it, newest first."},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string","description":"A cursor for the previous page: the id of the FIRST object on the page you have. Returns the objects created immediately after it — the page before yours — still newest first. `has_more` then says whether there are newer objects still. Pass one cursor or the other."},"required":false,"name":"ending_before","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Only active products, or only archived ones."},"required":false,"name":"active","in":"query"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"A list of products","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/products/{id}":{"get":{"tags":["Products"],"summary":"Retrieve a product","description":"Prices are not embedded. List them with `GET /v1/prices?product=…`.","x-required-capabilities":["payments:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"The product","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"post":{"tags":["Products"],"summary":"Update a product","description":"Everything about a product is editable, including archiving it with `active: false`. Archiving a product leaves its prices alone — anything already quoting one keeps working.","x-required-capabilities":["products:write"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProduct"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/prices":{"post":{"tags":["Products"],"summary":"Create a price","description":"Give either `unit_amount` — an integer in minor units, so 6000 is $60.00 — or a `custom_unit_amount` range for the payer to choose within. A price cannot be edited afterwards: to change what something costs, create a new price and archive the old one.","x-required-capabilities":["products:write"],"x-connect":"allowed","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePrice"}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Price"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}]},"get":{"tags":["Products"],"summary":"List prices","description":"Filter by `product` to get one product's prices. That is how a product's prices are read.","x-required-capabilities":["payments:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many objects to return. Between 1 and 100.","example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"A cursor for the next page: the id of the LAST object on the page you have. Returns the objects created before it, newest first."},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string","description":"A cursor for the previous page: the id of the FIRST object on the page you have. Returns the objects created immediately after it — the page before yours — still newest first. `has_more` then says whether there are newer objects still. Pass one cursor or the other."},"required":false,"name":"ending_before","in":"query"},{"schema":{"type":"string","description":"Only prices for this product."},"required":false,"name":"product","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"active","in":"query"},{"schema":{"type":"string","enum":["bzd","usd"],"description":"Three-letter ISO currency code, lowercase.","example":"usd"},"required":false,"name":"currency","in":"query"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"A list of prices","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Price"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/prices/{id}":{"get":{"tags":["Products"],"summary":"Retrieve a price","x-required-capabilities":["payments:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"The price","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Price"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"post":{"tags":["Products"],"summary":"Update a price","description":"Only `active`, `nickname` and `metadata`. The amount, the currency and the product are fixed for the life of the price, because something already references them. Any other field is refused with an explanation rather than ignored.","x-required-capabilities":["products:write"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePrice"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Price"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/payment_links":{"post":{"tags":["Payment links"],"summary":"Create a payment link","description":"Returns a `url` to share. Anyone who opens it gets their own payment; two people paying the same link produce two payments, not one. The amount comes from the price and cannot be changed afterwards — create a new link instead.","x-required-capabilities":["payment_links:write"],"x-connect":"allowed","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentLink"}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLink"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}]},"get":{"tags":["Payment links"],"summary":"List payment links","description":"Newest first. To see what one link has taken, list payments with `/v1/payment_intents?payment_link=plink_...`.","x-required-capabilities":["payments:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many objects to return. Between 1 and 100.","example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"A cursor for the next page: the id of the LAST object on the page you have. Returns the objects created before it, newest first."},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string","description":"A cursor for the previous page: the id of the FIRST object on the page you have. Returns the objects created immediately after it — the page before yours — still newest first. `has_more` then says whether there are newer objects still. Pass one cursor or the other."},"required":false,"name":"ending_before","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"active","in":"query"},{"schema":{"type":"string","description":"Only links built on this price."},"required":false,"name":"price","in":"query"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"A list of payment links","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PaymentLink"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/payment_links/{id}":{"get":{"tags":["Payment links"],"summary":"Retrieve a payment link","x-required-capabilities":["payments:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"The payment link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLink"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"post":{"tags":["Payment links"],"summary":"Update a payment link","description":"Everything except the price and the quantity. Those are fixed for the life of the link: the URL is already on a poster and in messages we cannot reach, and the people who will pay it have been told what it costs. Create a new link and deactivate this one.","x-required-capabilities":["payment_links:write"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePaymentLink"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLink"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/tax_rates":{"post":{"tags":["Invoicing"],"summary":"Create a tax rate","description":"A rate you can put on invoice lines. The percentage and whether it is inclusive cannot be changed afterwards — create a new rate and archive the old one.","x-required-capabilities":["invoices:write"],"x-connect":"allowed","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTaxRate"}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRate"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}]},"get":{"tags":["Invoicing"],"summary":"List tax rates","x-required-capabilities":["payments:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many objects to return. Between 1 and 100.","example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"A cursor for the next page: the id of the LAST object on the page you have. Returns the objects created before it, newest first."},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string","description":"A cursor for the previous page: the id of the FIRST object on the page you have. Returns the objects created immediately after it — the page before yours — still newest first. `has_more` then says whether there are newer objects still. Pass one cursor or the other."},"required":false,"name":"ending_before","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"active","in":"query"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"A list of tax rates","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/TaxRate"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/tax_rates/{id}":{"get":{"tags":["Invoicing"],"summary":"Retrieve a tax rate","x-required-capabilities":["payments:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"The tax rate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRate"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"post":{"tags":["Invoicing"],"summary":"Update a tax rate","description":"The name, whether it is active, and metadata. Not the percentage and not whether it is inclusive: invoices already finalized name this rate as the one that produced the tax printed on them.","x-required-capabilities":["invoices:write"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTaxRate"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRate"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/invoices":{"post":{"tags":["Invoicing"],"summary":"Create a draft invoice","description":"Creates a DRAFT. Add lines with `/v1/invoice_items`, then `POST /v1/invoices/{id}/finalize` to give it a number and freeze its totals, then `/send` to email it. Nothing is owed and nothing is visible to the customer until it is finalized.","x-required-capabilities":["invoices:write"],"x-connect":"allowed","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvoice"}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}]},"get":{"tags":["Invoicing"],"summary":"List invoices","description":"Newest first. Every invoice carries its lines.","x-required-capabilities":["payments:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many objects to return. Between 1 and 100.","example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"A cursor for the next page: the id of the LAST object on the page you have. Returns the objects created before it, newest first."},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string","description":"A cursor for the previous page: the id of the FIRST object on the page you have. Returns the objects created immediately after it — the page before yours — still newest first. `has_more` then says whether there are newer objects still. Pass one cursor or the other."},"required":false,"name":"ending_before","in":"query"},{"schema":{"type":"string","enum":["draft","open","paid","void","uncollectible"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer","in":"query"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"A list of invoices","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/invoices/{id}":{"get":{"tags":["Invoicing"],"summary":"Retrieve an invoice","description":"A draft's `subtotal`, `tax` and `total` are computed from its lines on every read. A finalized invoice's are what the document says, and cannot change.","x-required-capabilities":["payments:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"The invoice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"post":{"tags":["Invoicing"],"summary":"Update an invoice","description":"On a DRAFT: the due date, the wording and the metadata. On an OPEN invoice: only `memo`, `footer` and `metadata` — words on a page that was already sent. Nothing that changes money, ever: a draft's amounts come from its lines and a finalized invoice's are frozen.","x-required-capabilities":["invoices:write"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInvoice"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"delete":{"tags":["Invoicing"],"summary":"Void a draft invoice","description":"Drafts are VOIDED, not deleted — the response is the invoice with `status: \"void\"`. A bill that was raised stays on the record, so that whether a customer was ever invoiced is always answerable. Use `/void` on an invoice that has already been finalized.","x-required-capabilities":["invoices:write"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"Voided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/invoices/{id}/finalize":{"post":{"tags":["Invoicing"],"summary":"Finalize an invoice","description":"Gives the invoice the next number in your own consecutive sequence, freezes its totals, and moves it to `open`. After this its lines and its amounts cannot change — void it and raise a new one instead. Finalizing does not email anything; `/send` does that.","x-required-capabilities":["invoices:write"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"Finalized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/invoices/{id}/send":{"post":{"tags":["Invoicing"],"summary":"Email an invoice","description":"Sends the customer a link to the hosted page where they can pay by card. Safe to call again — a customer who lost the first email needs a second one, and nothing about the invoice changes.\n\nA `200` means the email was handed to our email provider: `sent_at` is set and `invoice.sent` fires. If it was not, `sent_at` is unchanged, no event fires, and the invoice is still open and payable at its `hosted_invoice_url`. There are two answers:\n\n- `400 email_recipient_rejected` (`param: customer.email`): our email provider refused the customer's address. Retrying will not help, and the `400` is stored against your Idempotency-Key. Send the customer the `hosted_invoice_url` another way.\n- `503 email_not_sent`: the email could not be sent right now, and may not have reached the customer. Retry. The same Idempotency-Key is fine, because a `503` is never stored against it. Within 24 hours, a retry under the same key reuses our email provider's own idempotency key whenever an earlier attempt's outcome was unknown, so an email that went but whose answer was lost is not sent again.\n\nEither way you can send the customer the `hosted_invoice_url` yourself.\n\n**In test mode** we only email your own team, with `[TEST]` in the subject. If the customer's address is not a member of your team, nothing is sent: the answer is a `200` with `test_email_suppressed: true`, `sent_at` is unchanged and no event fires. `sent_at` may already hold an earlier send's time, so read `test_email_suppressed` to know what this request did. To see the email and `invoice.sent`, put a team member's address on the test customer.","x-required-capabilities":["invoices:write"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"Sent, or in test mode suppressed: see `test_email_suppressed`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceSendResult"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, including `email_recipient_rejected`: the customer's address was refused. Not retryable as is., or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"description":"`email_not_sent`: the email did not go. Nothing about the invoice changed. Safe to retry. Or our database could not be reached before any work was done (`service_unavailable`, with `Retry-After`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}}}}},"/v1/invoices/{id}/void":{"post":{"tags":["Invoicing"],"summary":"Void an invoice","description":"Marks an invoice as issued in error. The row, its number and its lines survive, so the copy in the customer's inbox still matches something. Refused once any money has been received against it — refund the payment first.","x-required-capabilities":["invoices:write"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"Voided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/invoices/{id}/mark_uncollectible":{"post":{"tags":["Invoicing"],"summary":"Mark an invoice uncollectible","description":"The bill was owed and is being written off. Unlike a void this does NOT say the invoice was raised in error: it stays a real debt that was not paid, which is what a write-off is.","x-required-capabilities":["invoices:write"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"Marked uncollectible","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/invoices/{id}/pay":{"post":{"tags":["Invoicing"],"summary":"Charge a saved card for an invoice (beta)","description":"Charges a card the customer has already saved with you, with nobody present.\n\n**Beta, and honestly so.** It works in the bank's sandbox, and the bank has not confirmed it for our live account, where a merchant-initiated charge has not yet been proved. There is no way to charge a card the customer has not already saved: send the invoice and let them pay on the hosted page.\n\nA `202` means the charge was sent and the bank has not yet told us what it did. The card may have been charged, so do not charge it again: the payment settles on its own within minutes and `invoice.payment_succeeded` follows if it went through, with `invoice.paid` alongside it if that payment settled the invoice. A `503` is only returned when nothing was sent to the bank, and is safe to retry.","x-required-capabilities":["payments:write"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayInvoice"}}}},"responses":{"200":{"description":"Charged","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"202":{"description":"Sent to the bank, outcome not yet known. Do not charge again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"402":{"description":"The card was refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"`outcome_unknown`: the request reached the bank and we could not confirm the result. Retrying with the same key is always safe and never reaches the bank again: if this answer was stored it is replayed, and if an earlier request under the key is still running, a later retry gets that request's stored result once it finishes. Do not repeat it under a new key: the payment or refund settles on its own and its webhook follows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"503":{"description":"`gateway_unavailable`: nothing was sent to the bank — it could not be reached, or the request was refused before it left. Nothing moved, and it is safe to retry. Or our database could not be reached before any work was done (`service_unavailable`, with `Retry-After`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}}}}},"/v1/invoices/{id}/refund_overpayment":{"post":{"tags":["Invoicing"],"summary":"Refund an overpayment on an invoice","description":"Refunds the amount by which an invoice has been overpaid, taken from its most recent payment.\n\nAn invoice can be overpaid: two browser tabs can both reach the hosted page and both be paid, and the money moved at the bank before we heard about it. We record it rather than refusing it — `amount_due` goes negative — and this is how you give the difference back. `amount_paid` does not change: the payment happened, and the refund is its own record.","x-required-capabilities":["payments:refund"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"The refund","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refund"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Branch on `error.code`. `refund_not_yet_possible` is not a mistake in the request: it is a partial refund on a payment the bank has not settled yet, and nothing was refunded. Retry once it has settled, with a NEW `Idempotency-Key` — this answer came from the bank, so it is stored against the key and replayed to a retry that uses it, and a new key cannot refund twice because nothing was refunded. A new key is safe for this code only. If nothing has been refunded yet, a full refund can be made now. Otherwise: an invalid request (`invalid_request_error`, `parameter_invalid`), or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"402":{"description":"The bank refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"`outcome_unknown`: the request reached the bank and we could not confirm the result. Retrying with the same key is always safe and never reaches the bank again: if this answer was stored it is replayed, and if an earlier request under the key is still running, a later retry gets that request's stored result once it finishes. Do not repeat it under a new key: the payment or refund settles on its own and its webhook follows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"503":{"description":"`gateway_unavailable`: nothing was sent to the bank — it could not be reached, or the request was refused before it left. Nothing moved, and it is safe to retry. Or our database could not be reached before any work was done (`service_unavailable`, with `Retry-After`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}}}}},"/v1/invoices/{id}/pdf":{"get":{"tags":["Invoicing"],"summary":"Download an invoice as a PDF","description":"The invoice as an A4 PDF, generated on request. A draft renders too, stamped DRAFT and with no number — there is no number to print until it is finalized.","x-required-capabilities":["payments:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"The invoice","content":{"application/pdf":{"schema":{"type":"string"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/invoice_items":{"post":{"tags":["Invoicing"],"summary":"Add a line to a draft invoice","description":"Give `price` to quote your catalogue, or `unit_amount` and `description` to write the line by hand. `unit_amount` is in minor units — 5000 is $50.00. Refused once the invoice has been finalized.","x-required-capabilities":["invoices:write"],"x-connect":"allowed","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvoiceItem"}}}},"responses":{"200":{"description":"Added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceLineItem"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}]},"get":{"tags":["Invoicing"],"summary":"List the lines on an invoice","x-required-capabilities":["payments:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"invoice","in":"query"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"The lines, in the order they print","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceLineItem"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/invoice_items/{id}":{"post":{"tags":["Invoicing"],"summary":"Update a line","description":"Only while the invoice is a draft.","x-required-capabilities":["invoices:write"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInvoiceItem"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceLineItem"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"delete":{"tags":["Invoicing"],"summary":"Remove a line","description":"Only while the invoice is a draft. This is the one thing in invoicing that really deletes: a draft is a document being written, and the alternative to removing a line would be abandoning the invoice over a typo.","x-required-capabilities":["invoices:write"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/events":{"get":{"tags":["Events"],"summary":"List events","description":"Everything that has happened on your account, newest first. If a webhook delivery failed and you need to catch up, read from here rather than waiting for a retry.","x-required-capabilities":["events:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many objects to return. Between 1 and 100.","example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"A cursor for the next page: the id of the LAST object on the page you have. Returns the objects created before it, newest first."},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string","description":"A cursor for the previous page: the id of the FIRST object on the page you have. Returns the objects created immediately after it — the page before yours — still newest first. `has_more` then says whether there are newer objects still. Pass one cursor or the other."},"required":false,"name":"ending_before","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type","in":"query"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"A list of events","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/events/{id}":{"get":{"tags":["Events"],"summary":"Retrieve an event","x-required-capabilities":["events:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"The event","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/webhook_endpoints":{"post":{"tags":["Webhooks"],"summary":"Create a webhook endpoint","description":"The signing secret is returned ONCE, here, as `secret`. Store it: we keep only an encrypted copy and cannot show it to you again. If it is lost, rotate it.\n\nAn endpoint belongs to the mode of the key that created it: a test key's endpoint receives test events only. You can also add one in the dashboard, under Developers → Webhooks, which subscribes it to every event.","x-required-capabilities":["webhooks:manage"],"x-connect":"refused","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookEndpoint"}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}]},"get":{"tags":["Webhooks"],"summary":"List webhook endpoints","x-required-capabilities":["webhooks:manage"],"x-connect":"refused","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many objects to return. Between 1 and 100.","example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"A cursor for the next page: the id of the LAST object on the page you have. Returns the objects created before it, newest first."},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string","description":"A cursor for the previous page: the id of the FIRST object on the page you have. Returns the objects created immediately after it — the page before yours — still newest first. `has_more` then says whether there are newer objects still. Pass one cursor or the other."},"required":false,"name":"ending_before","in":"query"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"A list of endpoints","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/webhook_endpoints/{id}/rotate_secret":{"post":{"tags":["Webhooks"],"summary":"Rotate a webhook signing secret","description":"Issues a new secret and keeps the old one valid for a while, so you can deploy the change without dropping events. Both secrets sign every delivery during the overlap.","x-required-capabilities":["webhooks:manage"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expires_in_hours":{"type":"integer","minimum":0,"maximum":24,"default":12,"description":"How long the previous secret keeps working. 0 retires it immediately."}}}}}},"responses":{"200":{"description":"Rotated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/webhook_endpoints/{id}":{"get":{"tags":["Webhooks"],"summary":"Retrieve a webhook endpoint","x-required-capabilities":["webhooks:manage"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"The endpoint","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"post":{"tags":["Webhooks"],"summary":"Update a webhook endpoint","description":"Change the URL, the description or which events are sent, or switch the endpoint off and on with `disabled`. The signing secret is unchanged.\n\nWhat happens to deliveries across an off period: events that happened while the endpoint was disabled were never queued for it, so read them from `/v1/events`. A retry that came due while it was off was abandoned and shows in its delivery log, where `POST /v1/webhook_deliveries/{id}/retry` resends it. A retry scheduled for after you re-enable is still delivered.","x-required-capabilities":["webhooks:manage"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookEndpoint"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"delete":{"tags":["Webhooks"],"summary":"Disable a webhook endpoint","description":"The method is DELETE, but the endpoint is disabled, not deleted: it stops receiving events, still appears in the list with `status: disabled`, and its delivery history stays readable. No new events are queued for it, and a retry that comes due while it is disabled is abandoned. Switch it back on with `POST /v1/webhook_endpoints/{id}` and `disabled: false`.","x-required-capabilities":["webhooks:manage"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"Disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/webhook_endpoints/{id}/send_test":{"post":{"tags":["Webhooks"],"summary":"Send a test event to one endpoint","description":"Delivers a `webhook_endpoint.test` event to this endpoint and no other, so you can prove your signature check before a real payment depends on it.","x-required-capabilities":["webhooks:manage"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Queued","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["webhook_test"]},"delivered":{"type":"boolean"}},"required":["object","delivered"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/webhook_endpoints/{id}/deliveries":{"get":{"tags":["Webhooks"],"summary":"List deliveries to an endpoint","description":"What we sent, when, how many times, and what your server said. The first place to look when an event did not arrive.","x-required-capabilities":["webhooks:manage"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many objects to return. Between 1 and 100.","example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"A cursor for the next page: the id of the LAST object on the page you have. Returns the objects created before it, newest first."},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string","description":"A cursor for the previous page: the id of the FIRST object on the page you have. Returns the objects created immediately after it — the page before yours — still newest first. `has_more` then says whether there are newer objects still. Pass one cursor or the other."},"required":false,"name":"ending_before","in":"query"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"Delivery history","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/webhook_deliveries/{id}/retry":{"post":{"tags":["Webhooks"],"summary":"Send a delivery again","description":"Queues an immediate attempt, whatever the retry schedule said. Works on a delivery that has already given up.","x-required-capabilities":["webhooks:manage"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"An account your platform can no longer reach, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/api_keys":{"get":{"tags":["Developers"],"summary":"List your API keys","description":"Secrets are never included. Only the last four characters, so you can tell them apart.","x-required-capabilities":["keys:test","keys:live"],"x-connect":"refused","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many objects to return. Between 1 and 100.","example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"A cursor for the next page: the id of the LAST object on the page you have. Returns the objects created before it, newest first."},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string","description":"A cursor for the previous page: the id of the FIRST object on the page you have. Returns the objects created immediately after it — the page before yours — still newest first. `has_more` then says whether there are newer objects still. Pass one cursor or the other."},"required":false,"name":"ending_before","in":"query"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"Your keys","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"post":{"tags":["Developers"],"summary":"Create an API key","description":"The secret is in this response and nowhere else. Store it before you navigate away.","x-required-capabilities":["keys:test","keys:live"],"x-connect":"refused","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"description":"What this key is for. 'Production server', 'Zapier', that sort of thing."}}}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request (`invalid_request_error`, `parameter_invalid`), or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}]}},"/v1/api_keys/{id}/revoke":{"post":{"tags":["Developers"],"summary":"Revoke an API key","description":"Takes effect immediately. Requests using it start failing on the next call.","x-required-capabilities":["keys:test","keys:live"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request (`invalid_request_error`, `parameter_invalid`), or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/api_keys/{id}/roll":{"post":{"tags":["Developers"],"summary":"Roll an API key","description":"Issues a replacement and gives the old key an expiry, so you can deploy the new one before the old one stops working. Pass 0 hours to cut it off immediately.","x-required-capabilities":["keys:test","keys:live"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expires_in_hours":{"type":"integer","minimum":0,"maximum":72,"default":24}}}}}},"responses":{"200":{"description":"The replacement key, with its secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request (`invalid_request_error`, `parameter_invalid`), or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/balance":{"get":{"tags":["Balance"],"summary":"Retrieve your balance","description":"What we hold for you, per currency, in minor units. Read from the ledger rather than computed from a list of payments.","x-required-capabilities":["balance:read"],"x-connect":"allowed","responses":{"200":{"description":"Your balance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balance"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}]}},"/v1/balance_transactions":{"get":{"tags":["Balance"],"summary":"List balance transactions","description":"Everything that has moved your balance, newest first. `net` is the column that sums to your balance; `pending` becomes `available` once the settlement delay has passed.","x-required-capabilities":["balance:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many objects to return. Between 1 and 100.","example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"A cursor for the next page: the id of the LAST object on the page you have. Returns the objects created before it, newest first."},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string","description":"A cursor for the previous page: the id of the FIRST object on the page you have. Returns the objects created immediately after it — the page before yours — still newest first. `has_more` then says whether there are newer objects still. Pass one cursor or the other."},"required":false,"name":"ending_before","in":"query"},{"schema":{"type":"string","enum":["charge","refund","payout","payout_reversal","adjustment","dispute","dispute_reversal","application_fee","application_fee_refund","connect_collection_transfer"],"description":"Only transactions of this kind."},"required":false,"name":"type","in":"query"},{"schema":{"type":"string","description":"Only the transactions a given payout covers. Their `net` sums to that payout's amount."},"required":false,"name":"payout","in":"query"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"A list of balance transactions","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/BalanceTransaction"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/payouts":{"get":{"tags":["Payouts"],"summary":"List payouts","description":"Newest first. Payouts are always in BZD, whatever currency you price in.","x-required-capabilities":["balance:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many objects to return. Between 1 and 100.","example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"A cursor for the next page: the id of the LAST object on the page you have. Returns the objects created before it, newest first."},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string","description":"A cursor for the previous page: the id of the FIRST object on the page you have. Returns the objects created immediately after it — the page before yours — still newest first. `has_more` then says whether there are newer objects still. Pass one cursor or the other."},"required":false,"name":"ending_before","in":"query"},{"schema":{"type":"string","enum":["pending","in_transit","paid","canceled","failed","returned"],"description":"Only payouts in this state."},"required":false,"name":"status","in":"query"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"A list of payouts","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Payout"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/payouts/{id}":{"get":{"tags":["Payouts"],"summary":"Retrieve a payout","x-required-capabilities":["balance:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"The payout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payout"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/payouts/{id}/timeline":{"get":{"tags":["Payouts"],"summary":"A payout's timeline","description":"What happened to a payout and when: set aside, entered at the bank, sent, and how it ended. Oldest first.","x-required-capabilities":["balance:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"The timeline","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutTimeline"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/statements":{"get":{"tags":["Balance"],"summary":"List your monthly statements","description":"Newest first. One a month, made on the 1st at 06:00 Belize time for the month before, live mode only.","x-required-capabilities":["exports:read"],"x-connect":"refused","responses":{"200":{"description":"Your statements","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Statement"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"}]}},"/v1/statements/on_request/pdf":{"get":{"tags":["Balance"],"summary":"A statement for any dates, as a PDF","description":"Worked out again each time and never kept, in either mode. It says on every page that it was made on request and is not a monthly statement. Dates holding more than 50,000 balance transactions are refused with a 400: choose shorter dates.","x-required-capabilities":["exports:read"],"x-connect":"refused","parameters":[{"schema":{"type":"string","description":"The first day, `YYYY-MM-DD`, Belize time.","example":"2026-10-01"},"required":true,"name":"start","in":"query"},{"schema":{"type":"string","description":"The day AFTER the last one covered, `YYYY-MM-DD`: `start=2026-10-01&end=2026-10-16` is the first to the fifteenth.","example":"2026-10-16"},"required":true,"name":"end","in":"query"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"The statement","content":{"application/pdf":{"schema":{"type":"string"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Not a window we can make","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/statements/on_request/csv":{"get":{"tags":["Balance"],"summary":"A statement for any dates, as a CSV","description":"Every line in the dates, up to 50,000 balance transactions. More than that is refused with a 400: choose shorter dates.","x-required-capabilities":["exports:read"],"x-connect":"refused","parameters":[{"schema":{"type":"string","description":"The first day, `YYYY-MM-DD`, Belize time.","example":"2026-10-01"},"required":true,"name":"start","in":"query"},{"schema":{"type":"string","description":"The day AFTER the last one covered, `YYYY-MM-DD`: `start=2026-10-01&end=2026-10-16` is the first to the fifteenth.","example":"2026-10-16"},"required":true,"name":"end","in":"query"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"The statement's lines","content":{"text/csv":{"schema":{"type":"string"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Not a window we can make","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/statements/{id}":{"get":{"tags":["Balance"],"summary":"Retrieve a statement","x-required-capabilities":["exports:read"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"The statement","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Statement"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/statements/{id}/pdf":{"get":{"tags":["Balance"],"summary":"Download a statement as a PDF","description":"The same file every time: it is drawn from the statement as it was made.","x-required-capabilities":["exports:read"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"The statement","content":{"application/pdf":{"schema":{"type":"string"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/statements/{id}/csv":{"get":{"tags":["Balance"],"summary":"Download a statement's lines as a CSV","description":"Every line, which the PDF stops listing at five thousand. Times in UTC; money in minor units and formatted.","x-required-capabilities":["exports:read"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"The statement's lines","content":{"text/csv":{"schema":{"type":"string"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/test_helpers/payouts/{id}/fail":{"post":{"tags":["Test helpers"],"summary":"Make a test payout fail","description":"Test mode only. The bank refuses the transfer before it leaves: the payout becomes `failed`, its money is back in your available balance, and you get `payout.failed`. Only a `pending` or `in_transit` payout can fail.","x-required-capabilities":["test_helpers:write"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"failure_code":{"type":"string","enum":["account_closed","no_account","invalid_account_number","incorrect_account_holder_name","account_frozen","bank_account_restricted","invalid_currency","declined","could_not_process"],"description":"What the bank said. Defaults to `could_not_process` to fail, `account_closed` to return."}},"additionalProperties":false}}}},"responses":{"200":{"description":"The payout, after","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payout"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Not a test payout in a state that can do this, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/test_helpers/payouts/{id}/return":{"post":{"tags":["Test helpers"],"summary":"Make a test payout come back","description":"Test mode only. The transfer left and the bank sent it back: the payout becomes `returned`, its money is back in your available balance, and you get `payout.failed` and then `payout.returned`. A payout that hasn't been paid yet is paid first.","x-required-capabilities":["test_helpers:write"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"failure_code":{"type":"string","enum":["account_closed","no_account","invalid_account_number","incorrect_account_holder_name","account_frozen","bank_account_restricted","invalid_currency","declined","could_not_process"],"description":"What the bank said. Defaults to `could_not_process` to fail, `account_closed` to return."}},"additionalProperties":false}}}},"responses":{"200":{"description":"The payout, after","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payout"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Not a test payout in a state that can do this, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/reports/payments_summary":{"get":{"tags":["Reports"],"summary":"Summarise recent payments","description":"Per currency, by when each SUCCEEDED (not when it was created): payments in the last 24 hours, refunds in the last 30 days, and holds waiting to be captured.","x-required-capabilities":["payments:read"],"x-connect":"refused","responses":{"200":{"description":"The summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentsSummary"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"}]}},"/v1/reports/balance_summary":{"get":{"tags":["Reports"],"summary":"Summarise a period","description":"Opening balance, everything that moved, closing balance, and whether the ledger agrees — all in minor units of your settlement currency. Every figure is signed the way the ledger signs it: a charge positive, a refund and a payout negative. They add up to `ending_balance − starting_balance`, which is what makes this a statement rather than a set of numbers.\n\nDefaults to the current **Belize** calendar month up to now — Belize is UTC−6 all year, so a payment taken at 7pm local belongs to that day and not the next. A period may cover at most 366 days; ask for a longer one a page at a time.","x-required-capabilities":["exports:read"],"x-connect":"refused","parameters":[{"schema":{"type":"string","description":"The start of the period, inclusive. A unix timestamp in seconds, or an ISO date such as `2026-09-01`, read as a **Belize** date — midnight in Belize, which is 06:00 UTC. A unix second count or a full ISO instant is honoured exactly as given. Defaults to the first of the current Belize calendar month.","example":"2026-09-01"},"required":false,"name":"start","in":"query"},{"schema":{"type":"string","description":"The end of the period, EXCLUSIVE — so `2026-10-01` gives you the whole of September and nothing of October. Defaults to now.","example":"2026-10-01"},"required":false,"name":"end","in":"query"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"The summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceSummary"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/reports/exports/payments.csv":{"get":{"tags":["Reports"],"summary":"Export payments","description":"Every payment intent created in the window, newest first.\n\nEvery money column appears twice: `…_minor` is the integer this API speaks in, and the column beside it is the same figure formatted for a person. Dates are ISO 8601 UTC. A window may cover at most 366 days — ask for a longer one one window at a time, which is also how you keep a single request from timing out.","x-required-capabilities":["exports:read"],"x-connect":"refused","parameters":[{"schema":{"type":"string","description":"The start of the period, inclusive. A unix timestamp in seconds, or an ISO date such as `2026-09-01`, read as a **Belize** date — midnight in Belize, which is 06:00 UTC. A unix second count or a full ISO instant is honoured exactly as given. Defaults to the first of the current Belize calendar month.","example":"2026-09-01"},"required":false,"name":"start","in":"query"},{"schema":{"type":"string","description":"The end of the period, EXCLUSIVE — so `2026-10-01` gives you the whole of September and nothing of October. Defaults to now.","example":"2026-10-01"},"required":false,"name":"end","in":"query"},{"schema":{"type":"string","enum":["requires_payment_method","requires_confirmation","requires_action","processing","requires_capture","succeeded","canceled"],"description":"Only payments in this state."},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","description":"Only this customer's payments."},"required":false,"name":"customer","in":"query"},{"schema":{"type":"string","description":"Only payments taken through this link."},"required":false,"name":"payment_link","in":"query"},{"schema":{"type":"string","description":"Only payments taken against this invoice."},"required":false,"name":"invoice","in":"query"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"The export, streamed","content":{"text/csv":{"schema":{"type":"string"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/reports/exports/refunds.csv":{"get":{"tags":["Reports"],"summary":"Export refunds","description":"Every refund created in the window, newest first. Includes refunds made directly at the bank rather than through us, which we discover and record for you — `origin` says which.\n\nEvery money column appears twice: `…_minor` is the integer this API speaks in, and the column beside it is the same figure formatted for a person. Dates are ISO 8601 UTC. A window may cover at most 366 days — ask for a longer one one window at a time, which is also how you keep a single request from timing out.","x-required-capabilities":["exports:read"],"x-connect":"refused","parameters":[{"schema":{"type":"string","description":"The start of the period, inclusive. A unix timestamp in seconds, or an ISO date such as `2026-09-01`, read as a **Belize** date — midnight in Belize, which is 06:00 UTC. A unix second count or a full ISO instant is honoured exactly as given. Defaults to the first of the current Belize calendar month.","example":"2026-09-01"},"required":false,"name":"start","in":"query"},{"schema":{"type":"string","description":"The end of the period, EXCLUSIVE — so `2026-10-01` gives you the whole of September and nothing of October. Defaults to now.","example":"2026-10-01"},"required":false,"name":"end","in":"query"},{"schema":{"type":"string","enum":["pending","succeeded","failed","canceled"],"description":"Only refunds in this state."},"required":false,"name":"status","in":"query"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"The export, streamed","content":{"text/csv":{"schema":{"type":"string"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/reports/exports/payouts.csv":{"get":{"tags":["Reports"],"summary":"Export payouts","description":"Every payout cut in the window, newest first. Never the full bank account number: only the last four, as captured at the moment of the cut.\n\nEvery money column appears twice: `…_minor` is the integer this API speaks in, and the column beside it is the same figure formatted for a person. Dates are ISO 8601 UTC. A window may cover at most 366 days — ask for a longer one one window at a time, which is also how you keep a single request from timing out.","x-required-capabilities":["exports:read"],"x-connect":"refused","parameters":[{"schema":{"type":"string","description":"The start of the period, inclusive. A unix timestamp in seconds, or an ISO date such as `2026-09-01`, read as a **Belize** date — midnight in Belize, which is 06:00 UTC. A unix second count or a full ISO instant is honoured exactly as given. Defaults to the first of the current Belize calendar month.","example":"2026-09-01"},"required":false,"name":"start","in":"query"},{"schema":{"type":"string","description":"The end of the period, EXCLUSIVE — so `2026-10-01` gives you the whole of September and nothing of October. Defaults to now.","example":"2026-10-01"},"required":false,"name":"end","in":"query"},{"schema":{"type":"string","enum":["pending","in_transit","paid","canceled","failed"],"description":"Only payouts in this state."},"required":false,"name":"status","in":"query"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"The export, streamed","content":{"text/csv":{"schema":{"type":"string"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/reports/exports/balance_transactions.csv":{"get":{"tags":["Reports"],"summary":"Export balance transactions","description":"Every movement of your balance in the window, newest first. `net` is the column that sums to your balance.\n\nEvery money column appears twice: `…_minor` is the integer this API speaks in, and the column beside it is the same figure formatted for a person. Dates are ISO 8601 UTC. A window may cover at most 366 days — ask for a longer one one window at a time, which is also how you keep a single request from timing out.","x-required-capabilities":["exports:read"],"x-connect":"refused","parameters":[{"schema":{"type":"string","description":"The start of the period, inclusive. A unix timestamp in seconds, or an ISO date such as `2026-09-01`, read as a **Belize** date — midnight in Belize, which is 06:00 UTC. A unix second count or a full ISO instant is honoured exactly as given. Defaults to the first of the current Belize calendar month.","example":"2026-09-01"},"required":false,"name":"start","in":"query"},{"schema":{"type":"string","description":"The end of the period, EXCLUSIVE — so `2026-10-01` gives you the whole of September and nothing of October. Defaults to now.","example":"2026-10-01"},"required":false,"name":"end","in":"query"},{"schema":{"type":"string","enum":["charge","refund","payout","payout_reversal","adjustment","dispute","dispute_reversal","application_fee","application_fee_refund","connect_collection_transfer"],"description":"Only transactions of this kind."},"required":false,"name":"type","in":"query"},{"schema":{"type":"string","description":"Only what one payout covers. Their `net` sums to that payout's amount."},"required":false,"name":"payout","in":"query"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"The export, streamed","content":{"text/csv":{"schema":{"type":"string"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/reports/payout_reconciliation/{id}":{"get":{"tags":["Reports"],"summary":"Download a payout's reconciliation","description":"Every balance transaction this payout covers, as CSV. The lines sum to the payout amount.","x-required-capabilities":["exports:read"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"The report","content":{"text/csv":{"schema":{"type":"string"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/risk_rules":{"post":{"tags":["Risk"],"summary":"Create a risk rule","description":"A rule is an AND of up to eight conditions and an action. `block` refuses the payment before the bank is called; `review` lets it through and opens a review once it succeeds. A rule's predicate and action cannot be changed afterwards — create a new rule instead.","x-required-capabilities":["risk:manage"],"x-connect":"refused","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRiskRule"}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskRule"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}]},"get":{"tags":["Risk"],"summary":"List risk rules","description":"Yours and the platform defaults together, in the order they are evaluated. A rule with `platform_default: true` applies to every business on Secure Processing and cannot be edited or switched off — an entry on your allow list is what overrides one.","x-required-capabilities":["payments:read"],"x-connect":"refused","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many objects to return. Between 1 and 100.","example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"enabled","in":"query"},{"schema":{"type":"string","enum":["block","review"]},"required":false,"name":"action","in":"query"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"A list of risk rules","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/RiskRule"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/risk_rules/{id}":{"get":{"tags":["Risk"],"summary":"Retrieve a risk rule","x-required-capabilities":["payments:read"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"The rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskRule"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"post":{"tags":["Risk"],"summary":"Update a risk rule","description":"`name`, `enabled`, `priority` and `metadata`, and nothing else. Every evaluation records the rule that fired, so a rewritten predicate would make those records describe a test that no longer exists. Create a new rule and disable this one.","x-required-capabilities":["risk:manage"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRiskRule"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskRule"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/risk_lists":{"post":{"tags":["Risk"],"summary":"Add to your allow or block list","description":"An `allow` entry beats every rule, including ours — it is the only way to override a platform default. A `block` entry refuses the payment with `payment_blocked`.","x-required-capabilities":["risk:manage"],"x-connect":"refused","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRiskListItem"}}}},"responses":{"200":{"description":"Added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskListItem"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}]},"get":{"tags":["Risk"],"summary":"List your allow and block entries","x-required-capabilities":["payments:read"],"x-connect":"refused","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many objects to return. Between 1 and 100.","example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"A cursor for the next page: the id of the LAST object on the page you have. Returns the objects created before it, newest first."},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string","description":"A cursor for the previous page: the id of the FIRST object on the page you have. Returns the objects created immediately after it — the page before yours — still newest first. `has_more` then says whether there are newer objects still. Pass one cursor or the other."},"required":false,"name":"ending_before","in":"query"},{"schema":{"type":"string","enum":["allow","block"]},"required":false,"name":"list","in":"query"},{"schema":{"type":"string","enum":["email","email_domain","ip","card_fingerprint"]},"required":false,"name":"kind","in":"query"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"A list of entries","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/RiskListItem"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/risk_lists/{id}":{"get":{"tags":["Risk"],"summary":"Retrieve a list entry","x-required-capabilities":["payments:read"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"The entry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskListItem"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"delete":{"tags":["Risk"],"summary":"Remove a list entry","description":"A real delete, unlike everywhere else in this API. A list is a live control surface rather than a history: unblocking somebody has to actually unblock them. What the entry did is kept in the evaluations it decided, which are append-only.","x-required-capabilities":["risk:manage"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["risk_list_item"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/reviews":{"get":{"tags":["Risk"],"summary":"List reviews","description":"Payments a rule asked you to look at. A review exists only for a payment that was actually credited — an abandoned checkout never produces one.","x-required-capabilities":["payments:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many objects to return. Between 1 and 100.","example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"A cursor for the next page: the id of the LAST object on the page you have. Returns the objects created before it, newest first."},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string","description":"A cursor for the previous page: the id of the FIRST object on the page you have. Returns the objects created immediately after it — the page before yours — still newest first. `has_more` then says whether there are newer objects still. Pass one cursor or the other."},"required":false,"name":"ending_before","in":"query"},{"schema":{"type":"string","enum":["open","approved","refunded"]},"required":false,"name":"status","in":"query"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"A list of reviews","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Review"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/reviews/{id}":{"get":{"tags":["Risk"],"summary":"Retrieve a review","x-required-capabilities":["payments:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"The review","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Review"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/reviews/{id}/approve":{"post":{"tags":["Risk"],"summary":"Approve a reviewed payment","description":"Keeps the money and closes the review. Nothing about the payment changes.","x-required-capabilities":["risk:manage"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}}}}}},"responses":{"200":{"description":"Approved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Review"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/reviews/{id}/refund":{"post":{"tags":["Risk"],"summary":"Refund a reviewed payment","description":"Refunds the payment in full through the ordinary refund path — the same ledger entries, the same fee proration — and closes the review as `refunded`. If the bank refuses the refund the review stays open and the error says why. A `202` means the refund was sent and the bank has not confirmed it yet: the review stays open, the refund is `pending` and settles on its own. Calling this again never refunds twice: while the refund is still pending it answers `202` again, and once it has settled — or if the payment was already refunded in full some other way — it closes the review as `refunded` without a new refund.","x-required-capabilities":["payments:refund"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}}}}}},"responses":{"200":{"description":"Refunded and closed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Review"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"202":{"description":"Refund sent, not yet confirmed by the bank. The review is still open.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Review"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"402":{"description":"The bank refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"`outcome_unknown`: the request reached the bank and we could not confirm the result. Retrying with the same key is always safe and never reaches the bank again: if this answer was stored it is replayed, and if an earlier request under the key is still running, a later retry gets that request's stored result once it finishes. Do not repeat it under a new key: the payment or refund settles on its own and its webhook follows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"503":{"description":"`gateway_unavailable`: nothing was sent to the bank — it could not be reached, or the request was refused before it left. Nothing moved, and it is safe to retry. Or our database could not be reached before any work was done (`service_unavailable`, with `Retry-After`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}}}}},"/v1/account":{"get":{"tags":["Account"],"summary":"Retrieve your account","description":"What this account is, what it may do (`charges_enabled`, `payouts_enabled`) and what it still owes (`requirements`). The application itself is filled in from the dashboard.","x-required-capabilities":["payments:read"],"x-connect":"allowed","responses":{"200":{"description":"The account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}]}},"/v1/account/application":{"get":{"tags":["Account"],"summary":"Retrieve your activation application","description":"Creates the draft on first read. **Session only**, and only for an owner or an admin: this object carries identity documents and bank details.","x-required-capabilities":["activation:manage"],"x-connect":"refused","responses":{"200":{"description":"The application","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"}]},"post":{"tags":["Account"],"summary":"Update your activation application","description":"Only while the application is a draft or we have asked for more information. Fields you do not send are left alone; sending `null` clears one. **Session only.**","x-required-capabilities":["activation:manage"],"x-connect":"refused","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationUpdate"}}}},"responses":{"200":{"description":"The application","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Bad request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}]}},"/v1/account/application/persons":{"post":{"tags":["Account"],"summary":"Add a person to your application","description":"An owner, a director or a representative. **Session only.**","x-required-capabilities":["activation:manage"],"x-connect":"refused","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationPersonInput"}}}},"responses":{"200":{"description":"The person","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationPerson"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Bad request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}]}},"/v1/account/application/persons/{id}":{"post":{"tags":["Account"],"summary":"Update a person on your application","x-required-capabilities":["activation:manage"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationPersonInput"}}}},"responses":{"200":{"description":"The person","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationPerson"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Bad request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"delete":{"tags":["Account"],"summary":"Remove a person from your application","x-required-capabilities":["activation:manage"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["application_person"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/account/application/documents":{"post":{"tags":["Account"],"summary":"Attach a document to your application","description":"Against the requirement it answers. Send one for each side of a two-sided document. **Session only.**","x-required-capabilities":["activation:manage"],"x-connect":"refused","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationDocumentInput"}}}},"responses":{"200":{"description":"The document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationDocument"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Bad request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}]}},"/v1/account/application/documents/{id}":{"delete":{"tags":["Account"],"summary":"Remove a document from your application","x-required-capabilities":["activation:manage"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["application_document"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/account/application/entities":{"post":{"tags":["Account"],"summary":"Add a company that owns part of your business","description":"Ownership has to be traced to people, so each company at 25% or more needs its register attached. **Session only.**","x-required-capabilities":["activation:manage"],"x-connect":"refused","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationEntityInput"}}}},"responses":{"200":{"description":"The company","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationEntity"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Bad request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}]}},"/v1/account/application/entities/{id}":{"delete":{"tags":["Account"],"summary":"Remove a company from your application","x-required-capabilities":["activation:manage"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["application_entity"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/account/application/phone_confirmation":{"post":{"tags":["Account"],"summary":"Text a code to the business phone","description":"Sends a six-digit code by SMS to `business.phone`, valid for ten minutes. Type it back with `POST /v1/account/application/phone_confirmation/check`. Sending again replaces the code. Belize numbers only. Five a day. **Session only.**","x-required-capabilities":["activation:manage"],"x-connect":"refused","responses":{"200":{"description":"Sent, or already confirmed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneConfirmation"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Bad request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"description":"Too many codes: wait and try again","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"500":{"$ref":"#/components/responses/ServerError"},"502":{"description":"`phone_confirmation_failed`: the SMS provider did not answer. Nothing was confirmed; try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"503":{"description":"`phone_confirmation_unavailable`: we cannot send texts yet. Nothing waits on it. Or our database could not be reached before any work was done (`service_unavailable`, with `Retry-After`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}]}},"/v1/account/application/phone_confirmation/check":{"post":{"tags":["Account"],"summary":"Confirm the business phone with the code texted to it","description":"Checks the code sent by `POST /v1/account/application/phone_confirmation`. A wrong code can be typed again; after five wrong tries, or ten minutes, send a new one. **Session only.**","x-required-capabilities":["activation:manage"],"x-connect":"refused","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^[0-9]{4,10}$","example":"123456"}},"required":["code"]}}}},"responses":{"200":{"description":"Confirmed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneConfirmation"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Bad request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"502":{"description":"`phone_confirmation_failed`: the SMS provider did not answer. Nothing was confirmed; try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"503":{"description":"`phone_confirmation_unavailable`: we cannot send texts yet. Nothing waits on it. Or our database could not be reached before any work was done (`service_unavailable`, with `Retry-After`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}]}},"/v1/account/application/industries":{"get":{"tags":["Account"],"summary":"List the industries a business can choose","description":"In plain words, each with the card network category it maps to. **Session only.**","x-required-capabilities":["activation:manage"],"x-connect":"refused","responses":{"200":{"description":"The industries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndustryList"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"}]}},"/v1/account/application/submit":{"post":{"tags":["Account"],"summary":"Submit your application for review","description":"Refused, with `requirements.currently_due` in the message, until everything is present. Review is done by a person and is not instant. **Session only.**","x-required-capabilities":["activation:manage"],"x-connect":"refused","responses":{"200":{"description":"Submitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Bad request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}]}},"/v1/account/application/information_requests/{id}/respond":{"post":{"tags":["Account"],"summary":"Answer an information request","description":"Answers one open ask, once, with words, files or both. A `fix` or `document` ask is also answered by correcting the application and resubmitting it. **Session only.**","x-required-capabilities":["activation:manage"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InformationRequestResponse"}}}},"responses":{"200":{"description":"The answered request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InformationRequest"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Bad request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/account/application/terms/{document}":{"get":{"tags":["Account"],"summary":"Read an agreement or declaration","description":"The exact text of the version in force. **Session only.**","x-required-capabilities":["activation:manage"],"x-connect":"refused","parameters":[{"schema":{"type":"string","enum":["sponsored_merchant_agreement","privacy_notice","biometric_consent","ownership_declaration","directorship_declaration","representative_declaration","pep_declaration"]},"required":true,"name":"document","in":"path"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"The document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TermsDocument"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/account/application/terms":{"post":{"tags":["Account"],"summary":"Accept an agreement or declaration","description":"Records that you, signed in, accepted this version of this document, with the time, your IP address and browser, and the sha256 of the exact text. A person's own declaration (biometric consent, public positions) is refused here: only that person can make it, through the link sent to them or, if they are the one signed in, `POST /v1/account/application/persons/{id}/declarations`. **Session only.**","x-required-capabilities":["activation:manage"],"x-connect":"refused","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TermsAcceptance"}}}},"responses":{"200":{"description":"Where every document stands","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TermsStatus"}}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Bad request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}]}},"/v1/account/application/persons/{id}/declaration_link":{"post":{"tags":["Account"],"summary":"Send a person the link to make their own declarations","description":"Emails this person a one-time link, valid for seven days, to read and accept the declarations only they can make. Any earlier link stops working. The link is never returned here. **Session only.**","x-required-capabilities":["activation:manage"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonDeclarationLinkRequest"}}}},"responses":{"200":{"description":"Where the link went","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonDeclarationLink"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Bad request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/account/application/persons/{id}/declarations":{"post":{"tags":["Account"],"summary":"Make your own declarations, as this person","description":"For when the person named on the application is the one signed in. No link is sent: this needs a fresh step-up, and it records that you said you are this person. You can only ever be one person on an application, and a person only one user. Somebody else makes theirs through `POST /v1/account/application/persons/{id}/declaration_link`. **Session only.**","x-required-capabilities":["activation:manage"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonSelfDeclaration"}}}},"responses":{"200":{"description":"Where every document stands","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TermsStatus"}}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Bad request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/accounts":{"post":{"tags":["Connected accounts"],"summary":"Create a connected account","description":"With a test key, creates a test shop: any business can, right after signing up. A test shop exists in test mode only and can never go live, so when you are ready, create a separate real account. With a live key, for platforms we have enabled, creates a real business connected to yours, which takes live payments once we have verified it: send its owner an onboarding link (account links), then watch `charges_enabled` and `payouts_enabled`. Either way you act as it with your own key and the `Secure-Processing-Account` header.","x-required-capabilities":["connect:write"],"x-connect":"refused","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccount"}}}},"responses":{"200":{"description":"The new account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}]},"get":{"tags":["Connected accounts"],"summary":"List connected accounts","description":"Your connected accounts in the mode of your key, newest first. A live key lists real ones. A test key lists test shops, and, for a platform we have enabled, its real ones too, showing test-mode information only.","x-required-capabilities":["connect:read"],"x-connect":"refused","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many objects to return. Between 1 and 100.","example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"A cursor for the next page: the id of the LAST object on the page you have. Returns the objects created before it, newest first."},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string","description":"A cursor for the previous page: the id of the FIRST object on the page you have. Returns the objects created immediately after it — the page before yours — still newest first. `has_more` then says whether there are newer objects still. Pass one cursor or the other."},"required":false,"name":"ending_before","in":"query"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"A list of accounts","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Account"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/accounts/{id}":{"get":{"tags":["Connected accounts"],"summary":"Retrieve a connected account","description":"One of your connected accounts, as your key's mode sees it. A live key cannot see a test shop. A test key sees only test-mode information about a real account: no support email, metadata, category, approval or verification. Any other account id, including one that does not exist, is `403 account_invalid`.","x-required-capabilities":["connect:read"],"x-connect":"refused","parameters":[{"schema":{"type":"string","example":"acct_1aB2cD3eF4gH5iJ6kL7mN8oP"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"The account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"post":{"tags":["Connected accounts"],"summary":"Update a connected account","description":"The business's name and support email, your metadata, and when it is paid (`settings.payouts.schedule`, on the books of your key's mode). On a real business a test key may change only its test payout schedule; anything else is `403 livemode_required`. Who answers for the account, its status, its capabilities, its category and where it is paid are not changeable here, and nothing is changeable once you have rejected it.","x-required-capabilities":["connect:write"],"x-connect":"refused","parameters":[{"schema":{"type":"string","example":"acct_1aB2cD3eF4gH5iJ6kL7mN8oP"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccount"}}}},"responses":{"200":{"description":"The account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"delete":{"tags":["Connected accounts"],"summary":"Delete a test shop","description":"Test shops only, with a test key. It can no longer be used or seen, and it frees its place in your limit of open test shops. Deleting one you already deleted answers the same again. A real connected account cannot be deleted (`403 test_shop_only`): reject it instead. A test shop we have suspended cannot be deleted (`403 account_suspended`).","x-required-capabilities":["connect:write"],"x-connect":"refused","parameters":[{"schema":{"type":"string","example":"acct_1aB2cD3eF4gH5iJ6kL7mN8oP"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedAccount"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/accounts/{id}/reject":{"post":{"tags":["Connected accounts"],"summary":"Reject a connected account","description":"Cuts the account off on your side, at once: your key can no longer act as it and you can no longer send it onboarding links. It does not change the business's standing with us, its own keys or its payouts; we review it. Only we can undo a rejection.","x-required-capabilities":["connect:write"],"x-connect":"refused","parameters":[{"schema":{"type":"string","example":"acct_1aB2cD3eF4gH5iJ6kL7mN8oP"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectAccount"}}}},"responses":{"200":{"description":"The account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/application_fees":{"get":{"tags":["Connected accounts"],"summary":"List application fees","description":"What your platform has taken from your connected accounts' payments, newest first, in the mode of your key.","x-required-capabilities":["connect:read"],"x-connect":"refused","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many objects to return. Between 1 and 100.","example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"A cursor for the next page: the id of the LAST object on the page you have. Returns the objects created before it, newest first."},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string","description":"A cursor for the previous page: the id of the FIRST object on the page you have. Returns the objects created immediately after it — the page before yours — still newest first. `has_more` then says whether there are newer objects still. Pass one cursor or the other."},"required":false,"name":"ending_before","in":"query"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"A list of fees","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ApplicationFee"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/application_fees/{id}":{"get":{"tags":["Connected accounts"],"summary":"Retrieve an application fee","x-required-capabilities":["connect:read"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"The fee","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationFee"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/application_fees/{id}/refunds":{"post":{"tags":["Connected accounts"],"summary":"Refund an application fee","description":"Gives some or all of your fee back to the connected account, from your available balance, which may go negative. It does not refund the customer: use `refund_application_fee` on a refund for that.","x-required-capabilities":["application_fees:refund"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApplicationFeeRefund"}}}},"responses":{"200":{"description":"The fee, after the refund","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationFee"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"get":{"tags":["Connected accounts"],"summary":"List a fee's refunds","x-required-capabilities":["connect:read"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many objects to return. Between 1 and 100.","example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"A cursor for the next page: the id of the LAST object on the page you have. Returns the objects created before it, newest first."},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string","description":"A cursor for the previous page: the id of the FIRST object on the page you have. Returns the objects created immediately after it — the page before yours — still newest first. `has_more` then says whether there are newer objects still. Pass one cursor or the other."},"required":false,"name":"ending_before","in":"query"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"A list of refunds","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ApplicationFeeRefund"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/files":{"post":{"tags":["Files"],"summary":"Upload a file","description":"Multipart, with a `file` part and a `purpose`. PDF, PNG and JPEG only, up to 10 MB.\n\n**Session only.** This endpoint is used by the dashboard and cannot be called with an API key: the documents it holds are identity documents, and a key is a long-lived credential that has no business reading one.","x-required-capabilities":["activation:manage","disputes:manage"],"x-connect":"refused","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"purpose":{"type":"string","enum":["identity_document","business_document","bank_statement","dispute_evidence","other"]}},"required":["purpose"]}}}},"responses":{"200":{"description":"The stored file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Bad request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"description":"Too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}]},"get":{"tags":["Files"],"summary":"List files","description":"Newest first. `url` is null on every row; retrieve a file to get a link. **Session only.**","x-required-capabilities":["activation:manage","disputes:manage"],"x-connect":"refused","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many objects to return. Between 1 and 100.","example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"A cursor for the next page: the id of the LAST object on the page you have. Returns the objects created before it, newest first."},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string","description":"A cursor for the previous page: the id of the FIRST object on the page you have. Returns the objects created immediately after it — the page before yours — still newest first. `has_more` then says whether there are newer objects still. Pass one cursor or the other."},"required":false,"name":"ending_before","in":"query"},{"schema":{"type":"string","enum":["identity_document","business_document","bank_statement","dispute_evidence","other"],"description":"Only files stored for this purpose."},"required":false,"name":"purpose","in":"query"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"A list of files","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/File"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/files/{id}":{"get":{"tags":["Files"],"summary":"Retrieve a file","description":"Includes `url`, a link that works for five minutes. **Session only.**","x-required-capabilities":["activation:manage","disputes:manage"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"description":"The file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/disputes":{"get":{"tags":["Disputes"],"summary":"List disputes","description":"Newest first. A dispute exists only because the bank told us about one — we open it, and you hear about it through `dispute.created` and an email to the account owner.","x-required-capabilities":["payments:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many objects to return. Between 1 and 100.","example":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"A cursor for the next page: the id of the LAST object on the page you have. Returns the objects created before it, newest first."},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string","description":"A cursor for the previous page: the id of the FIRST object on the page you have. Returns the objects created immediately after it — the page before yours — still newest first. `has_more` then says whether there are newer objects still. Pass one cursor or the other."},"required":false,"name":"ending_before","in":"query"},{"schema":{"type":"string","enum":["warning_needs_response","warning_under_review","warning_closed","needs_response","under_review","won","lost"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","description":"Disputes raised against one payment."},"required":false,"name":"payment_intent","in":"query"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"A list of disputes","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Dispute"}}},"required":["object","url","has_more","data"]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/disputes/{id}":{"get":{"tags":["Disputes"],"summary":"Retrieve a dispute","description":"Includes the evidence on file, the deadline, and the balance transactions this dispute has produced so far.","x-required-capabilities":["payments:read"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/ConnectAccount"}],"responses":{"200":{"description":"The dispute","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dispute"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"post":{"tags":["Disputes"],"summary":"Update a dispute's evidence","description":"Adds to the evidence on file. Fields MERGE — posting `shipping_tracking_number` does not erase the receipt you uploaded yesterday — and `null` clears one.\n\nFile fields take a `file_` id from `POST /v1/files` with `purpose: dispute_evidence`. A file belonging to another business, or uploaded for another purpose, is refused.\n\nPass `submit: true` to send it. **Submission is final**: the evidence is frozen afterwards, because an operator has to forward it to the bank by hand and the bundle they send has to be the bundle this record shows.","x-required-capabilities":["disputes:manage"],"x-connect":"allowed","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/ConnectAccount"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisputeUpdateParams"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dispute"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/disputes/{id}/close":{"post":{"tags":["Disputes"],"summary":"Accept a dispute","description":"Concede: you are not going to contest this one. A chargeback moves from `needs_response` to `under_review`; an inquiry moves from `warning_needs_response` to `warning_under_review`. No further evidence is accepted.\n\nOnly available while the dispute is waiting for your response. Once evidence has been submitted (`under_review` or `warning_under_review`), or the dispute is closed or already accepted, it answers `400` with an `invalid_request_error` and changes nothing.\n\n⚠️ It does **not** move money and it does **not** mark the dispute lost. The bank has not answered yet, and we will not debit you on our own say-so before the network has decided. The outcome arrives as `dispute.closed` when the bank's reply reaches us.","x-required-capabilities":["disputes:manage"],"x-connect":"refused","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dispute"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"Invalid request, or an `Idempotency-Key` already used with a different body or path (`idempotency_error`, `idempotency_key_in_use`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"401":{"description":"No valid API key (`authentication_error`, `api_key_invalid`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"No such object (`invalid_request_error`, `resource_missing`). The message names the id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"409":{"$ref":"#/components/responses/IdempotencyInProgress"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}}},"webhooks":{}}