{"openapi":"3.1.0","info":{"title":"Allidian API","version":"2026-10-01","description":"REST API for Allidian. Authenticate with a secret (mp_sk_test_/mp_sk_live_) or restricted key: `Authorization: Bearer <key>`. The key's environment (sandbox/live) determines which data you access. Amounts are integers in the currency's minor unit. Payment processing is performed by the merchant's connected payment provider.\n\nWebhooks are signed: `x-platform-signature: t=<unix>,v1=<hex>` where v1 = HMAC-SHA256(endpoint secret, \"<t>.<raw body>\").\n\nRestricted key scopes: checkout_sessions:read, checkout_sessions:write, payments:read, payments:write, refunds:read, refunds:write, customers:read, customers:write, payment_links:read, payment_links:write, invoices:read, invoices:write, subscriptions:read, subscriptions:write, products:write, webhooks:read, webhooks:write, account:read, agent_payments:read, agent_payments:write, accounts:read, accounts:write, transfers:read."},"servers":[{"url":"https://api.allidian.com/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Secret or restricted API key"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string"},"code":{"type":"string","enum":["invalid_request","validation_failed","authentication_required","invalid_api_key","api_key_revoked","environment_mismatch","permission_denied","not_found","conflict","idempotency_conflict","idempotency_in_progress","rate_limited","invalid_state_transition","checkout_expired","checkout_unavailable","amount_invalid","currency_unsupported","refund_exceeds_payment","merchant_not_enabled","provider_unavailable","provider_error","capability_unsupported","entitlement_required","live_mode_disabled","agent_payments_disabled","agent_token_invalid","internal_error"]},"message":{"type":"string"},"request_id":{"type":"string"}},"required":["type","code","message","request_id"]}},"required":["error"]},"CheckoutSession":{"type":"object","properties":{"id":{"type":"string","example":"cs_test_..."},"object":{"const":"checkout.session"},"livemode":{"type":"boolean"},"status":{"type":"string","enum":["open","processing","complete","expired","canceled"]},"mode":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"currency":{"type":"string"},"amount_subtotal":{"type":"integer"},"amount_tax":{"type":"integer"},"amount_shipping":{"type":"integer"},"amount_discount":{"type":"integer"},"amount_total":{"type":"integer"},"line_items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"quantity":{"type":"integer"},"unit_amount":{"type":"integer"},"amount":{"type":"integer"}},"required":[]}},"customer":{"anyOf":[{"type":"string"},{"type":"null"}]},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}]},"success_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancel_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"merchant_reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"payment":{"anyOf":[{"type":"string"},{"type":"null"}]},"on_behalf_of":{"anyOf":[{"type":"string"},{"type":"null"}]},"commission_amount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"provider":{"anyOf":[{"type":"string"},{"type":"null"}]},"expires_at":{"type":"integer"},"created":{"type":"integer"}},"required":[]},"Payment":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment"},"livemode":{"type":"boolean"},"status":{"type":"string","enum":["created","requires_payment_method","requires_action","processing","authorized","succeeded","failed","canceled","expired","partially_refunded","refunded","disputed"]},"amount":{"type":"integer"},"amount_authorized":{"type":"integer"},"amount_captured":{"type":"integer"},"amount_refunded":{"type":"integer"},"currency":{"type":"string"},"application_fee_amount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"customer":{"anyOf":[{"type":"string"},{"type":"null"}]},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkout_session":{"anyOf":[{"type":"string"},{"type":"null"}]},"invoice":{"anyOf":[{"type":"string"},{"type":"null"}]},"payment_link":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"merchant_reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object"},"payment_method":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"},"card":{"anyOf":[{"type":"object","properties":{"brand":{"type":"string"},"last4":{"type":"string"}},"required":[]},{"type":"null"}]}},"required":[]},{"type":"null"}]},"failure_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"failure_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"provider":{"type":"object","properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"payment_reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"connection":{"type":"string"}},"required":[]},"channel":{"type":"string","enum":["standard","agent"]},"agent":{"anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"token":{"type":"string"}},"required":[]},{"type":"null"}]},"on_behalf_of":{"anyOf":[{"type":"string","description":"Connected account the payment was made on behalf of (ca_…)"},{"type":"null"}]},"commission_amount":{"anyOf":[{"type":"integer","description":"Your commission kept from a connected-account payment"},{"type":"null"}]},"created":{"type":"integer"},"succeeded_at":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":[]},"Refund":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"refund"},"livemode":{"type":"boolean"},"payment":{"type":"string"},"amount":{"type":"integer"},"currency":{"type":"string"},"status":{"type":"string","enum":["pending","requires_action","succeeded","failed","canceled"]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"provider":{"type":"object","properties":{"refund_reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"connection":{"type":"string"}},"required":[]},"created":{"type":"integer"}},"required":[]},"PaymentLink":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_link"},"livemode":{"type":"boolean"},"url":{"type":"string"},"active":{"type":"boolean"},"title":{"type":"string"},"currency":{"type":"string"},"amount_type":{"type":"string"},"amount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"use_count":{"type":"integer"},"created":{"type":"integer"}},"required":[]},"Invoice":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"invoice"},"livemode":{"type":"boolean"},"number":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","open","paid","void","uncollectible"]},"overdue":{"type":"boolean"},"customer":{"type":"string"},"currency":{"type":"string"},"subtotal":{"type":"integer"},"tax":{"type":"integer"},"discount":{"type":"integer"},"total":{"type":"integer"},"amount_paid":{"type":"integer"},"amount_due":{"type":"integer"},"due_date":{"anyOf":[{"type":"integer"},{"type":"null"}]},"hosted_invoice_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"invoice_pdf":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"integer"},"unit_amount":{"type":"integer"},"amount":{"type":"integer"}},"required":[]}},"created":{"type":"integer"}},"required":[]},"Customer":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"customer"},"livemode":{"type":"boolean"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object"},"redacted":{"type":"boolean"},"created":{"type":"integer"}},"required":[]},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"webhook_endpoint"},"livemode":{"type":"boolean"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["payment.succeeded","payment.failed","payment.processing","payment.requires_action","payment.canceled","payment.refunded","payment.disputed","refund.updated","checkout.session.completed","checkout.session.expired","invoice.finalized","invoice.paid","invoice.overdue","invoice.voided","account.capabilities_updated","subscription.created","subscription.updated","subscription.canceled","connected_account.updated","transfer.paid","transfer.reversed","*"]}},"status":{"type":"string"},"secret":{"type":"string","description":"Returned only on creation."}},"required":[]},"Event":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"event"},"type":{"type":"string","enum":["payment.succeeded","payment.failed","payment.processing","payment.requires_action","payment.canceled","payment.refunded","payment.disputed","refund.updated","checkout.session.completed","checkout.session.expired","invoice.finalized","invoice.paid","invoice.overdue","invoice.voided","account.capabilities_updated","subscription.created","subscription.updated","subscription.canceled","connected_account.updated","transfer.paid","transfer.reversed"]},"created":{"type":"integer"},"livemode":{"type":"boolean"},"data":{"type":"object","properties":{"object":{"type":"object"}},"required":[]}},"required":[]},"ConnectedAccount":{"type":"object","properties":{"id":{"type":"string","example":"ca_test_..."},"object":{"const":"connected_account"},"livemode":{"type":"boolean"},"status":{"type":"string","enum":["pending","onboarding","restricted","enabled","rejected","disabled"]},"display_name":{"type":"string"},"email":{"type":"string"},"country":{"type":"string"},"default_currency":{"type":"string"},"business_type":{"type":"string","enum":["individual","company","non_profit"]},"external_reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"commission_rate_bps":{"anyOf":[{"type":"integer"},{"type":"null"}]},"charges_enabled":{"type":"boolean"},"payouts_enabled":{"type":"boolean"},"requirements":{"type":"object","properties":{"currently_due":{"type":"array","items":{"type":"string"}},"past_due":{"type":"array","items":{"type":"string"}},"pending_verification":{"type":"array","items":{"type":"string"}}},"required":[]},"metadata":{"type":"object"},"onboarding_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Returned only on creation."},"created":{"type":"integer"}},"required":[]},"Transfer":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"transfer"},"livemode":{"type":"boolean"},"type":{"const":"commission"},"status":{"type":"string","enum":["pending","paid","failed","reversed","canceled"]},"amount":{"type":"integer"},"amount_reversed":{"type":"integer"},"currency":{"type":"string"},"payment":{"type":"string"},"connected_account":{"type":"string"},"provider_transfer_reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"paid_at":{"anyOf":[{"type":"integer"},{"type":"null"}]},"created":{"type":"integer"}},"required":[]},"List":{"type":"object","properties":{"object":{"const":"list"},"url":{"type":"string"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{}}},"required":[]}}},"paths":{"/checkout/sessions":{"post":{"summary":"Create a checkout session","operationId":"createCheckoutSession","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safely retry mutating requests. Same key + same body returns the stored response; different body => 409 idempotency_conflict. Keys are remembered for 7 days."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"type":"string","minLength":3,"maxLength":3},"line_items":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":250},"description":{"type":"string","maxLength":1000},"quantity":{"type":"integer","minimum":1,"maximum":10000},"unit_amount":{"type":"integer","minimum":0,"maximum":99999999},"image_url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["name","quantity","unit_amount"],"additionalProperties":false}},"amount":{"type":"integer","exclusiveMinimum":0,"maximum":99999999},"description":{"type":"string","maxLength":1000},"mode":{"default":"payment","type":"string","enum":["payment","subscription"]},"price":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tax_amount":{"default":0,"type":"integer","minimum":0,"maximum":99999999},"shipping_amount":{"default":0,"type":"integer","minimum":0,"maximum":99999999},"discount_amount":{"default":0,"type":"integer","minimum":0,"maximum":99999999},"customer":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customer_email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"collect_billing_address":{"default":false,"type":"boolean"},"collect_shipping_address":{"default":false,"type":"boolean"},"success_url":{"type":"string","maxLength":2048,"format":"uri"},"cancel_url":{"type":"string","maxLength":2048,"format":"uri"},"expires_in_minutes":{"default":60,"type":"integer","minimum":5,"maximum":1440},"merchant_reference":{"type":"string","maxLength":200},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":500}},"allowed_origins":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":300,"format":"uri"}},"template":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"on_behalf_of":{"type":"string","pattern":"^ca_(test|live)_[A-Za-z0-9]{24}$"},"commission_amount":{"type":"integer","minimum":0,"maximum":99999999}},"required":["currency"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSession"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List checkout sessions","operationId":"listCheckoutSessions","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CheckoutSession"}}},"required":[]}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/checkout/sessions/{id}":{"get":{"summary":"Retrieve a checkout session","operationId":"getCheckoutSession","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSession"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/checkout/sessions/{id}/expire":{"post":{"summary":"Expire an open checkout session","operationId":"expireCheckoutSession","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safely retry mutating requests. Same key + same body returns the stored response; different body => 409 idempotency_conflict. Keys are remembered for 7 days."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSession"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/payments":{"get":{"summary":"List payments","operationId":"listPayments","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"currency","in":"query","schema":{"type":"string"}},{"name":"payment_method","in":"query","schema":{"type":"string"}},{"name":"customer","in":"query","schema":{"type":"string"}},{"name":"on_behalf_of","in":"query","schema":{"type":"string"},"description":"Only payments made on behalf of this connected account (ca_…)"},{"name":"created_gte","in":"query","schema":{"type":"integer"}},{"name":"created_lt","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Payment"}}},"required":[]}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/payments/{id}":{"get":{"summary":"Retrieve a payment","operationId":"getPayment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/payments/{id}/refunds":{"post":{"summary":"Refund a payment (full or partial)","description":"Always processed through the provider connection that created the payment. Final status arrives via refund.updated / payment.refunded events.","operationId":"createRefund","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","maxLength":255},"description":"Safely retry mutating requests. Same key + same body returns the stored response; different body => 409 idempotency_conflict. Keys are remembered for 7 days."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reason":{"type":"string","enum":["duplicate","fraudulent","requested_by_customer"]},"refund_application_fee":{"default":false,"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refund"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List refunds for a payment","operationId":"listPaymentRefunds","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Refund"}}},"required":[]}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/payments/{id}/capture":{"post":{"summary":"Capture an authorized payment","operationId":"capturePayment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","maxLength":255},"description":"Safely retry mutating requests. Same key + same body returns the stored response; different body => 409 idempotency_conflict. Keys are remembered for 7 days."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"integer"}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/payments/{id}/cancel":{"post":{"summary":"Cancel an unconfirmed or authorized payment","operationId":"cancelPayment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","maxLength":255},"description":"Safely retry mutating requests. Same key + same body returns the stored response; different body => 409 idempotency_conflict. Keys are remembered for 7 days."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agent_payments":{"post":{"summary":"Charge an AI agent's payment token","description":"Pass the scoped, single-seller payment token an AI agent obtained from the buyer (a shared payment token, spt_…). The payment is created and confirmed on your provider account through the same pipeline as every other payment. Agent payments must be turned on in Settings → AI agent payments.","operationId":"createAgentPayment","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","maxLength":255},"description":"Safely retry mutating requests. Same key + same body returns the stored response; different body => 409 idempotency_conflict. Keys are remembered for 7 days."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"shared_payment_token":{"type":"string","minLength":4,"maxLength":200},"amount":{"type":"integer","exclusiveMinimum":0,"maximum":99999999},"currency":{"type":"string","minLength":3,"maxLength":3},"description":{"type":"string","maxLength":1000},"merchant_reference":{"type":"string","maxLength":200},"customer_email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":500}},"agent":{"type":"object","properties":{"name":{"type":"string","maxLength":100}},"additionalProperties":false}},"required":["shared_payment_token","amount","currency"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agent_payments/config":{"get":{"summary":"Agent payment configuration to share with agents","description":"Whether agent payments are on, the network profile ID agents must scope tokens to, and your per-payment cap.","operationId":"getAgentPaymentConfig","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"agent_payment_config"},"livemode":{"type":"boolean"},"enabled":{"type":"boolean"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}]},"network_profile_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"max_amount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"cap_currency":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/accounts":{"post":{"summary":"Create a connected account","description":"A seller on your marketplace or a user of your platform. We create their provider account and return a provider-hosted onboarding link to send them. Your own account must be able to take payments, because commissions are paid into it.","operationId":"createConnectedAccount","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safely retry mutating requests. Same key + same body returns the stored response; different body => 409 idempotency_conflict. Keys are remembered for 7 days."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"display_name":{"type":"string","minLength":2,"maxLength":120},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"country":{"type":"string","minLength":2,"maxLength":2},"default_currency":{"type":"string","minLength":3,"maxLength":3},"business_type":{"default":"company","type":"string","enum":["individual","company","non_profit"]},"external_reference":{"type":"string","maxLength":200},"commission_rate_bps":{"type":"integer","minimum":0,"maximum":5000},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":500}},"return_url":{"type":"string","maxLength":2048,"format":"uri"},"refresh_url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["display_name","email","country","default_currency"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectedAccount"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List connected accounts","operationId":"listConnectedAccounts","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ConnectedAccount"}}},"required":[]}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/accounts/{id}":{"get":{"summary":"Retrieve a connected account","operationId":"getConnectedAccount","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectedAccount"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/accounts/{id}/onboarding_links":{"post":{"summary":"Create a provider onboarding link","description":"Links expire after a few minutes; create a new one each time you send it.","operationId":"createOnboardingLink","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"return_url":{"type":"string","maxLength":2048,"format":"uri"},"refresh_url":{"type":"string","maxLength":2048,"format":"uri"}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"onboarding_link"},"url":{"type":"string"},"expires_at":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":[]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/transfers":{"get":{"summary":"List commission transfers","description":"Commissions from connected-account payments, transferred to your own provider account.","operationId":"listTransfers","parameters":[{"name":"limit","in":"query","schema":{"type":"integer"}},{"name":"connected_account","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Transfer"}}},"required":[]}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/refunds/{id}":{"get":{"summary":"Retrieve a refund","operationId":"getRefund","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refund"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/payment-links":{"post":{"summary":"Create a payment link","operationId":"createPaymentLink","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safely retry mutating requests. Same key + same body returns the stored response; different body => 409 idempotency_conflict. Keys are remembered for 7 days."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":1000},"image_url":{"type":"string","maxLength":2048,"format":"starts_with","pattern":"^https:\\/\\/.*"},"currency":{"type":"string","minLength":3,"maxLength":3},"amount_type":{"default":"fixed","type":"string","enum":["fixed","customer_chooses"]},"amount":{"type":"integer","exclusiveMinimum":0,"maximum":99999999},"min_amount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_amount":{"type":"integer","exclusiveMinimum":0,"maximum":99999999},"recurring":{"type":"object","properties":{"interval":{"type":"string","enum":["day","week","month","year"]},"interval_count":{"default":1,"type":"integer","minimum":1,"maximum":12}},"required":["interval"],"additionalProperties":false},"expires_at":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_uses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"collect_billing_address":{"default":false,"type":"boolean"},"collect_shipping_address":{"default":false,"type":"boolean"},"success_url":{"type":"string","maxLength":2048,"format":"uri"},"cancel_url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["title","currency"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLink"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List payment links","operationId":"listPaymentLinks","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PaymentLink"}}},"required":[]}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/payment-links/{id}":{"get":{"summary":"Retrieve a payment link","operationId":"getPaymentLink","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLink"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Enable or disable a payment link","operationId":"updatePaymentLink","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safely retry mutating requests. Same key + same body returns the stored response; different body => 409 idempotency_conflict. Keys are remembered for 7 days."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"}},"required":["active"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLink"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invoices":{"post":{"summary":"Create a draft invoice","operationId":"createInvoice","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safely retry mutating requests. Same key + same body returns the stored response; different body => 409 idempotency_conflict. Keys are remembered for 7 days."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customer":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"currency":{"type":"string","minLength":3,"maxLength":3},"items":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"integer","minimum":1,"maximum":100000},"unit_amount":{"type":"integer","minimum":0,"maximum":99999999},"tax_rate_bps":{"type":"integer","minimum":0,"maximum":5000}},"required":["description","quantity","unit_amount"],"additionalProperties":false}},"discount_amount":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"due_date":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"memo":{"type":"string","maxLength":2000},"footer":{"type":"string","maxLength":1000}},"required":["customer","currency","items","due_date"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List invoices","operationId":"listInvoices","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["draft","open","overdue","paid","void","uncollectible"]}},{"name":"customer","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}}},"required":[]}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invoices/{id}":{"get":{"summary":"Retrieve an invoice","operationId":"getInvoice","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invoices/{id}/finalize":{"post":{"summary":"Finalize a draft invoice","operationId":"finalizeInvoice","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safely retry mutating requests. Same key + same body returns the stored response; different body => 409 idempotency_conflict. Keys are remembered for 7 days."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invoices/{id}/send":{"post":{"summary":"Send an invoice (finalizes drafts)","operationId":"sendInvoice","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safely retry mutating requests. Same key + same body returns the stored response; different body => 409 idempotency_conflict. Keys are remembered for 7 days."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invoices/{id}/void":{"post":{"summary":"Void an invoice","operationId":"voidInvoice","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safely retry mutating requests. Same key + same body returns the stored response; different body => 409 idempotency_conflict. Keys are remembered for 7 days."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invoices/{id}/mark-uncollectible":{"post":{"summary":"Mark an invoice uncollectible","operationId":"markInvoiceUncollectible","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safely retry mutating requests. Same key + same body returns the stored response; different body => 409 idempotency_conflict. Keys are remembered for 7 days."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/customers":{"post":{"summary":"Create a customer","operationId":"createCustomer","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safely retry mutating requests. Same key + same body returns the stored response; different body => 409 idempotency_conflict. Keys are remembered for 7 days."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":"string","minLength":1,"maxLength":200},"phone":{"type":"string","maxLength":40},"billing_address":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"state":{"type":"string","maxLength":100},"postal_code":{"type":"string","maxLength":20},"country":{"type":"string","minLength":2,"maxLength":2}},"additionalProperties":false},"shipping_address":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"state":{"type":"string","maxLength":100},"postal_code":{"type":"string","maxLength":20},"country":{"type":"string","minLength":2,"maxLength":2}},"additionalProperties":false},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List customers","operationId":"listCustomers","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","schema":{"type":"string"}},{"name":"email","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}}},"required":[]}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/customers/{id}":{"get":{"summary":"Retrieve a customer","operationId":"getCustomer","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Update a customer","operationId":"updateCustomer","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safely retry mutating requests. Same key + same body returns the stored response; different body => 409 idempotency_conflict. Keys are remembered for 7 days."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":"string","minLength":1,"maxLength":200},"phone":{"type":"string","maxLength":40},"billing_address":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"state":{"type":"string","maxLength":100},"postal_code":{"type":"string","maxLength":20},"country":{"type":"string","minLength":2,"maxLength":2}},"additionalProperties":false},"shipping_address":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"state":{"type":"string","maxLength":100},"postal_code":{"type":"string","maxLength":20},"country":{"type":"string","minLength":2,"maxLength":2}},"additionalProperties":false},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/products":{"post":{"summary":"Create a product with a price (one-time or recurring)","operationId":"createProduct","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safely retry mutating requests. Same key + same body returns the stored response; different body => 409 idempotency_conflict. Keys are remembered for 7 days."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":250},"description":{"type":"string","maxLength":1000},"image_url":{"type":"string","maxLength":2048,"format":"starts_with","pattern":"^https:\\/\\/.*"},"price":{"type":"object","properties":{"currency":{"type":"string","minLength":3,"maxLength":3},"unit_amount":{"type":"integer","exclusiveMinimum":0,"maximum":99999999},"type":{"type":"string","enum":["one_time","recurring"]},"interval":{"type":"string","enum":["day","week","month","year"]},"interval_count":{"default":1,"type":"integer","minimum":1,"maximum":12},"trial_period_days":{"type":"integer","minimum":1,"maximum":730}},"required":["currency","unit_amount","type"],"additionalProperties":false}},"required":["name","price"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List products and prices","operationId":"listProducts","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/subscriptions":{"get":{"summary":"List customer subscriptions","operationId":"listSubscriptions","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/subscriptions/{id}/cancel":{"post":{"summary":"Cancel a subscription","operationId":"cancelSubscription","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safely retry mutating requests. Same key + same body returns the stored response; different body => 409 idempotency_conflict. Keys are remembered for 7 days."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"at_period_end":{"type":"boolean"}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/merchant/account":{"get":{"summary":"Retrieve your account","operationId":"getAccount","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/merchant/capabilities":{"get":{"summary":"Provider-reported processing capabilities","operationId":"getCapabilities","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/developer/webhooks":{"post":{"summary":"Create a webhook endpoint (secret returned once)","operationId":"createWebhookEndpoint","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safely retry mutating requests. Same key + same body returns the stored response; different body => 409 idempotency_conflict. Keys are remembered for 7 days."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"description":{"type":"string","maxLength":500},"events":{"minItems":1,"maxItems":50,"type":"array","items":{"anyOf":[{"type":"string","enum":["payment.succeeded","payment.failed","payment.processing","payment.requires_action","payment.canceled","payment.refunded","payment.disputed","refund.updated","checkout.session.completed","checkout.session.expired","invoice.finalized","invoice.paid","invoice.overdue","invoice.voided","account.capabilities_updated","subscription.created","subscription.updated","subscription.canceled","connected_account.updated","transfer.paid","transfer.reversed"]},{"type":"string","const":"*"}]}}},"required":["url","events"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List webhook endpoints","operationId":"listWebhookEndpoints","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"required":[]}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/developer/webhooks/{id}":{"get":{"summary":"Retrieve a webhook endpoint","operationId":"getWebhookEndpoint","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Enable/disable a webhook endpoint","operationId":"updateWebhookEndpoint","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safely retry mutating requests. Same key + same body returns the stored response; different body => 409 idempotency_conflict. Keys are remembered for 7 days."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/events":{"get":{"summary":"List events","operationId":"listEvents","parameters":[{"name":"limit","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}}},"required":[]}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{"payment.succeeded":{"post":{"summary":"payment.succeeded","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Acknowledge receipt"}}}},"payment.failed":{"post":{"summary":"payment.failed","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Acknowledge receipt"}}}},"payment.processing":{"post":{"summary":"payment.processing","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Acknowledge receipt"}}}},"payment.requires_action":{"post":{"summary":"payment.requires_action","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Acknowledge receipt"}}}},"payment.canceled":{"post":{"summary":"payment.canceled","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Acknowledge receipt"}}}},"payment.refunded":{"post":{"summary":"payment.refunded","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Acknowledge receipt"}}}},"payment.disputed":{"post":{"summary":"payment.disputed","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Acknowledge receipt"}}}},"refund.updated":{"post":{"summary":"refund.updated","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Acknowledge receipt"}}}},"checkout.session.completed":{"post":{"summary":"checkout.session.completed","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Acknowledge receipt"}}}},"checkout.session.expired":{"post":{"summary":"checkout.session.expired","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Acknowledge receipt"}}}},"invoice.finalized":{"post":{"summary":"invoice.finalized","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Acknowledge receipt"}}}},"invoice.paid":{"post":{"summary":"invoice.paid","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Acknowledge receipt"}}}},"invoice.overdue":{"post":{"summary":"invoice.overdue","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Acknowledge receipt"}}}},"invoice.voided":{"post":{"summary":"invoice.voided","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Acknowledge receipt"}}}},"account.capabilities_updated":{"post":{"summary":"account.capabilities_updated","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Acknowledge receipt"}}}},"subscription.created":{"post":{"summary":"subscription.created","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Acknowledge receipt"}}}},"subscription.updated":{"post":{"summary":"subscription.updated","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Acknowledge receipt"}}}},"subscription.canceled":{"post":{"summary":"subscription.canceled","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Acknowledge receipt"}}}},"connected_account.updated":{"post":{"summary":"connected_account.updated","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Acknowledge receipt"}}}},"transfer.paid":{"post":{"summary":"transfer.paid","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Acknowledge receipt"}}}},"transfer.reversed":{"post":{"summary":"transfer.reversed","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Acknowledge receipt"}}}}}}