{"openapi":"3.1.0","info":{"title":"us-pay API","description":"Payments + recurring billing platform for US small businesses.","version":"0.1.0"},"paths":{"/health":{"get":{"tags":["meta"],"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Health Get"}}}}}}},"/v1/orgs":{"get":{"tags":["orgs"],"summary":"List Orgs","operationId":"list_orgs_v1_orgs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrgOut"},"type":"array","title":"Response List Orgs V1 Orgs Get"}}}}}},"post":{"tags":["orgs"],"summary":"Create Org","operationId":"create_org_v1_orgs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orgs/{org_id}":{"get":{"tags":["orgs"],"summary":"Get Org","operationId":"get_org_v1_orgs__org_id__get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/api-keys":{"post":{"tags":["api-keys"],"summary":"Create Key","operationId":"create_key_v1_api_keys_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["api-keys"],"summary":"List Keys","operationId":"list_keys_v1_api_keys_get","parameters":[{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KeyInfo"},"title":"Response List Keys V1 Api Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/api-keys/{key_id}":{"delete":{"tags":["api-keys"],"summary":"Revoke Key","operationId":"revoke_key_v1_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Revoke Key V1 Api Keys  Key Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/me":{"get":{"tags":["auth"],"summary":"Me","description":"Validate the bearer API key and return the owning org.\n\nFrontend uses this to bootstrap the dashboard from a single secret.","operationId":"me_v1_auth_me_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/merchants/onboard":{"post":{"tags":["merchants"],"summary":"Onboard","operationId":"onboard_v1_merchants_onboard_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/merchants/{org_id}":{"get":{"tags":["merchants"],"summary":"Get Merchant","operationId":"get_merchant_v1_merchants__org_id__get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/customers":{"post":{"tags":["customers"],"summary":"Create Customer","operationId":"create_customer_v1_customers_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["customers"],"summary":"List Customers","operationId":"list_customers_v1_customers_get","parameters":[{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerOut"},"title":"Response List Customers V1 Customers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/customers/{customer_id}":{"get":{"tags":["customers"],"summary":"Get Customer","operationId":"get_customer_v1_customers__customer_id__get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/plans":{"post":{"tags":["plans"],"summary":"Create Plan","operationId":"create_plan_v1_plans_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["plans"],"summary":"List Plans","operationId":"list_plans_v1_plans_get","parameters":[{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PlanOut"},"title":"Response List Plans V1 Plans Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/plans/{plan_id}":{"delete":{"tags":["plans"],"summary":"Deactivate","operationId":"deactivate_v1_plans__plan_id__delete","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Deactivate V1 Plans  Plan Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subscriptions":{"post":{"tags":["subscriptions"],"summary":"Subscribe","operationId":"subscribe_v1_subscriptions_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["subscriptions"],"summary":"List Subs","operationId":"list_subs_v1_subscriptions_get","parameters":[{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubOut"},"title":"Response List Subs V1 Subscriptions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subscriptions/{sub_id}/pause":{"post":{"tags":["subscriptions"],"summary":"Pause","operationId":"pause_v1_subscriptions__sub_id__pause_post","parameters":[{"name":"sub_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sub Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subscriptions/{sub_id}/cancel":{"post":{"tags":["subscriptions"],"summary":"Cancel","operationId":"cancel_v1_subscriptions__sub_id__cancel_post","parameters":[{"name":"sub_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sub Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/charges":{"post":{"tags":["charges"],"summary":"Create Charge","operationId":"create_charge_v1_charges_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChargeIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChargeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["charges"],"summary":"List Charges","operationId":"list_charges_v1_charges_get","parameters":[{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChargeOut"},"title":"Response List Charges V1 Charges Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/charges/{charge_id}":{"get":{"tags":["charges"],"summary":"Get Charge","operationId":"get_charge_v1_charges__charge_id__get","parameters":[{"name":"charge_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Charge Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChargeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/charges/{charge_id}/refund":{"post":{"tags":["charges"],"summary":"Refund Charge","operationId":"refund_charge_v1_charges__charge_id__refund_post","parameters":[{"name":"charge_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Charge Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChargeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/checkout/{charge_id}":{"get":{"tags":["checkout"],"summary":"Get Checkout","operationId":"get_checkout_v1_checkout__charge_id__get","parameters":[{"name":"charge_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Charge Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/checkout/{charge_id}/intent":{"post":{"tags":["checkout"],"summary":"Create Checkout Intent","description":"Cria o PaymentIntent pro Stripe Elements e devolve o client_secret.","operationId":"create_checkout_intent_v1_checkout__charge_id__intent_post","parameters":[{"name":"charge_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Charge Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/checkout/{charge_id}/confirm":{"post":{"tags":["checkout"],"summary":"Confirm Checkout","operationId":"confirm_checkout_v1_checkout__charge_id__confirm_post","parameters":[{"name":"charge_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Charge Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Confirm Checkout V1 Checkout  Charge Id  Confirm Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/rainforest":{"post":{"tags":["webhooks"],"summary":"Rainforest Webhook","operationId":"rainforest_webhook_v1_webhooks_rainforest_post","parameters":[{"name":"x-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Rainforest Webhook V1 Webhooks Rainforest Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhook-endpoints":{"post":{"tags":["webhooks"],"summary":"Create","operationId":"create_v1_webhook_endpoints_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Out"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["webhooks"],"summary":"List Eps","operationId":"list_eps_v1_webhook_endpoints_get","parameters":[{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Out"},"title":"Response List Eps V1 Webhook Endpoints Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhook-endpoints/{ep_id}":{"delete":{"tags":["webhooks"],"summary":"Delete Ep","operationId":"delete_ep_v1_webhook_endpoints__ep_id__delete","parameters":[{"name":"ep_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ep Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Ep V1 Webhook Endpoints  Ep Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhook-endpoints/{ep_id}/test":{"post":{"tags":["webhooks"],"summary":"Test Endpoint","description":"Dispara um evento de teste pro endpoint do merchant. Útil pro merchant\nvalidar HMAC antes de subir pra produção.","operationId":"test_endpoint_v1_webhook_endpoints__ep_id__test_post","parameters":[{"name":"ep_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ep Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Test Endpoint V1 Webhook Endpoints  Ep Id  Test Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhook-endpoints/{ep_id}/deliveries":{"get":{"tags":["webhooks"],"summary":"List Deliveries","operationId":"list_deliveries_v1_webhook_endpoints__ep_id__deliveries_get","parameters":[{"name":"ep_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ep Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryOut"},"title":"Response List Deliveries V1 Webhook Endpoints  Ep Id  Deliveries Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhook-endpoints/{ep_id}/deliveries/{delivery_id}/retry":{"post":{"tags":["webhooks"],"summary":"Retry Delivery","operationId":"retry_delivery_v1_webhook_endpoints__ep_id__deliveries__delivery_id__retry_post","parameters":[{"name":"ep_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ep Id"}},{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Delivery Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Retry Delivery V1 Webhook Endpoints  Ep Id  Deliveries  Delivery Id  Retry Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/stripe":{"post":{"tags":["webhooks"],"summary":"Stripe Webhook","operationId":"stripe_webhook_v1_webhooks_stripe_post","parameters":[{"name":"Stripe-Signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Stripe Webhook V1 Webhooks Stripe Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/postmark-inbound":{"post":{"tags":["inbound-email"],"summary":"Postmark Inbound","operationId":"postmark_inbound_v1_webhooks_postmark_inbound_post","parameters":[{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Postmark Inbound V1 Webhooks Postmark Inbound Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audit":{"get":{"tags":["audit"],"summary":"List Audit","operationId":"list_audit_v1_audit_get","parameters":[{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AuditOut"},"title":"Response List Audit V1 Audit Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/connect/onboard":{"post":{"tags":["connect"],"summary":"Connect Onboard","operationId":"connect_onboard_v1_connect_onboard_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardLinkIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardLinkOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/connect/balance/{org_id}":{"get":{"tags":["connect"],"summary":"Connect Balance","operationId":"connect_balance_v1_connect_balance__org_id__get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/connect/status/{org_id}":{"get":{"tags":["connect"],"summary":"Connect Status","operationId":"connect_status_v1_connect_status__org_id__get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AuditOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Org Id"},"actor":{"type":"string","title":"Actor"},"action":{"type":"string","title":"Action"},"target_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Type"},"target_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Id"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","org_id","actor","action","target_type","target_id","payload","ip","user_agent","created_at"],"title":"AuditOut"},"BalanceOut":{"properties":{"available_cents":{"type":"integer","title":"Available Cents","default":0},"pending_cents":{"type":"integer","title":"Pending Cents","default":0},"currency":{"type":"string","title":"Currency","default":"usd"},"platform_fee_bps":{"type":"integer","title":"Platform Fee Bps","default":0},"payouts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Payouts","default":[]}},"type":"object","title":"BalanceOut"},"ChargeOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"$ref":"#/components/schemas/ChargeStatus"},"amount_cents":{"type":"integer","title":"Amount Cents"},"currency":{"type":"string","title":"Currency"},"sponsor_charge_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sponsor Charge Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"due_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due Date"},"pay_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pay Url"}},"type":"object","required":["id","status","amount_cents","currency","sponsor_charge_id","description","due_date"],"title":"ChargeOut"},"ChargeStatus":{"type":"string","enum":["pending","processing","succeeded","failed","refunded","disputed"],"title":"ChargeStatus"},"CheckoutInfo":{"properties":{"charge_id":{"type":"string","format":"uuid","title":"Charge Id"},"amount_cents":{"type":"integer","title":"Amount Cents"},"currency":{"type":"string","title":"Currency"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"merchant_name":{"type":"string","title":"Merchant Name"},"status":{"$ref":"#/components/schemas/ChargeStatus"},"sponsor_publishable_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sponsor Publishable Key"}},"type":"object","required":["charge_id","amount_cents","currency","description","merchant_name","status"],"title":"CheckoutInfo"},"ConfirmIn":{"properties":{"payment_token":{"type":"string","title":"Payment Token"}},"type":"object","required":["payment_token"],"title":"ConfirmIn"},"CreateChargeIn":{"properties":{"org_id":{"type":"string","format":"uuid","title":"Org Id"},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Customer Id"},"amount_cents":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount Cents"},"currency":{"type":"string","title":"Currency","default":"USD"},"payment_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Token"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"due_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due Date"}},"type":"object","required":["org_id","amount_cents"],"title":"CreateChargeIn"},"CreateIn":{"properties":{"org_id":{"type":"string","format":"uuid","title":"Org Id"},"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events","default":[]}},"type":"object","required":["org_id","url"],"title":"CreateIn"},"CreateKeyIn":{"properties":{"org_id":{"type":"string","format":"uuid","title":"Org Id"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},"type":"object","required":["org_id"],"title":"CreateKeyIn"},"CustomerIn":{"properties":{"org_id":{"type":"string","format":"uuid","title":"Org Id"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"locale":{"type":"string","title":"Locale","default":"en"}},"type":"object","required":["org_id"],"title":"CustomerIn"},"CustomerOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"locale":{"type":"string","title":"Locale"}},"type":"object","required":["id","org_id","email","name","phone","locale"],"title":"CustomerOut"},"DeliveryOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"endpoint_id":{"type":"string","format":"uuid","title":"Endpoint Id"},"event_type":{"type":"string","title":"Event Type"},"status":{"type":"string","title":"Status"},"attempts":{"type":"integer","title":"Attempts"},"last_response_status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Response Status"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"created_at":{"type":"string","title":"Created At"},"delivered_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivered At"}},"type":"object","required":["id","endpoint_id","event_type","status","attempts","last_response_status","last_error","created_at","delivered_at"],"title":"DeliveryOut"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IntentOut":{"properties":{"client_secret":{"type":"string","title":"Client Secret"},"publishable_key":{"type":"string","title":"Publishable Key"}},"type":"object","required":["client_secret","publishable_key"],"title":"IntentOut"},"KeyCreated":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"secret":{"type":"string","title":"Secret"},"prefix":{"type":"string","title":"Prefix"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},"type":"object","required":["id","secret","prefix","label"],"title":"KeyCreated"},"KeyInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"prefix":{"type":"string","title":"Prefix"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"is_revoked":{"type":"boolean","title":"Is Revoked"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","prefix","label","is_revoked","last_used_at","created_at"],"title":"KeyInfo"},"MeOut":{"properties":{"org_id":{"type":"string","format":"uuid","title":"Org Id"},"legal_name":{"type":"string","title":"Legal Name"},"kyb_status":{"type":"string","title":"Kyb Status"},"api_key_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key Label"}},"type":"object","required":["org_id","legal_name","kyb_status","api_key_label"],"title":"MeOut"},"MerchantOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"legal_name":{"type":"string","title":"Legal Name"},"kyb_status":{"type":"string","title":"Kyb Status"},"sponsor_merchant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sponsor Merchant Id"}},"type":"object","required":["id","legal_name","kyb_status","sponsor_merchant_id"],"title":"MerchantOut"},"OnboardIn":{"properties":{"legal_name":{"type":"string","title":"Legal Name"},"ein":{"type":"string","title":"Ein"},"owners":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Owners"},"contact_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Contact Email"}},"type":"object","required":["legal_name","ein","owners"],"title":"OnboardIn"},"OnboardLinkIn":{"properties":{"org_id":{"type":"string","format":"uuid","title":"Org Id"},"return_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Url"},"refresh_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Url"}},"type":"object","required":["org_id"],"title":"OnboardLinkIn"},"OnboardLinkOut":{"properties":{"url":{"type":"string","title":"Url"},"account_id":{"type":"string","title":"Account Id"}},"type":"object","required":["url","account_id"],"title":"OnboardLinkOut"},"OrgIn":{"properties":{"legal_name":{"type":"string","title":"Legal Name"},"ein":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ein"}},"type":"object","required":["legal_name"],"title":"OrgIn"},"OrgOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"legal_name":{"type":"string","title":"Legal Name"},"ein":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ein"},"kyb_status":{"type":"string","title":"Kyb Status"},"sponsor_merchant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sponsor Merchant Id"}},"type":"object","required":["id","legal_name","ein","kyb_status","sponsor_merchant_id"],"title":"OrgOut"},"Out":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"is_active":{"type":"boolean","title":"Is Active"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["id","org_id","url","events","is_active"],"title":"Out"},"PlanIn":{"properties":{"org_id":{"type":"string","format":"uuid","title":"Org Id"},"name":{"type":"string","title":"Name"},"amount_cents":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount Cents"},"currency":{"type":"string","title":"Currency","default":"USD"},"interval":{"type":"string","pattern":"^(day|week|month|year)$","title":"Interval"},"interval_count":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Interval Count","default":1},"trial_days":{"type":"integer","title":"Trial Days","default":0}},"type":"object","required":["org_id","name","amount_cents","interval"],"title":"PlanIn"},"PlanOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"name":{"type":"string","title":"Name"},"amount_cents":{"type":"integer","title":"Amount Cents"},"currency":{"type":"string","title":"Currency"},"interval":{"type":"string","title":"Interval"},"interval_count":{"type":"integer","title":"Interval Count"},"trial_days":{"type":"integer","title":"Trial Days"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["id","org_id","name","amount_cents","currency","interval","interval_count","trial_days","is_active"],"title":"PlanOut"},"RefundIn":{"properties":{"amount_cents":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Amount Cents","description":"Partial refund amount in minor units. Omit for full refund."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"RefundIn"},"StatusOut":{"properties":{"connected":{"type":"boolean","title":"Connected"},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"},"charges_enabled":{"type":"boolean","title":"Charges Enabled","default":false},"payouts_enabled":{"type":"boolean","title":"Payouts Enabled","default":false},"details_submitted":{"type":"boolean","title":"Details Submitted","default":false},"requirements_due":{"items":{"type":"string"},"type":"array","title":"Requirements Due","default":[]}},"type":"object","required":["connected","account_id"],"title":"StatusOut"},"SubOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"plan_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Plan Id"},"amount_cents":{"type":"integer","title":"Amount Cents"},"currency":{"type":"string","title":"Currency"},"interval":{"type":"string","title":"Interval"},"status":{"$ref":"#/components/schemas/SubscriptionStatus"},"next_charge_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Charge At"}},"type":"object","required":["id","org_id","customer_id","plan_id","amount_cents","currency","interval","status","next_charge_at"],"title":"SubOut"},"SubscribeIn":{"properties":{"org_id":{"type":"string","format":"uuid","title":"Org Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"plan_id":{"type":"string","format":"uuid","title":"Plan Id"}},"type":"object","required":["org_id","customer_id","plan_id"],"title":"SubscribeIn"},"SubscriptionStatus":{"type":"string","enum":["active","paused","canceled","past_due"],"title":"SubscriptionStatus"},"TestPayload":{"properties":{"event":{"type":"string","title":"Event","default":"charge.succeeded"}},"type":"object","title":"TestPayload"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}