{"openapi":"3.1.0","info":{"title":"Virtual Card API","version":"0.3.0","description":"Tenant-isolated virtual card API. Mock and live acceptance are distinct. All mutations require Idempotency-Key."},"servers":[{"url":"https://api.reyvo.com","description":"API base URL"}],"paths":{"/v1/me":{"get":{"summary":"Get current customer","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_me","tags":["me"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update customer contact profile (not login credentials)","description":"Required permission: write. Money fields are USD cents.","operationId":"patch_v1_me","tags":["me"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cardholders/{id}":{"patch":{"summary":"Maintain local holder profile and activity","description":"Required permission: write. Money fields are USD cents.","operationId":"patch_v1_cardholders__id_","tags":["cardholders"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"status":{"enum":["active","inactive"]}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cardholder"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"Get holder","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_cardholders__id_","tags":["cardholders"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cardholder"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{id}/archive":{"post":{"summary":"Archive a project (Mock only; live answers 404 not_found); funds stay for late refunds","description":"MOCK ONLY. Required permission: write. Money fields are USD cents.","operationId":"post_v1_projects__id__archive","tags":["Mock simulation"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cards/{id}/sync":{"post":{"summary":"Refresh masked card details and status from issuer","description":"Required permission: write. Money fields are USD cents.","operationId":"post_v1_cards__id__sync","tags":["cards"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Card"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/issuer-events":{"get":{"summary":"List issuer-events","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_issuer_events","tags":["issuer-events"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1}},{"name":"since","in":"query","schema":{"type":"integer","minimum":0},"description":"Forward-only stream read: rows with ordinal > since, oldest first, each carrying its ordinal; the response adds next_since. Replaces cursor when present."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IssuerEvent"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0}}}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/issuer-events/{id}":{"get":{"summary":"Get issuer-events detail","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_issuer_events__id_","tags":["issuer-events"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuerEvent"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/reconciliations":{"get":{"summary":"List reconciliation reports; they are written by operator runs and background sweeps, never by a customer request, so a Mock tenant has none until an operator runs one","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_reconciliations","tags":["reconciliations"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Reconciliation"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0}}}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/reconciliations/{id}":{"get":{"summary":"Get a reconciliation report by an id from the list","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_reconciliations__id_","tags":["reconciliations"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reconciliation"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/mock/issuer-events":{"post":{"summary":"Submit a normalized Mock issuer event (ordered and deduplicated)","description":"MOCK ONLY. Required permission: write. Money fields are USD cents.","operationId":"post_v1_mock_issuer_events","tags":["Mock simulation"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"card_id":{"type":"string"},"event_id":{"type":"string"},"provider_transaction_id":{"type":"string"},"sequence":{"type":"integer","minimum":1,"maximum":100000},"type":{"enum":["authorized","declined","settled","reversed","refunded","settled_additional"]},"amount_cents":{"type":"integer","minimum":0,"maximum":1000000000},"merchant":{"type":"string"}},"required":["card_id","event_id","provider_transaction_id","sequence","type","amount_cents"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuerEvent"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/capabilities":{"get":{"summary":"Get upstream capabilities and verification status, and the withdrawal terms of this deployment: withdrawal.fee_cents is kept from every withdrawal, and withdrawal.min_cents is the configured floor (a withdrawal must be at least min_cents and more than fee_cents, else 422 withdrawal_below_minimum)","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_capabilities","tags":["capabilities"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Capabilities"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/balance":{"get":{"summary":"Get available wallet, holds and spend","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_balance","tags":["balance"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balance"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/wallets":{"get":{"summary":"List terminal cardholder wallets owned by this customer. Each holder has one logical wallet, with separate BILL and Brex backing; an unfunded holder returns zero balances. Existing customer funds and team projects are not migrated or counted in each holder wallet","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_wallets","tags":["wallets"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/HolderWallet"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0}}}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cardholders/{id}/wallet":{"get":{"summary":"Get one terminal cardholder wallet, separate from GET /v1/balance (customer funds). unallocated_cents is not yet in a confirmed default budget; pending_sync_cents is not spendable. Only confirmed, ready channel available_cents may be spent. The channel pools are separate, not a real-time cross-issuer shared limit","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_cardholders__id__wallet","tags":["wallets"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HolderWallet"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cardholders/{id}/wallet/transfers":{"post":{"summary":"Move settled customer credit to this holder wallet (to_wallet), or return unused holder funds to the customer (to_customer), within one channel. This is neither card funding nor an on-chain payout or issuer cash transfer. The response is the archived transfer snapshot, not proof of budget readiness; GET the wallet for current synchronization status. Default budgets use durable operations; pending/unknown funding is not spendable, and recovery reads the original upstream result rather than sending another write (default_budget_managed, holder_wallet_unverified, holder_budget_not_ready, operation_unknown, budget_in_use, insufficient_funds)","description":"Required permission: write. Money fields are USD cents.","operationId":"post_v1_cardholders__id__wallet_transfers","tags":["wallets"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"enum":["bill","brex"]},"amount_cents":{"type":"integer","minimum":1,"maximum":1000000000},"direction":{"enum":["to_wallet","to_customer"]}},"required":["channel","amount_cents","direction"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HolderWallet"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cardholders/{id}/wallet/sync":{"post":{"summary":"Synchronize this holder default budget using its durable internal funding operation. Unknown writes are recovered by read-back only; a new request key never authorizes duplicating the upstream funding. Read the returned channel status before issuing or using cards (holder_wallet_unverified, holder_budget_not_ready, operation_unknown)","description":"Required permission: write. Money fields are USD cents.","operationId":"post_v1_cardholders__id__wallet_sync","tags":["wallets"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"enum":["bill","brex"]}},"required":["channel"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HolderWallet"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/funds/summary":{"get":{"summary":"Get a funds overview. Lifetime deposited, spent (gross) and refunded totals come from the ledger. available_cents equals customer wallet_available_cents plus project_available_cents (including holder default budgets once) plus holder_wallet_unallocated_cents. holder_wallet_available_cents and holder_wallet_held_cents are informational subsets, not extra balances to add. Pending holder funding is excluded from available_cents. available_cents + held_cents + holder_wallet_pending_cents + withdrawal_pending_cents = total_deposited_cents - total_spent_cents + total_refunded_cents - total_withdrawn_cents. A holder channel must also be ready before spending; customer withdrawals use only customer funds","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_funds_summary","tags":["funds"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FundsSummary"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/funds/flow":{"get":{"summary":"List the funds flow: one row per ledger entry, newest booking first. type is a stable code (deposit, spend, refund, project_allocation, project_release, authorization_hold, authorization_release, channel_transfer, withdrawal_hold, withdrawal_release, withdrawal, other) and new codes may be added, so treat an unknown one as other; direction is in, out or internal (a move between your own wallet, project and hold balances), and amount_cents is always positive, so direction gives its sign. from and to are UTC dates (YYYY-MM-DD), both inclusive. card_id matches the entries of that card's transactions (holds, releases, spend and refunds); project_id matches the project's own entries and entries of its transactions, including refunds that reach the wallet after the project is archived. Offset paging over live data: rows booked while you page can repeat on the next page, so page a past date range for a fixed snapshot (invalid_field, invalid_pagination)","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_funds_flow","tags":["funds"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1}},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"Optional UTC date (YYYY-MM-DD), inclusive start"},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"Optional UTC date (YYYY-MM-DD), inclusive end"},{"name":"card_id","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"project_id","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FundsFlowEntry"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0}}}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/funds/merchants":{"get":{"summary":"List settled spend by merchant: spent_cents (settled, additional clearings included), refunded_cents, net_cents and transaction_count per merchant. Only transactions with a settlement count. Names are grouped after trimming spaces and ignoring case; merchant is one spelling of the group, null for transactions without a merchant. from and to are UTC dates (YYYY-MM-DD, both inclusive) of the transaction's creation (its authorization), not of the booking used by GET /v1/funds/flow. Sorted by spent_cents, highest first. Offset paging over live data: a merchant whose totals change while you page can move between pages (invalid_field, invalid_pagination)","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_funds_merchants","tags":["funds"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1}},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"Optional UTC date (YYYY-MM-DD), inclusive start"},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"Optional UTC date (YYYY-MM-DD), inclusive end"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MerchantSpend"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0}}}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cardholders":{"get":{"summary":"List cardholders","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_cardholders","tags":["cardholders"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1}},{"name":"status","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"card_id","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"project_id","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"holder_id","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"channel","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Cardholder"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0}}}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a tenant-owned cardholder","description":"Required permission: write. Money fields are USD cents.","operationId":"post_v1_cardholders","tags":["cardholders"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}},"required":["name","email"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cardholder"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects":{"get":{"summary":"List projects","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_projects","tags":["projects"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1}},{"name":"status","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"card_id","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"project_id","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"holder_id","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"channel","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Project"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0}}}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a funded shared or personal budget. Optional group labels it for GET /v1/project-groups (trimmed, lowercased; a summary, not a shared limit). limit_period monthly (bill or brex) splits budget_cents evenly over months as a hard monthly limit the channel resets, the current UTC month first, until ends_on; its budget cannot change later (monthly_budget_fixed, monthly_budget_unverified, monthly_start_window: not 00:00-11:59 UTC on the 1st)","description":"Required permission: write. Money fields are USD cents.","operationId":"post_v1_projects","tags":["projects"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"owner_id":{"type":"string"},"channel":{"enum":["brex","bill","mixed"]},"budget_cents":{"type":"integer","minimum":1,"maximum":1000000000},"kind":{"enum":["team","personal"]},"limit_period":{"enum":["one_time","monthly"]},"months":{"type":"integer","minimum":1,"maximum":12},"group":{"type":"string","description":"Group label, trimmed and lowercased: 1-64 of a-z, 0-9, - and _, starting and ending with a letter or digit. A summary label, not a shared limit"}},"required":["name","owner_id","channel","budget_cents"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{id}":{"get":{"summary":"Get project","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_projects__id_","tags":["projects"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update name, group, members or budget (0 releases an unspent pool). A holder default budget is managed through its wallet; direct budget changes return default_budget_managed. group (null clears) is a local label, sent alone or with name only, never to a channel. Live, one of members or budget: a raise reserves funds first, a cut releases them once read back, an unknown outcome locks the project until its Idempotency-Key is replayed (read-back only); members stay local (Brex may not change spend limit users) and, unlike Mock, emit no budget.updated (budget_in_use, budget_resize_unverified, insufficient_funds, live_customer_not_allowed, live_limit_exceeded, monthly_budget_fixed, operation_unknown, project_closing, provider_mapping_required, provider_schema_unverified, upstream_membership_unverified)","description":"Required permission: write. Money fields are USD cents.","operationId":"patch_v1_projects__id_","tags":["projects"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"members":{"type":"array","items":{"type":"string"}},"budget_cents":{"type":"integer","minimum":0,"maximum":1000000000},"group":{"type":["string","null"],"description":"Group label, trimmed and lowercased: 1-64 of a-z, 0-9, - and _, starting and ending with a letter or digit. A summary label, not a shared limit"}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cards":{"get":{"summary":"List cards","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_cards","tags":["cards"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1}},{"name":"status","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"card_id","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"project_id","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"holder_id","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"channel","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Card"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0}}}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Issue with project_id or holder_id + channel for a ready default budget. Default budgets are one-time, without rollover. limit_cents caps total spend, or per month in a monthly project; allocations cannot exceed the budget. Brex allows one lifetime card with an equal cap. BILL requires verified shared concurrency, or a separately verified single-card wallet with a permanent claim. Unknown BILL wallet issuance never resends; known native IDs allow original-request read-only recovery. Wallet sync, closing, deficits, drift or unverified membership block issuance (holder_budget_not_ready, project_closing, project_reconciliation_required, upstream_membership_unverified)","description":"Required permission: write. Money fields are USD cents.","operationId":"post_v1_cards","tags":["cards"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"project_id":{"type":"string"},"holder_id":{"type":"string"},"channel":{"enum":["brex","bill"]},"limit_cents":{"type":"integer","minimum":1,"maximum":1000000000},"amount_cents":{"type":"integer","minimum":1,"maximum":1000000000}},"required":["name","holder_id"],"additionalProperties":false,"anyOf":[{"required":["project_id"]},{"required":["channel"]}]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Card"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cards/{id}":{"get":{"summary":"Get card","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_cards__id_","tags":["cards"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Card"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Change the hard limit of an existing BILL or Brex limit card, within its project budget (monthly limit if monthly) and no lower than current-period authorizations plus original settled spend; refunds do not restore it. Does not change the project budget or period and never converts shared cards. Live confirms the issuer with an independent read; an unknown outcome locks the card and its project until this original Idempotency-Key is replayed (read-back only). (card_limit_update_unverified, card_limit_in_use, card_limit_exceeds_budget, card_limit_mode_conflict, operation_unknown, project_closing)","description":"Required permission: write. Money fields are USD cents.","operationId":"patch_v1_cards__id_","tags":["cards"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit_cents":{"type":"integer","minimum":1,"maximum":1000000000}},"required":["limit_cents"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Card"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/deposits":{"get":{"summary":"List deposits","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_deposits","tags":["deposits"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1}},{"name":"status","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"card_id","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"project_id","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"holder_id","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"channel","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Deposit"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0}}}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a stablecoin deposit order. Optional holder_id assigns the final credit to that terminal user wallet and automatically synchronizes its default budget. Chain confirmation alone is not spendable; funding remains unavailable until the channel default budget is independently confirmed. Omit holder_id to retain the existing customer-credit flow","description":"Required permission: write. Money fields are USD cents.","operationId":"post_v1_deposits","tags":["deposits"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount_cents":{"type":"integer","minimum":1,"maximum":1000000000},"channel":{"enum":["brex","bill"]},"asset":{"enum":["USDC","USDT"]},"network":{"enum":["ethereum","bsc"]},"holder_id":{"type":"string"}},"required":["amount_cents","channel"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deposit"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/deposits/{id}":{"get":{"summary":"Get deposit","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_deposits__id_","tags":["deposits"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deposit"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/transactions":{"get":{"summary":"List transactions","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_transactions","tags":["transactions"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1}},{"name":"status","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"card_id","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"project_id","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"holder_id","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"channel","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0}}}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/transactions/{id}":{"get":{"summary":"Get transaction","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_transactions__id_","tags":["transactions"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/challenges":{"get":{"summary":"List challenges","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_challenges","tags":["challenges"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Challenge"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0}}}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/challenges/{id}":{"get":{"summary":"Get challenge","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_challenges__id_","tags":["challenges"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Challenge"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/events":{"get":{"summary":"List events","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_events","tags":["events"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1}},{"name":"status","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"card_id","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"project_id","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"holder_id","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"channel","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0}}}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/events/{id}":{"get":{"summary":"Get event","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_events__id_","tags":["events"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/balance-transfers":{"get":{"summary":"List balance-transfers","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_balance_transfers","tags":["balance-transfers"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BalanceTransfer"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0}}}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Reallocate unallocated platform credit between channels (not an issuer cash transfer)","description":"Required permission: write. Money fields are USD cents.","operationId":"post_v1_balance_transfers","tags":["balance-transfers"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source_channel":{"enum":["bill","brex"]},"destination_channel":{"enum":["bill","brex"]},"amount_cents":{"type":"integer","minimum":1,"maximum":1000000000}},"required":["source_channel","destination_channel","amount_cents"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceTransfer"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/balance-transfers/{id}":{"get":{"summary":"Get balance_transfer","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_balance_transfers__id_","tags":["balance-transfers"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceTransfer"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/withdrawals":{"get":{"summary":"List withdrawals","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_withdrawals","tags":["withdrawals"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1}},{"name":"status","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"},{"name":"channel","in":"query","schema":{"type":"string"},"description":"Optional exact-match filter"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Withdrawal"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0}}}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Request a BSC USDT payout of unallocated wallet funds from one channel. amount_cents is frozen at once (balance_cents and channel_balances drop by it) and waits for an operator to approve or reject it; fee_cents and payout_cents (amount_cents minus fee_cents) are fixed at submission from GET /v1/capabilities withdrawal. address must be able to receive USDT on BSC; mixed case must be a valid EIP-55 checksum. Needs the withdraw scope, which default keys do not carry (withdrawal_unsupported, withdrawal_below_minimum, invalid_withdrawal_address, channel_funds_insufficient, channel_balance_mismatch, customer_inactive, live_customer_not_allowed)","description":"Required permission: withdraw. Money fields are USD cents.","operationId":"post_v1_withdrawals","tags":["withdrawals"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount_cents":{"type":"integer","minimum":1,"maximum":1000000000},"channel":{"enum":["bill","brex"]},"address":{"type":"string"}},"required":["amount_cents","channel","address"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Withdrawal"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/withdrawals/{id}":{"get":{"summary":"Get withdrawal","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_withdrawals__id_","tags":["withdrawals"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Withdrawal"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/project-groups":{"get":{"summary":"List project groups: budget, available, held and spent of the labelled projects, per channel and in total. A summary of separate project budgets, not a shared limit: a card is declined once its own project is used up, even if another project or channel in the group has funds left","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_project_groups","tags":["project-groups"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProjectGroup"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0}}}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/project-groups/{group}":{"get":{"summary":"Get one project group: totals, per-channel subtotals and its member projects, including closing and archived ones. A summary view, not a shared limit (not_found)","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_project_groups__group_","tags":["project-groups"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"group","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectGroup"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{id}/close":{"post":{"summary":"Stop a project issuing and start its refund window; the budget is released afterwards. Refused while a budget change on the project is unresolved (operation_unknown, project_in_use)","description":"Required permission: write. Money fields are USD cents.","operationId":"post_v1_projects__id__close","tags":["projects"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/projects/{id}/release":{"post":{"summary":"Retire a closed project after its refund window. released_cents is signed: positive returns surplus, negative charges single-channel debt to the wallet (not a refund), zero moves nothing. Drift and mixed-channel debt block release (project_reconciliation_required, project_requires_reconciliation, budget_release_unverified, operation_unknown, project_not_closing, refund_window_open)","description":"Required permission: write. Money fields are USD cents.","operationId":"post_v1_projects__id__release","tags":["projects"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cards/{id}/funding":{"post":{"summary":"POST /v1/cards with holder_id, channel and amount_cents issues a card on its own budget funded from the customer wallet; replaying its key resumes funding and issuance by read-back. This route moves customer wallet funds into that card budget (to_card) or unused budget back to the customer wallet (to_wallet); holder wallet funds are never used. Unknown outcomes keep the reservation; replay the original key (card_budget_not_found, budget_in_use, insufficient_funds, operation_unknown, holder_budget_mode_conflict, holder_card_budgets_unverified, holder_card_limit_reached)","description":"Required permission: write. Money fields are USD cents.","operationId":"post_v1_cards__id__funding","tags":["cards"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"direction":{"enum":["to_card","to_wallet"]},"amount_cents":{"type":"integer","minimum":1,"maximum":1000000000}},"required":["direction","amount_cents"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Card"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cards/{id}/secure-details":{"get":{"summary":"Fetch issuer-hosted card details once; never stored by the platform","description":"Required permission: secrets. Money fields are USD cents.","operationId":"get_v1_cards__id__secure_details","tags":["cards"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardSecureDetails"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/challenges/{id}/decision":{"post":{"summary":"BILL 3DS identity decision; not payment success. Live accepts need active card/project, no deficit/drift, and verified concurrent enforcement for shared cards. Reject is available. Explicit BILL status must match; other outcomes keep decision_op and return provider_outcome_unknown. Never resend a pending/unknown decision. Query transactions for payment outcome.","description":"Required permission: write. Money fields are USD cents.","operationId":"post_v1_challenges__id__decision","tags":["challenges"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"enum":["accept","reject"]}},"required":["decision"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Challenge"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cards/{id}/freeze":{"post":{"summary":"freeze a card","description":"Required permission: write. Money fields are USD cents.","operationId":"post_v1_cards__id__freeze","tags":["cards"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Card"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cards/{id}/unfreeze":{"post":{"summary":"unfreeze a card; Live refuses project deficits or drift (project_reconciliation_required); BILL shared cards additionally require concurrent budget verification or a matching separately verified holder-wallet card claim (shared_budget_concurrency_unverified)","description":"Required permission: write. Money fields are USD cents.","operationId":"post_v1_cards__id__unfreeze","tags":["cards"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Card"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cards/{id}/close":{"post":{"summary":"close a card","description":"Required permission: write. Money fields are USD cents.","operationId":"post_v1_cards__id__close","tags":["cards"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Card"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/api-keys":{"get":{"summary":"List masked API keys","description":"Required permission: keys. Money fields are USD cents.","operationId":"get_v1_api_keys","tags":["api-keys"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}},"required":["data"]}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create API key (token returned once)","description":"Required permission: keys. Money fields are USD cents.","operationId":"post_v1_api_keys","tags":["api-keys"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scopes":{"type":"array","items":{"enum":["read","write","keys","webhooks","secrets","withdraw"]}},"expires_at":{"type":"string"}},"required":["scopes"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/api-keys/{id}/rotate":{"post":{"summary":"Rotate and revoke previous key atomically","description":"Required permission: keys. Money fields are USD cents.","operationId":"post_v1_api_keys__id__rotate","tags":["api-keys"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scopes":{"type":"array","items":{"enum":["read","write","keys","webhooks","secrets","withdraw"]}},"expires_at":{"type":"string"}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/api-keys/{id}":{"delete":{"summary":"Revoke an API key","description":"Required permission: keys. Money fields are USD cents.","operationId":"delete_v1_api_keys__id_","tags":["api-keys"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"revoked":{"const":true}},"required":["id","revoked"]}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks":{"get":{"summary":"List webhook endpoints","description":"Required permission: webhooks. Money fields are USD cents.","operationId":"get_v1_webhooks","tags":["webhooks"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"required":["data"]}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Register a signed webhook endpoint","description":"Required permission: webhooks. Money fields are USD cents.","operationId":"post_v1_webhooks","tags":["webhooks"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}}},"required":["url"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks/{id}/replay":{"post":{"summary":"Replay a stored event without repeating its business operation","description":"Required permission: webhooks. Money fields are USD cents.","operationId":"post_v1_webhooks__id__replay","tags":["webhooks"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"event_id":{"type":"string"}},"required":["event_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"event_id":{"type":"string"},"endpoint":{"type":"string"},"status":{"const":"pending"}},"required":["id","event_id","endpoint","status"]}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks/{id}":{"delete":{"summary":"Disable an endpoint","description":"Required permission: webhooks. Money fields are USD cents.","operationId":"delete_v1_webhooks__id_","tags":["webhooks"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhook-deliveries":{"get":{"summary":"Get delivery attempts","description":"Required permission: webhooks. Money fields are USD cents.","operationId":"get_v1_webhook_deliveries","tags":["webhook-deliveries"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0}}}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhook-deliveries/{id}/retry":{"post":{"summary":"Requeue a dead delivery","description":"Required permission: webhooks. Money fields are USD cents.","operationId":"post_v1_webhook_deliveries__id__retry","tags":["webhook-deliveries"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"queued":{"const":true}},"required":["queued"]}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/logs":{"get":{"summary":"Get redacted API request logs","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_logs","tags":["logs"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RequestLog"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0}}}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/ledger":{"get":{"summary":"Get balanced journal entries","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_ledger","tags":["ledger"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LedgerEntry"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0}}}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/operations":{"get":{"summary":"Get idempotent operation status","description":"Required permission: read. Money fields are USD cents.","operationId":"get_v1_operations","tags":["operations"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Operation"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0}}}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/mock/deposits/{id}/advance":{"post":{"summary":"Simulate next funding stage","description":"MOCK ONLY. Required permission: write. Money fields are USD cents.","operationId":"post_v1_mock_deposits__id__advance","tags":["Mock simulation"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deposit"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/mock/authorizations":{"post":{"summary":"Simulate authorization against a shared pool","description":"MOCK ONLY. Required permission: write. Money fields are USD cents.","operationId":"post_v1_mock_authorizations","tags":["Mock simulation"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"card_id":{"type":"string"},"amount_cents":{"type":"integer","minimum":1,"maximum":1000000000},"merchant":{"type":"string"}},"required":["card_id","amount_cents"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/mock/challenges":{"post":{"summary":"Simulate a pending 3D Secure challenge on a BILL card; answer with POST /v1/challenges/{id}/decision","description":"MOCK ONLY. Required permission: write. Money fields are USD cents.","operationId":"post_v1_mock_challenges","tags":["Mock simulation"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"card_id":{"type":"string"},"amount_cents":{"type":"integer","minimum":1,"maximum":1000000000},"merchant":{"type":"string"}},"required":["card_id","amount_cents"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Challenge"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/mock/transactions/{id}/settle":{"post":{"summary":"Simulate settle","description":"MOCK ONLY. Required permission: write. Money fields are USD cents.","operationId":"post_v1_mock_transactions__id__settle","tags":["Mock simulation"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount_cents":{"type":"integer","minimum":1,"maximum":1000000000}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/mock/transactions/{id}/reverse":{"post":{"summary":"Simulate reverse","description":"MOCK ONLY. Required permission: write. Money fields are USD cents.","operationId":"post_v1_mock_transactions__id__reverse","tags":["Mock simulation"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount_cents":{"type":"integer","minimum":1,"maximum":1000000000}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/mock/transactions/{id}/refund":{"post":{"summary":"Simulate refund","description":"MOCK ONLY. Required permission: write. Money fields are USD cents.","operationId":"post_v1_mock_transactions__id__refund","tags":["Mock simulation"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount_cents":{"type":"integer","minimum":1,"maximum":1000000000}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/mock/webhooks/deliver":{"post":{"summary":"Deliver to local Mock sink","description":"MOCK ONLY. Required permission: webhooks. Money fields are USD cents.","operationId":"post_v1_mock_webhooks_deliver","tags":["Mock simulation"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["delivered","retry","dead"]},"attempts":{"type":"integer"},"http_status":{"type":"integer"}},"required":[]}}},"required":["data"]}}}},"401":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (error.code rate_limited): per customer per clock minute, 600 reads and 300 writes by default (30 card-number reads); retry after Retry-After seconds","headers":{"Retry-After":{"description":"Always 60 seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error with code, message and request_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","required":["error","request_id"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable reason, for example unauthorized, idempotency_conflict, invalid_field, not_found or rate_limited. The API reference lists every code with its HTTP status."},"message":{"type":"string"}}},"request_id":{"type":"string"}}},"Customer":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"status":{"enum":["active","suspended"]},"live_policy":{"type":"object","description":"Per-customer live ceilings and request budgets set by operations; absent fields use deployment defaults.","properties":{"max_project_budget_cents":{"type":"integer"},"max_total_budget_cents":{"type":"integer"},"refund_window_days":{"type":"integer"},"read_rate_per_minute":{"type":"integer"},"write_rate_per_minute":{"type":"integer"}}}},"required":["id"]},"Cardholder":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"status":{"enum":["active","inactive"]},"provider_ids":{"type":"object","additionalProperties":{"type":"string"}}},"required":["id"]},"HolderWalletChannel":{"type":"object","properties":{"unallocated_cents":{"type":"integer","description":"Holder credit not yet allocated to a confirmed default budget; not spendable."},"pending_sync_cents":{"type":"integer","description":"Funding whose upstream default-budget result is pending or unknown; not spendable."},"available_cents":{"type":"integer","description":"Confirmed default-budget ledger balance in this channel. Only status ready and satisfied card/capability guards permit spending; pending additions are excluded. A deficit can be negative."},"held_cents":{"type":"integer","description":"Funds occupied by authorizations, in USD cents."},"spent_cents":{"type":"integer","description":"Net settled spend, after confirmed refunds, in USD cents."},"project_id":{"type":["string","null"],"description":"Managed default budget owned only by this holder; null before one is established. Use wallet routes to move its funds."},"status":{"enum":["unfunded","pending","ready","unknown","blocked"]},"error_code":{"type":["string","null"],"description":"Stable synchronization or readiness error; null when there is none."},"mode":{"enum":["default","card_budgets"],"description":"default sweeps free funds into one default budget; card_budgets funds each card budget from the customer wallet instead, never from unallocated_cents, and available/held/spent sum every card budget."},"card_budgets":{"type":"array","description":"Open card budgets in card_budgets mode, one card each.","items":{"type":"object","properties":{"project_id":{"type":"string"},"card_id":{"type":["string","null"]},"status":{"type":"string"},"budget_cents":{"type":"integer"},"available_cents":{"type":"integer"},"held_cents":{"type":"integer"},"spent_cents":{"type":"integer"}},"required":["project_id","card_id","status","budget_cents","available_cents","held_cents","spent_cents"]}}},"required":["unallocated_cents","pending_sync_cents","available_cents","held_cents","spent_cents","project_id","status","error_code"]},"HolderWallet":{"type":"object","properties":{"id":{"type":"string"},"holder_id":{"type":"string"},"currency":{"const":"USD"},"unallocated_cents":{"type":"integer","description":"Not yet in a confirmed default budget."},"pending_sync_cents":{"type":"integer","description":"Pending or unknown default-budget funding; not spendable."},"available_cents":{"type":"integer","description":"Confirmed ledger funds, summed once across separate channel pools. Check each channel status and card capabilities before spending."},"held_cents":{"type":"integer"},"spent_cents":{"type":"integer","description":"Net settled spend after confirmed refunds."},"channels":{"type":"object","properties":{"bill":{"$ref":"#/components/schemas/HolderWalletChannel"},"brex":{"$ref":"#/components/schemas/HolderWalletChannel"}},"required":["bill","brex"]}},"required":["id","holder_id","currency","unallocated_cents","pending_sync_cents","available_cents","held_cents","spent_cents","channels"]},"Project":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"default_budget":{"type":"boolean","description":"True only for a managed holder default budget; direct budget edits are refused. Existing personal/team projects are not automatically converted."},"wallet_id":{"type":"string","description":"Holder wallet owning this default or card budget. Absent on legacy personal/team projects."},"holder_budget":{"enum":["card"],"description":"card: a holder card budget carrying exactly one card, funded from and released to the customer wallet; resized only through POST /v1/cards/{id}/funding. Absent otherwise."},"status":{"enum":["closing","archived"],"description":"Absent while the project is active. closing: no longer issuing, awaiting release after its refund window. archived: budget retired and the signed released_cents adjustment booked to the wallet."},"closing_at":{"type":"string","format":"date-time"},"released_at":{"type":"string","format":"date-time"},"released_cents":{"type":"integer","description":"Signed wallet adjustment in USD cents when the project was archived: positive returns unused funds, negative charges a known single-channel deficit to the wallet, and zero moves no funds. A negative value is debt absorption, not a customer refund."},"release_pending":{"type":"boolean","description":"The last upstream retirement had an unknown outcome; the worker retries."},"release_attempts":{"type":"integer"},"requires_reconciliation":{"type":"boolean"},"kind":{"enum":["team","personal"]},"channel":{"enum":["brex","bill","mixed"]},"group":{"type":"string","description":"Label summed by GET /v1/project-groups; absent when ungrouped. Not a shared limit."},"owner_id":{"type":"string"},"members":{"type":"array","items":{"type":"string"}},"channel_funding":{"type":"object","properties":{"bill":{"type":"integer"},"brex":{"type":"integer"}}},"budget_cents":{"type":"integer"},"available_cents":{"type":"integer"},"held_cents":{"type":"integer"},"spent_cents":{"type":"integer"},"provider_id":{"type":"string"},"limit_period":{"enum":["monthly"],"description":"Absent on a one-time project."},"months":{"type":"integer","description":"Months in the term, the creation UTC month first."},"monthly_limit_cents":{"type":"integer","description":"Hard limit per month: budget_cents / months."},"ends_on":{"type":"string","format":"date","description":"Last day the pool can be spent."}},"required":["id"]},"Card":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"project_id":{"type":"string"},"holder_id":{"type":"string"},"channel":{"enum":["brex","bill"]},"status":{"enum":["pending","active","frozen","closed"]},"last_four":{"type":"string"},"provider_id":{"type":"string"},"synced_at":{"type":"string","format":"date-time"},"network":{"enum":["visa","mastercard"],"description":"Card network: the channel default at issuance, the issuer answer after sync."},"network_source":{"enum":["channel_default","issuer"]},"limit_cents":{"type":["integer","null"],"description":"Issuer card-control limit in USD cents, not a separately funded card balance. Existing limit cards use a total cap in a one-time project or a cap per month in a monthly project; allocation restrictions still apply. Absent on shared cards. Independent monthly caps on a shared holder default wallet are not implemented."},"limit_sync":{"type":"object","properties":{"op":{"type":"string"},"prior_cents":{"type":"integer","minimum":1},"target_cents":{"type":"integer","minimum":1},"at":{"type":"string","format":"date-time"},"policy_fingerprint":{"type":"string","description":"Opaque digest proving the issuer period and other immutable controls stayed unchanged; present for Live changes."}},"required":["op","prior_cents","target_cents","at"],"additionalProperties":false,"description":"Present while a hard card-limit change is unresolved. Allocation reserves max(prior_cents, target_cents). Replay the original Idempotency-Key and request body for read-back only recovery; no new issuer write is sent."},"expiration":{"type":["string","null"],"description":"YYYY-MM, learned from the issuer at issuance or sync; null until then."}},"required":["id"]},"Deposit":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"bridge_intent_id":{"type":"string"},"provider_state":{"type":"string"},"settlement_kind":{"enum":["bridge_bank_payout"]},"provider_fees":{"type":"object","properties":{"developer_cents":{"type":"integer"},"exchange_cents":{"type":"integer"},"gas_cents":{"type":"integer"}}},"requires_reconciliation":{"type":"boolean"},"tenant_id":{"type":"string"},"holder_id":{"type":"string","description":"Optional terminal cardholder receiving this deposit. Omitted on the existing customer-credit flow. Final credit still requires default-budget synchronization before it is spendable."},"amount_cents":{"type":"integer"},"credited_cents":{"type":"integer"},"asset":{"enum":["USDC","USDT"]},"network":{"enum":["ethereum","bsc"]},"channel":{"enum":["brex","bill"]},"address":{"type":"string"},"token_contract":{"type":"string"},"chain_id":{"type":"integer"},"address_index":{"type":"integer"},"received_cents":{"type":"integer"},"block_number":{"type":"integer"},"provider_reference":{"type":"string"},"status":{"enum":["awaiting_payment","confirming","confirmed","converting","channel_settled","credited"]},"confirmations":{"type":"integer"},"confirmations_required":{"type":"integer"},"tx_hash":{"type":"string"},"settlement_reference":{"type":"string"},"net_cents":{"type":"integer"},"fee_cents":{"type":["integer","null"]},"rate":{"type":["string","null"]},"source":{"enum":["operator","bridge"],"description":"operator: an operator recorded an off-platform settlement. bridge: a verified Bridge bank payout, not an issuer bill payment."},"note":{"type":"string"},"mock":{"type":"boolean"}},"required":["id"]},"Transaction":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"channel":{"enum":["bill","brex"]},"issuer_sequence":{"type":"integer"},"provider_transaction_id":{"type":"string"},"card_id":{"type":"string"},"project_id":{"type":"string"},"merchant":{"type":["string","null"],"description":"null when the issuer sent no merchant name"},"amount_cents":{"type":"integer"},"settled_cents":{"type":"integer"},"refunded_cents":{"type":"integer"},"status":{"enum":["authorized","declined","settled","reversed","partially_refunded","refunded"]},"decline_reason":{"type":["string","null"],"enum":[null,"insufficient_budget","card_inactive","card_limit_exceeded"],"description":"insufficient_budget: the project pool cannot cover the amount. card_inactive: the card is not active (frozen, closed or pending). card_limit_exceeded: the card limit cannot cover it; refunds do not restore it. null when authorized."}},"required":["id"]},"Event":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"type":{"type":"string"},"data":{"type":"object"}},"required":["id"]},"Challenge":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"channel":{"enum":["bill","brex"]},"card_id":{"type":"string"},"provider_challenge_id":{"type":"string"},"merchant":{"type":["string","null"],"description":"null when the issuer sent no merchant name"},"amount_cents":{"type":["integer","null"],"description":"USD cents for display only; null for foreign currencies or an unknown amount. Never posted to the ledger."},"status":{"enum":["pending","accepted","rejected"],"description":"The challenge decision, not the payment outcome. Query transactions separately."},"decision_op":{"type":"string","description":"Present while a Live decision is in progress or its outcome is unknown. Do not submit another decision, even with a new key; reconcile the original operation."},"occurred_at":{"type":["string","null"]},"answered_at":{"type":"string","format":"date-time"}},"required":["id"]},"CardSecureDetails":{"type":"object","required":["delivery","number"],"properties":{"delivery":{"enum":["number"]},"number":{"type":"string"},"cvv":{"type":["string","null"]},"expiration":{"type":["string","null"]},"mock":{"type":"boolean"}}},"IssuerEvent":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"ordinal":{"type":"integer","description":"Stream position, present when listed with ?since=; pass the last one back as since to continue."},"channel":{"enum":["bill","brex"]},"card_id":{"type":"string"},"transaction_id":{"type":"string"},"status":{"enum":["waiting","applied","failed"]},"attempts":{"type":"integer"},"error_code":{"type":["string","null"]},"fingerprint":{"type":"string","description":"SHA-256 of the normalized payload; a resend with the same event_id must match it"},"duplicate":{"type":"boolean","description":"true when the event_id was already received"},"payload":{"type":"object","properties":{"event_id":{"type":"string"},"provider_card_id":{"type":"string"},"provider_transaction_id":{"type":"string"},"sequence":{"type":"integer"},"type":{"enum":["authorized","declined","settled","reversed","refunded","settled_additional"]},"amount_cents":{"type":"integer"},"merchant":{"type":["string","null"],"description":"null when the issuer sent no merchant name"}}}},"required":["id"]},"Reconciliation":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"status":{"enum":["passed","needs_attention"]},"scope":{"enum":["local_ledger_and_events","upstream_transactions","upstream_credit","funding_chain"]},"channel":{"enum":["bill","brex"]},"scanned_rows":{"type":"integer"},"other_tenant_rows":{"type":"integer"},"upstream_verified":{"const":false},"checked_projects":{"type":"integer"},"findings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"resource":{"type":"string"},"expected":{},"actual":{}}}}},"required":["id"]},"WebhookDelivery":{"type":"object","required":["id","endpoint","attempts","status"],"properties":{"id":{"type":"string"},"endpoint":{"type":"string","description":"Webhook endpoint ID (wh_…)"},"attempts":{"type":"integer"},"status":{"enum":["pending","retry","delivered","dead","cancelled"]},"next_at":{"type":"integer","description":"Next attempt time, Unix milliseconds"},"last_code":{"type":["integer","null"],"description":"HTTP status of the last attempt; 0 when the endpoint was unreachable"}}},"Capabilities":{"type":"object","properties":{"mode":{"enum":["mock","live"]},"brex":{"type":"object","description":"Brex capability flags and verification states"},"bill":{"type":"object","description":"BILL capability flags and verification states"},"write_interval_ms":{"type":"object","additionalProperties":{"type":"integer"}},"cross_channel_pool":{"enum":["simulated_only","unsupported"]},"funding":{"type":"string"},"withdrawal":{"type":"object","required":["fee_cents","min_cents"],"description":"Deployment-wide withdrawal terms in integer USD cents: fee_cents is kept from every withdrawal; min_cents is the configured floor, and a withdrawal must be at least min_cents and more than fee_cents, else 422 withdrawal_below_minimum","properties":{"fee_cents":{"type":"integer","minimum":0},"min_cents":{"type":"integer","minimum":0}}}}},"ApiKey":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"scopes":{"type":"array","items":{"enum":["read","write","keys","webhooks","secrets","withdraw"]},"description":"secrets (reads card numbers) and withdraw (submits withdrawals) are only granted when explicitly requested."},"revoked":{"enum":[0,1]},"created":{"type":"string","format":"date-time"},"expires_at":{"type":["string","null"]},"last_used_at":{"type":["string","null"]}}},"ApiKeyCreated":{"type":"object","required":["id","token","scopes","prefix"],"properties":{"id":{"type":"string"},"token":{"type":"string"},"scopes":{"type":"array","items":{"enum":["read","write","keys","webhooks","secrets","withdraw"]}},"prefix":{"type":"string"},"expires_at":{"type":["string","null"]}}},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"secret":{"type":"string","description":"Returned by POST /v1/webhooks only"}},"required":["id"]},"RequestLog":{"type":"object","properties":{"id":{"type":"string"},"tenant":{"type":"string"},"method":{"type":"string"},"path":{"type":"string"},"status":{"type":"integer"},"duration":{"type":"integer","description":"Milliseconds"},"created":{"type":"string","format":"date-time"}}},"LedgerEntry":{"type":"object","properties":{"id":{"type":"string"},"tenant":{"type":"string"},"reference":{"type":"string","description":"ID of the resource that moved the money"},"debit":{"type":"string"},"credit":{"type":"string"},"amount":{"type":"integer","description":"USD cents"},"created":{"type":"string","format":"date-time"}}},"Operation":{"type":"object","properties":{"key":{"type":"string","description":"The Idempotency-Key"},"status":{"enum":["pending","done","failed","unknown"]},"created":{"type":"string","format":"date-time"}}},"BalanceTransfer":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"source_channel":{"enum":["bill","brex"]},"destination_channel":{"enum":["bill","brex"]},"amount_cents":{"type":"integer"},"currency":{"const":"USD"},"status":{"const":"completed"},"kind":{"const":"internal_credit_allocation"}},"required":["id"]},"Withdrawal":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"channel":{"enum":["bill","brex"]},"network":{"const":"bsc"},"asset":{"const":"USDT"},"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Full payout address in EIP-55 form; webhook events only carry its last four characters"},"amount_cents":{"type":"integer","minimum":1,"description":"Frozen from the wallet at submission"},"fee_cents":{"type":"integer","minimum":0,"description":"Fixed at submission"},"payout_cents":{"type":"integer","minimum":1,"description":"amount_cents minus fee_cents: what the address receives"},"currency":{"const":"USD"},"status":{"enum":["pending_review","approved","rejected","completed"]},"approved_at":{"type":"string","format":"date-time"},"approved_by":{"type":"string"},"rejected_at":{"type":"string","format":"date-time"},"rejected_by":{"type":"string"},"tx_hash":{"type":"string","pattern":"^0x[0-9a-f]{64}$"},"completed_at":{"type":"string","format":"date-time"},"completed_by":{"type":"string"},"block_number":{"type":"integer"},"block_hash":{"type":"string","pattern":"^0x[0-9a-f]{64}$"},"log_index":{"type":"integer"},"confirmations":{"type":"integer","minimum":1},"block_time":{"type":"string","format":"date-time"},"mock":{"const":true},"proof_mismatch":{"type":"object","additionalProperties":false,"required":["code","tx_hash","items","checked_at"],"description":"The latest failed check of an approved withdrawal; removed on completion","properties":{"code":{"enum":["chain_id","tx_failed","token_contract","recipient","self_transfer","amount","before_approval","tx_already_used"]},"tx_hash":{"type":"string","pattern":"^0x[0-9a-f]{64}$"},"items":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["field","expected","actual"],"properties":{"field":{"enum":["chain_id","receipt_status","token_contract","to","from","amount_cents","block_time","tx_hash"]},"expected":{"type":["string","integer"]},"actual":{"type":["string","integer","array"],"items":{"type":["string","integer","null"]}}}}},"checked_at":{"type":"string","format":"date-time"}}}},"required":["id","channel","network","asset","address","amount_cents","fee_cents","payout_cents","currency","status","created_at"]},"ProjectGroup":{"type":"object","properties":{"group":{"type":"string"},"shared_limit":{"const":false,"description":"Always false. The amounts sum separate project budgets from the local ledger; each channel declines a card on its own project and never draws on another project or channel in the group."},"project_count":{"type":"integer"},"budget_cents":{"type":"integer"},"available_cents":{"type":"integer"},"held_cents":{"type":"integer"},"spent_cents":{"type":"integer"},"channels":{"type":"array","description":"Subtotals for each channel present in the group.","items":{"type":"object","properties":{"channel":{"enum":["bill","brex","mixed"]},"project_count":{"type":"integer"},"budget_cents":{"type":"integer"},"available_cents":{"type":"integer"},"held_cents":{"type":"integer"},"spent_cents":{"type":"integer"}},"required":["channel","project_count","budget_cents","available_cents","held_cents","spent_cents"]}},"projects":{"type":"array","description":"Member projects, closing and archived ones included (GET /v1/project-groups/{group} only).","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"channel":{"enum":["bill","brex","mixed"]},"status":{"enum":["closing","archived"],"description":"Absent while active."},"limit_period":{"enum":["monthly"],"description":"Absent on a one-time project."},"budget_cents":{"type":"integer"},"available_cents":{"type":"integer"},"held_cents":{"type":"integer"},"spent_cents":{"type":"integer"}},"required":["id","name","channel","budget_cents","available_cents","held_cents","spent_cents"]}}},"required":["group","shared_limit","project_count","budget_cents","available_cents","held_cents","spent_cents","channels"]},"FundsFlowEntry":{"type":"object","properties":{"id":{"type":"string","description":"Ledger entry ID"},"created_at":{"type":"string","format":"date-time"},"type":{"enum":["deposit","spend","refund","project_allocation","project_release","authorization_hold","authorization_release","channel_transfer","withdrawal_hold","withdrawal_release","withdrawal","other"],"description":"Stable code; more may be added, so treat an unknown value as other."},"direction":{"enum":["in","out","internal"]},"amount_cents":{"type":"integer","minimum":1,"description":"Always positive. direction gives its sign: in adds to your funds, out takes from them, internal moves them between your own balances."},"reference":{"type":"string","description":"ID of the record that booked the entry"},"project_id":{"type":["string","null"]},"card_id":{"type":["string","null"]},"transaction_id":{"type":["string","null"]},"merchant":{"type":["string","null"]},"channel":{"enum":["bill","brex",null]}},"required":["id","created_at","type","direction","amount_cents","reference","project_id","card_id","transaction_id","merchant","channel"]},"MerchantSpend":{"type":"object","properties":{"merchant":{"type":["string","null"],"description":"One spelling of the merchant; null groups transactions without one."},"spent_cents":{"type":"integer"},"refunded_cents":{"type":"integer"},"net_cents":{"type":"integer","description":"spent_cents minus refunded_cents"},"transaction_count":{"type":"integer"}},"required":["merchant","spent_cents","refunded_cents","net_cents","transaction_count"]},"FundsSummary":{"type":"object","properties":{"total_deposited_cents":{"type":"integer"},"total_spent_cents":{"type":"integer"},"total_refunded_cents":{"type":"integer"},"available_cents":{"type":"integer"},"wallet_available_cents":{"type":"integer"},"holder_wallet_unallocated_cents":{"type":"integer"},"holder_wallet_pending_cents":{"type":"integer"},"holder_wallet_available_cents":{"type":"integer"},"holder_wallet_held_cents":{"type":"integer"},"project_available_cents":{"type":"integer"},"held_cents":{"type":"integer"},"withdrawal_pending_cents":{"type":"integer"},"total_withdrawn_cents":{"type":"integer"},"currency":{"const":"USD"}},"required":["total_deposited_cents","total_spent_cents","total_refunded_cents","available_cents","wallet_available_cents","holder_wallet_unallocated_cents","holder_wallet_pending_cents","holder_wallet_available_cents","holder_wallet_held_cents","project_available_cents","held_cents","withdrawal_pending_cents","total_withdrawn_cents","currency"]},"Balance":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"balance_cents":{"type":"integer"},"allocated_available_cents":{"type":"integer"},"held_cents":{"type":"integer"},"spent_cents":{"type":"integer"},"holder_wallet_unallocated_cents":{"type":"integer"},"holder_wallet_pending_cents":{"type":"integer"},"holder_wallet_available_cents":{"type":"integer"},"holder_wallet_held_cents":{"type":"integer"},"currency":{"const":"USD"},"channel_balances":{"type":"object","properties":{"bill":{"type":"integer"},"brex":{"type":"integer"}}}},"required":["id"]}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key"}}}}