{"openapi":"3.1.0","info":{"title":"Prism Bank API","version":"2.0.0","description":"Build your own tools against your own Prism Bank data. See https://www.prism-bank.com/developers for the full guide."},"servers":[{"url":"https://www.prism-bank.com/api/public/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Your API key, from /dashboard/developer."}},"schemas":{"Account":{"type":"object","properties":{"object":{"type":"string","enum":["account"]},"id":{"type":"string"},"accountNumber":{"type":"string"},"nickname":{"type":["string","null"]},"type":{"type":"string","example":"PERSONAL"},"status":{"type":"string","example":"ACTIVE"},"balance":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"createdAt":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"}}},"Transaction":{"type":"object","properties":{"object":{"type":"string","enum":["transaction"]},"id":{"type":"string"},"type":{"type":"string","example":"TRANSFER_IN"},"status":{"type":"string","example":"COMPLETED"},"amount":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"balanceAfter":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"description":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"}}},"Transfer":{"type":"object","properties":{"object":{"type":"string","enum":["transfer"]},"fromAccountId":{"type":"string"},"toAccountId":{"type":["string","null"]},"toAccountNumber":{"type":["string","null"]},"amount":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"balanceAfter":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"memo":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"}}},"Card":{"type":"object","properties":{"object":{"type":"string","enum":["card"]},"id":{"type":"string"},"type":{"type":"string","example":"CREDIT"},"status":{"type":"string","example":"ACTIVE"},"tier":{"type":["string","null"],"example":"QUARTZ"},"creditLimit":{"type":["string","null"]},"outstandingBalance":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"expiresAt":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"}}},"Loan":{"type":"object","properties":{"object":{"type":"string","enum":["loan"]},"id":{"type":"string"},"status":{"type":"string","example":"ACTIVE"},"principal":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"outstandingPrincipal":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"interestRateBps":{"type":"integer"},"termMonths":{"type":"integer"},"nextPaymentDueDate":{"type":["string","null"],"format":"date-time"},"nextPaymentAmount":{"type":["string","null"]},"disbursedAt":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"}}},"Invoice":{"type":"object","properties":{"object":{"type":"string","enum":["invoice"]},"id":{"type":"string"},"number":{"type":"string"},"status":{"type":"string","example":"SENT"},"total":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"dueDate":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"},"paidAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"}}},"PaymentRequest":{"type":"object","properties":{"object":{"type":"string","enum":["payment_request"]},"id":{"type":"string"},"status":{"type":"string","example":"PENDING"},"amount":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"memo":{"type":["string","null"]},"expiresAt":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"},"resolvedAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"}}},"GatewayPayment":{"type":"object","properties":{"object":{"type":"string","enum":["gateway_payment"]},"id":{"type":"string"},"status":{"type":"string","example":"SETTLED"},"amount":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"feeAmount":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"netAmount":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"createdAt":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"}}},"Error":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}},"paths":{"/accounts":{"get":{"summary":"List accounts","operationId":"listAccounts","security":[{"bearerAuth":["accounts:read"]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":25,"maximum":100}},{"name":"starting_after","in":"query","schema":{"type":"string"},"description":"A resource id — returns results after it."}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests remaining in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix timestamp when the window resets."}},"content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","required":["object","data","has_more"],"properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["account"]},"id":{"type":"string"},"accountNumber":{"type":"string"},"nickname":{"type":["string","null"]},"type":{"type":"string","example":"PERSONAL"},"status":{"type":"string","example":"ACTIVE"},"balance":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"createdAt":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"}}}},"has_more":{"type":"boolean"}}}}}}}},"400":{"description":"invalid_request_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"401":{"description":"authentication_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"403":{"description":"permission_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"404":{"description":"not_found_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"422":{"description":"business_rule_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"429":{"description":"rate_limit_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}}}}},"/accounts/{id}":{"get":{"summary":"Get an account","operationId":"getAccount","security":[{"bearerAuth":["accounts:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests remaining in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix timestamp when the window resets."}},"content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"object":{"type":"string","enum":["account"]},"id":{"type":"string"},"accountNumber":{"type":"string"},"nickname":{"type":["string","null"]},"type":{"type":"string","example":"PERSONAL"},"status":{"type":"string","example":"ACTIVE"},"balance":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"createdAt":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"}}}}}}}},"400":{"description":"invalid_request_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"401":{"description":"authentication_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"403":{"description":"permission_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"404":{"description":"not_found_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"422":{"description":"business_rule_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"429":{"description":"rate_limit_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}}}}},"/accounts/{id}/transactions":{"get":{"summary":"List an account's transactions","operationId":"listAccountTransactions","security":[{"bearerAuth":["transactions:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":25,"maximum":100}},{"name":"starting_after","in":"query","schema":{"type":"string"},"description":"A resource id — returns results after it."}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests remaining in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix timestamp when the window resets."}},"content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","required":["object","data","has_more"],"properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["transaction"]},"id":{"type":"string"},"type":{"type":"string","example":"TRANSFER_IN"},"status":{"type":"string","example":"COMPLETED"},"amount":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"balanceAfter":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"description":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"}}}},"has_more":{"type":"boolean"}}}}}}}},"400":{"description":"invalid_request_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"401":{"description":"authentication_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"403":{"description":"permission_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"404":{"description":"not_found_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"422":{"description":"business_rule_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"429":{"description":"rate_limit_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}}}}},"/transfers":{"post":{"summary":"Create a transfer","operationId":"createTransfer","description":"Idempotent — send an Idempotency-Key header to safely retry.","security":[{"bearerAuth":["transfers:write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retried requests with the same key replay the original response instead of re-running the operation."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["fromAccountId","amount"],"properties":{"fromAccountId":{"type":"string"},"amount":{"type":"string","description":"Positive decimal string."},"toAccountId":{"type":"string","description":"One of your own accounts."},"toAccountNumber":{"type":"string","description":"Another account's number."},"memo":{"type":"string","maxLength":500}},"description":"Provide exactly one of toAccountId or toAccountNumber."}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests remaining in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix timestamp when the window resets."}},"content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"object":{"type":"string","enum":["transfer"]},"fromAccountId":{"type":"string"},"toAccountId":{"type":["string","null"]},"toAccountNumber":{"type":["string","null"]},"amount":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"balanceAfter":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"memo":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"}}}}}}}},"400":{"description":"invalid_request_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"401":{"description":"authentication_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"403":{"description":"permission_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"404":{"description":"not_found_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"422":{"description":"business_rule_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"429":{"description":"rate_limit_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}}}}},"/cards":{"get":{"summary":"List cards","operationId":"listCards","security":[{"bearerAuth":["cards:read"]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":25,"maximum":100}},{"name":"starting_after","in":"query","schema":{"type":"string"},"description":"A resource id — returns results after it."}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests remaining in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix timestamp when the window resets."}},"content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","required":["object","data","has_more"],"properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["card"]},"id":{"type":"string"},"type":{"type":"string","example":"CREDIT"},"status":{"type":"string","example":"ACTIVE"},"tier":{"type":["string","null"],"example":"QUARTZ"},"creditLimit":{"type":["string","null"]},"outstandingBalance":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"expiresAt":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"}}}},"has_more":{"type":"boolean"}}}}}}}},"400":{"description":"invalid_request_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"401":{"description":"authentication_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"403":{"description":"permission_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"404":{"description":"not_found_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"422":{"description":"business_rule_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"429":{"description":"rate_limit_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}}}}},"/loans":{"get":{"summary":"List loans","operationId":"listLoans","security":[{"bearerAuth":["loans:read"]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":25,"maximum":100}},{"name":"starting_after","in":"query","schema":{"type":"string"},"description":"A resource id — returns results after it."}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests remaining in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix timestamp when the window resets."}},"content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","required":["object","data","has_more"],"properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["loan"]},"id":{"type":"string"},"status":{"type":"string","example":"ACTIVE"},"principal":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"outstandingPrincipal":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"interestRateBps":{"type":"integer"},"termMonths":{"type":"integer"},"nextPaymentDueDate":{"type":["string","null"],"format":"date-time"},"nextPaymentAmount":{"type":["string","null"]},"disbursedAt":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"}}}},"has_more":{"type":"boolean"}}}}}}}},"400":{"description":"invalid_request_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"401":{"description":"authentication_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"403":{"description":"permission_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"404":{"description":"not_found_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"422":{"description":"business_rule_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"429":{"description":"rate_limit_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}}}}},"/invoices":{"get":{"summary":"List invoices","operationId":"listInvoices","security":[{"bearerAuth":["invoices:read"]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":25,"maximum":100}},{"name":"starting_after","in":"query","schema":{"type":"string"},"description":"A resource id — returns results after it."}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests remaining in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix timestamp when the window resets."}},"content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","required":["object","data","has_more"],"properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["invoice"]},"id":{"type":"string"},"number":{"type":"string"},"status":{"type":"string","example":"SENT"},"total":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"dueDate":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"},"paidAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"}}}},"has_more":{"type":"boolean"}}}}}}}},"400":{"description":"invalid_request_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"401":{"description":"authentication_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"403":{"description":"permission_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"404":{"description":"not_found_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"422":{"description":"business_rule_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"429":{"description":"rate_limit_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}}}}},"/gateway/payments":{"post":{"summary":"Pay a merchant","operationId":"createGatewayPayment","description":"Idempotent — send an Idempotency-Key header to safely retry.","security":[{"bearerAuth":["gateway:write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retried requests with the same key replay the original response instead of re-running the operation."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["merchantAccountNumber","payerBankAccountId","amount"],"properties":{"merchantAccountNumber":{"type":"string"},"payerBankAccountId":{"type":"string"},"amount":{"type":"string"},"reference":{"type":"string","maxLength":200},"description":{"type":"string","maxLength":500}}}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests remaining in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix timestamp when the window resets."}},"content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"object":{"type":"string","enum":["gateway_payment"]},"id":{"type":"string"},"status":{"type":"string","example":"SETTLED"},"amount":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"feeAmount":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"netAmount":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"createdAt":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"}}}}}}}},"400":{"description":"invalid_request_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"401":{"description":"authentication_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"403":{"description":"permission_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"404":{"description":"not_found_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"422":{"description":"business_rule_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"429":{"description":"rate_limit_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}}}}},"/pay/requests":{"get":{"summary":"List payment requests addressed to you","operationId":"listPaymentRequests","security":[{"bearerAuth":["accounts:read"]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":25,"maximum":100}},{"name":"starting_after","in":"query","schema":{"type":"string"},"description":"A resource id — returns results after it."}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests remaining in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix timestamp when the window resets."}},"content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","required":["object","data","has_more"],"properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["payment_request"]},"id":{"type":"string"},"status":{"type":"string","example":"PENDING"},"amount":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"memo":{"type":["string","null"]},"expiresAt":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"},"resolvedAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"}}}},"has_more":{"type":"boolean"}}}}}}}},"400":{"description":"invalid_request_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"401":{"description":"authentication_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"403":{"description":"permission_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"404":{"description":"not_found_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"422":{"description":"business_rule_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"429":{"description":"rate_limit_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}}}}},"/pay/requests/{id}/approve":{"post":{"summary":"Approve a payment request","operationId":"approvePaymentRequest","description":"Idempotent — send an Idempotency-Key header to safely retry.","security":[{"bearerAuth":["transfers:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retried requests with the same key replay the original response instead of re-running the operation."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["fromAccountId"],"properties":{"fromAccountId":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests remaining in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix timestamp when the window resets."}},"content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"object":{"type":"string","enum":["payment_request"]},"id":{"type":"string"},"status":{"type":"string","example":"PENDING"},"amount":{"type":"string","description":"A decimal dollar amount, always 2 decimal places.","example":"1234.56"},"memo":{"type":["string","null"]},"expiresAt":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"},"resolvedAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"}}}}}}}},"400":{"description":"invalid_request_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"401":{"description":"authentication_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"403":{"description":"permission_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"404":{"description":"not_found_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"422":{"description":"business_rule_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}},"429":{"description":"rate_limit_error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","business_rule_error","rate_limit_error","api_error"]},"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"param":{"type":"string"}}}}}}}}}}}}}