{"openapi":"3.1.0","info":{"title":"GET /api/v1/credit/cards/stripe-issuing/status","version":"1.0.0","description":"Inspect Stripe Issuing approval, balance, and webhook status"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/credit/cards/stripe-issuing/status":{"get":{"tags":["credit"],"summary":"Inspect Stripe Issuing approval, balance, and webhook status","description":"Checks whether the platform (or a connected `stripe_account_id`) is approved for Stripe Issuing (`card_issuing` capability), whether the Charge Card private preview (`funding_credit` / `issuing_credit_beta=v1`) is enabled, the available Issuing balance, any due onboarding fields, and whether `/api/v1/webhooks/stripe` is subscribed to all required `issuing_*` events. Accounts must belong to this business. Platform access requires a signed-in superuser; sandbox businesses use the mock card engine.","operationId":"get_stripe_issuing_status","parameters":[{"name":"stripe_account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Owned Stripe account ID (`acct_...`); defaults to the business connection. Platform access is signed-in superuser only.","title":"Stripe Account Id"},"description":"Owned Stripe account ID (`acct_...`); defaults to the business connection. Platform access is signed-in superuser only."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-business-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Business-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope_CreditStripeIssuingStatusResponse_"}}}},"401":{"description":"Unauthorized - Missing or expired token, an MCP OAuth token used against the REST API, or no access to this business","content":{"application/json":{"example":{"error":"unauthorized","message":"Authentication required","code":"AUTH_001","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"error":"forbidden","message":"You don't have permission to access this resource","code":"AUTH_002","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"validation_error","message":"Validation failed: amount: Input should be a valid integer","errors":{"amount":"Input should be a valid integer"},"code":"GEN_002","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"}}}}},"x-fastapi-operation-id":"get_stripe_issuing_status_api_v1_credit_cards_stripe_issuing_status_get"}}},"components":{"schemas":{"CreditStripeIssuingStatusResponse":{"properties":{"configured":{"type":"boolean","title":"Configured","description":"Whether STRIPE_API_KEY is configured in the environment."},"livemode":{"type":"boolean","title":"Livemode","description":"True when the configured Stripe API key is a live-mode key (`sk_live_...`)."},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id","description":"Stripe account ID (`acct_...`) inspected."},"business_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Name","description":"Business profile or dashboard display name on the Stripe account."},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"Two-letter country code of the Stripe account."},"card_issuing_capability":{"type":"string","title":"Card Issuing Capability","description":"Status of the `card_issuing` capability (`active`, `pending`, `inactive`, `unrequested`).","default":"unrequested"},"transfers_capability":{"type":"string","title":"Transfers Capability","description":"Status of the `transfers` capability (`active`, `pending`, `inactive`, `unrequested`).","default":"unrequested"},"issuing_api_accessible":{"type":"boolean","title":"Issuing Api Accessible","description":"Whether `stripe.issuing.Cardholder.list` and `stripe.issuing.Card.list` succeed on this account.","default":false},"funding_credit_beta_enabled":{"type":"boolean","title":"Funding Credit Beta Enabled","description":"Whether the Stripe Issuing Credit (`issuing_credit_beta=v1`) Charge Card feature is enabled.","default":false},"tos_accepted":{"type":"boolean","title":"Tos Accepted","description":"Whether `settings.card_issuing.tos_acceptance` has a recorded acceptance timestamp.","default":false},"issuing_balance_available_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Issuing Balance Available Cents","description":"Available balance in the Stripe Issuing funding balance, in integer cents."},"issuing_balance_currency":{"type":"string","title":"Issuing Balance Currency","description":"Three-letter currency code of the Stripe Issuing balance.","default":"USD"},"currently_due_requirements":{"items":{"type":"string"},"type":"array","title":"Currently Due Requirements","description":"Stripe capability onboarding fields currently due to activate `card_issuing`."},"past_due_requirements":{"items":{"type":"string"},"type":"array","title":"Past Due Requirements","description":"Stripe capability onboarding fields past due for `card_issuing`."},"disabled_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disabled Reason","description":"Reason Stripe reports when `card_issuing` is not yet active."},"webhook_configured":{"type":"boolean","title":"Webhook Configured","description":"Whether an active `/api/v1/webhooks/stripe` endpoint is subscribed to all required `issuing_*` events.","default":false},"missing_webhook_events":{"items":{"type":"string"},"type":"array","title":"Missing Webhook Events","description":"Required `issuing_*` webhook events not yet enabled on `/api/v1/webhooks/stripe`."},"cardholder_count_sample":{"type":"integer","title":"Cardholder Count Sample","description":"Sample count of Stripe Issuing cardholders (`ich_...`) on the account (up to 5).","default":0},"card_count_sample":{"type":"integer","title":"Card Count Sample","description":"Sample count of Stripe Issuing cards (`ic_...`) on the account (up to 5).","default":0},"ready_for_issuing":{"type":"boolean","title":"Ready For Issuing","description":"True when `issuing_api_accessible` is true and `card_issuing_capability` is `active`.","default":false},"ready_for_funding_credit":{"type":"boolean","title":"Ready For Funding Credit","description":"True when both `ready_for_issuing` and `funding_credit_beta_enabled` are true.","default":false},"next_steps":{"items":{"type":"string"},"type":"array","title":"Next Steps","description":"Actionable items required to finish activating or funding Stripe Issuing."}},"type":"object","required":["configured","livemode"],"title":"CreditStripeIssuingStatusResponse","description":"Live inspection of the Stripe account's Issuing capabilities, balance, and webhook subscriptions."},"SuccessEnvelope_CreditStripeIssuingStatusResponse_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"data":{"anyOf":[{"$ref":"#/components/schemas/CreditStripeIssuingStatusResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[CreditStripeIssuingStatusResponse]"},"ErrorResponse":{"title":"ErrorResponse","type":"object","description":"Envelope returned by every non-2xx response. Branch on `code` (stable) rather than `message` (human-readable, may change).","required":["error","message","code"],"properties":{"error":{"type":"string","description":"Error category: `validation_error`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `rate_limited`, `server_error`, or `service_unavailable`."},"message":{"type":"string","description":"Human-readable explanation, safe to show to end users."},"code":{"type":"string","description":"Stable machine-readable code in `CATEGORY_NNN` form (e.g. `NOT_FOUND_006`, `AUTH_010`, `GEN_002`)."},"request_id":{"type":"string","description":"Correlation id for support requests. Echoes the `x-request-id` request header when one was supplied."},"errors":{"type":"object","additionalProperties":{"type":"string"},"description":"Field-level validation messages keyed by field name. Present on 400/422 validation failures only."}}}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}