{"openapi":"3.1.0","info":{"title":"Kashu API","version":"2026-11-06","description":"Payments, commerce and storefront for Kashu merchants. Authenticate with a Bearer API key. A test key sees only test data and a live key only live data."},"servers":[{"url":"https://api.kashupay.com"}],"security":[{"bearer":[]}],"tags":[{"name":"Account"},{"name":"API keys"},{"name":"Customers"},{"name":"Card tokens"},{"name":"Payment methods"},{"name":"Payments"},{"name":"Refunds"},{"name":"Subscriptions"},{"name":"Disputes"},{"name":"Checkout sessions"},{"name":"Webhook endpoints"},{"name":"Events"}],"x-kashu-scopes":["account:read","api_keys:read","api_keys:write","card_tokens:write","checkout_sessions:read","checkout_sessions:write","customers:read","customers:write","disputes:read","disputes:write","events:read","events:write","payment_methods:read","payment_methods:write","payments:read","payments:write","refunds:read","refunds:write","subscriptions:read","subscriptions:write","webhook_endpoints:read","webhook_endpoints:write"],"paths":{"/v1/account":{"get":{"operationId":"account.retrieve","summary":"Retrieve the account the API key belongs to","tags":["Account"],"x-kashu-scope":"account:read","x-kashu-publishable":false,"x-kashu-lane":"read","x-kashu-idempotency":"none","parameters":[{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"400":{"description":"parameter_unknown, api_version_invalid","x-kashu-error-codes":["parameter_unknown","api_version_invalid"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/api_keys":{"get":{"operationId":"api_keys.list","summary":"List the API keys of the calling key's mode, newest first","tags":["API keys"],"x-kashu-scope":"api_keys:read","x-kashu-publishable":false,"x-kashu-lane":"list","x-kashu-idempotency":"none","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":10,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeysListResponse"}}}},"400":{"description":"parameter_missing, parameter_invalid, parameter_unknown, cursor_invalid, cursor_expired, api_version_invalid","x-kashu-error-codes":["parameter_missing","parameter_invalid","parameter_unknown","cursor_invalid","cursor_expired","api_version_invalid"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"api_keys.create","summary":"Create an API key in the calling key's mode. The response is the only place a secret key's token appears","tags":["API keys"],"x-kashu-scope":"api_keys:write","x-kashu-publishable":false,"x-kashu-lane":"write","x-kashu-idempotency":"optional","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional. When absent, Kashu mints one and returns it.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeysCreateBody"}}}},"responses":{"201":{"description":"Created","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"400":{"description":"invalid_json, parameter_missing, parameter_invalid, parameter_unknown, api_version_invalid, idempotency_key_invalid, idempotency_key_reused","x-kashu-error-codes":["invalid_json","parameter_missing","parameter_invalid","parameter_unknown","api_version_invalid","idempotency_key_invalid","idempotency_key_reused"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use","x-kashu-error-codes":["idempotency_key_in_use"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/api_keys/{id}":{"get":{"operationId":"api_keys.retrieve","summary":"Retrieve an API key","tags":["API keys"],"x-kashu-scope":"api_keys:read","x-kashu-publishable":false,"x-kashu-lane":"read","x-kashu-idempotency":"none","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^key_[0-9A-Za-z]{24}$"}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"400":{"description":"parameter_unknown, api_version_invalid","x-kashu-error-codes":["parameter_unknown","api_version_invalid"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/api_keys/{id}/roll":{"post":{"operationId":"api_keys.roll","summary":"Replace an API key with a new one of the same access. The old key ends now, or after expires_in seconds","tags":["API keys"],"x-kashu-scope":"api_keys:write","x-kashu-publishable":false,"x-kashu-lane":"write","x-kashu-idempotency":"optional","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^key_[0-9A-Za-z]{24}$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional. When absent, Kashu mints one and returns it.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeysRollBody"}}}},"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"400":{"description":"invalid_json, parameter_missing, parameter_invalid, parameter_unknown, api_version_invalid, idempotency_key_invalid, idempotency_key_reused","x-kashu-error-codes":["invalid_json","parameter_missing","parameter_invalid","parameter_unknown","api_version_invalid","idempotency_key_invalid","idempotency_key_reused"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use","x-kashu-error-codes":["idempotency_key_in_use"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/api_keys/{id}/revoke":{"post":{"operationId":"api_keys.revoke","summary":"Revoke an API key at once. Revoking a revoked key returns it unchanged","tags":["API keys"],"x-kashu-scope":"api_keys:write","x-kashu-publishable":false,"x-kashu-lane":"write","x-kashu-idempotency":"optional","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^key_[0-9A-Za-z]{24}$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional. When absent, Kashu mints one and returns it.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeysRevokeBody"}}}},"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"400":{"description":"invalid_json, parameter_unknown, api_version_invalid, idempotency_key_invalid, idempotency_key_reused","x-kashu-error-codes":["invalid_json","parameter_unknown","api_version_invalid","idempotency_key_invalid","idempotency_key_reused"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use","x-kashu-error-codes":["idempotency_key_in_use"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/customers":{"post":{"operationId":"customers.create","summary":"Create a customer","tags":["Customers"],"x-kashu-scope":"customers:write","x-kashu-publishable":false,"x-kashu-lane":"write","x-kashu-idempotency":"optional","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional. When absent, Kashu mints one and returns it.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersCreateBody"}}}},"responses":{"201":{"description":"Created","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"400":{"description":"invalid_json, parameter_missing, parameter_invalid, parameter_unknown, api_version_invalid, idempotency_key_invalid, idempotency_key_reused","x-kashu-error-codes":["invalid_json","parameter_missing","parameter_invalid","parameter_unknown","api_version_invalid","idempotency_key_invalid","idempotency_key_reused"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use","x-kashu-error-codes":["idempotency_key_in_use"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"customers.list","summary":"List customers, newest first","tags":["Customers"],"x-kashu-scope":"customers:read","x-kashu-publishable":false,"x-kashu-lane":"list","x-kashu-idempotency":"none","parameters":[{"name":"email","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":254}},{"name":"limit","in":"query","required":false,"schema":{"default":10,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersListResponse"}}}},"400":{"description":"parameter_missing, parameter_invalid, parameter_unknown, cursor_invalid, cursor_expired, api_version_invalid","x-kashu-error-codes":["parameter_missing","parameter_invalid","parameter_unknown","cursor_invalid","cursor_expired","api_version_invalid"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/customers/{id}":{"get":{"operationId":"customers.retrieve","summary":"Retrieve a customer","tags":["Customers"],"x-kashu-scope":"customers:read","x-kashu-publishable":false,"x-kashu-lane":"read","x-kashu-idempotency":"none","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^cu_[0-9A-Za-z]{24}$"}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"400":{"description":"parameter_unknown, api_version_invalid","x-kashu-error-codes":["parameter_unknown","api_version_invalid"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"customers.update","summary":"Update a customer. A field sent as null is cleared; an address replaces the one held","tags":["Customers"],"x-kashu-scope":"customers:write","x-kashu-publishable":false,"x-kashu-lane":"write","x-kashu-idempotency":"optional","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^cu_[0-9A-Za-z]{24}$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional. When absent, Kashu mints one and returns it.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersUpdateBody"}}}},"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"400":{"description":"invalid_json, parameter_missing, parameter_invalid, parameter_unknown, api_version_invalid, idempotency_key_invalid, idempotency_key_reused","x-kashu-error-codes":["invalid_json","parameter_missing","parameter_invalid","parameter_unknown","api_version_invalid","idempotency_key_invalid","idempotency_key_reused"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use","x-kashu-error-codes":["idempotency_key_in_use"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/card_tokens":{"post":{"operationId":"card_tokens.create","summary":"Turn the card form's single-use card into a card token. Kashu.js calls this for you","tags":["Card tokens"],"x-kashu-scope":"card_tokens:write","x-kashu-publishable":true,"x-kashu-lane":"write","x-kashu-idempotency":"optional","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional. When absent, Kashu mints one and returns it.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardTokensCreateBody"}}}},"responses":{"201":{"description":"Created","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardToken"}}}},"400":{"description":"invalid_json, parameter_missing, parameter_invalid, parameter_unknown, api_version_invalid, idempotency_key_invalid, idempotency_key_reused","x-kashu-error-codes":["invalid_json","parameter_missing","parameter_invalid","parameter_unknown","api_version_invalid","idempotency_key_invalid","idempotency_key_reused"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, payments_not_enabled","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","payments_not_enabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use","x-kashu-error-codes":["idempotency_key_in_use"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/payment_methods":{"post":{"operationId":"payment_methods.create","summary":"Save a card for a customer from a single-use card token","tags":["Payment methods"],"x-kashu-scope":"payment_methods:write","x-kashu-publishable":false,"x-kashu-lane":"money","x-kashu-idempotency":"required","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Required. Retry with the same key and get the same result.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodsCreateBody"}}}},"responses":{"201":{"description":"Created","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethod"}}}},"400":{"description":"invalid_json, parameter_missing, parameter_invalid, parameter_unknown, api_version_invalid, idempotency_key_missing, idempotency_key_invalid, idempotency_key_reused, token_already_used, token_expired","x-kashu-error-codes":["invalid_json","parameter_missing","parameter_invalid","parameter_unknown","api_version_invalid","idempotency_key_missing","idempotency_key_invalid","idempotency_key_reused","token_already_used","token_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed, payments_not_enabled","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed","payments_not_enabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use, operation_in_progress","x-kashu-error-codes":["idempotency_key_in_use","operation_in_progress"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"payment_methods.list","summary":"List a customer's saved cards, newest first","tags":["Payment methods"],"x-kashu-scope":"payment_methods:read","x-kashu-publishable":false,"x-kashu-lane":"list","x-kashu-idempotency":"none","parameters":[{"name":"customer","in":"query","required":true,"schema":{"type":"string","pattern":"^cu_[0-9A-Za-z]{24}$"}},{"name":"limit","in":"query","required":false,"schema":{"default":10,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodsListResponse"}}}},"400":{"description":"parameter_missing, parameter_invalid, parameter_unknown, cursor_invalid, cursor_expired, api_version_invalid","x-kashu-error-codes":["parameter_missing","parameter_invalid","parameter_unknown","cursor_invalid","cursor_expired","api_version_invalid"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/payment_methods/{id}":{"get":{"operationId":"payment_methods.retrieve","summary":"Retrieve a payment method","tags":["Payment methods"],"x-kashu-scope":"payment_methods:read","x-kashu-publishable":false,"x-kashu-lane":"read","x-kashu-idempotency":"none","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^pm_[0-9A-Za-z]{24}$"}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethod"}}}},"400":{"description":"parameter_unknown, api_version_invalid","x-kashu-error-codes":["parameter_unknown","api_version_invalid"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/payment_methods/{id}/detach":{"post":{"operationId":"payment_methods.detach","summary":"Detach a saved card from its customer. It can no longer be charged","tags":["Payment methods"],"x-kashu-scope":"payment_methods:write","x-kashu-publishable":false,"x-kashu-lane":"write","x-kashu-idempotency":"optional","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^pm_[0-9A-Za-z]{24}$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional. When absent, Kashu mints one and returns it.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeysRevokeBody"}}}},"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethod"}}}},"400":{"description":"invalid_json, parameter_unknown, api_version_invalid, idempotency_key_invalid, idempotency_key_reused","x-kashu-error-codes":["invalid_json","parameter_unknown","api_version_invalid","idempotency_key_invalid","idempotency_key_reused"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use","x-kashu-error-codes":["idempotency_key_in_use"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/payments":{"post":{"operationId":"payments.create","summary":"Charge a saved card or a card token, or authorize it with capture_method manual. A decline is a payment with status failed","tags":["Payments"],"x-kashu-scope":"payments:write","x-kashu-publishable":false,"x-kashu-lane":"money","x-kashu-idempotency":"required","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Required. Retry with the same key and get the same result.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentsCreateBody"}}}},"responses":{"201":{"description":"Created","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"400":{"description":"invalid_json, parameter_missing, parameter_invalid, parameter_unknown, api_version_invalid, idempotency_key_missing, idempotency_key_invalid, idempotency_key_reused, token_already_used, token_expired","x-kashu-error-codes":["invalid_json","parameter_missing","parameter_invalid","parameter_unknown","api_version_invalid","idempotency_key_missing","idempotency_key_invalid","idempotency_key_reused","token_already_used","token_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed, payments_not_enabled","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed","payments_not_enabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use, operation_in_progress","x-kashu-error-codes":["idempotency_key_in_use","operation_in_progress"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"payments.list","summary":"List payments, newest first","tags":["Payments"],"x-kashu-scope":"payments:read","x-kashu-publishable":false,"x-kashu-lane":"list","x-kashu-idempotency":"none","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","requires_action","requires_capture","succeeded","failed","canceled"]}},{"name":"limit","in":"query","required":false,"schema":{"default":10,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentsListResponse"}}}},"400":{"description":"parameter_missing, parameter_invalid, parameter_unknown, cursor_invalid, cursor_expired, api_version_invalid","x-kashu-error-codes":["parameter_missing","parameter_invalid","parameter_unknown","cursor_invalid","cursor_expired","api_version_invalid"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/payments/{id}":{"get":{"operationId":"payments.retrieve","summary":"Retrieve a payment","tags":["Payments"],"x-kashu-scope":"payments:read","x-kashu-publishable":false,"x-kashu-lane":"read","x-kashu-idempotency":"none","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^py_[0-9A-Za-z]{24}$"}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"400":{"description":"parameter_unknown, api_version_invalid","x-kashu-error-codes":["parameter_unknown","api_version_invalid"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/payments/{id}/capture":{"post":{"operationId":"payments.capture","summary":"Capture an authorized payment, once, for at most the amount held. Without an amount, all of it","tags":["Payments"],"x-kashu-scope":"payments:write","x-kashu-publishable":false,"x-kashu-lane":"money","x-kashu-idempotency":"required","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^py_[0-9A-Za-z]{24}$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Required. Retry with the same key and get the same result.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentsCaptureBody"}}}},"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"400":{"description":"invalid_json, parameter_missing, parameter_invalid, parameter_unknown, api_version_invalid, idempotency_key_missing, idempotency_key_invalid, idempotency_key_reused, payment_unexpected_state, amount_too_large","x-kashu-error-codes":["invalid_json","parameter_missing","parameter_invalid","parameter_unknown","api_version_invalid","idempotency_key_missing","idempotency_key_invalid","idempotency_key_reused","payment_unexpected_state","amount_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed, payments_not_enabled","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed","payments_not_enabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use, operation_in_progress","x-kashu-error-codes":["idempotency_key_in_use","operation_in_progress"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/payments/{id}/void":{"post":{"operationId":"payments.void","summary":"Release an authorized payment that has not been captured","tags":["Payments"],"x-kashu-scope":"payments:write","x-kashu-publishable":false,"x-kashu-lane":"money","x-kashu-idempotency":"required","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^py_[0-9A-Za-z]{24}$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Required. Retry with the same key and get the same result.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeysRevokeBody"}}}},"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"400":{"description":"invalid_json, parameter_unknown, api_version_invalid, idempotency_key_missing, idempotency_key_invalid, idempotency_key_reused, payment_unexpected_state","x-kashu-error-codes":["invalid_json","parameter_unknown","api_version_invalid","idempotency_key_missing","idempotency_key_invalid","idempotency_key_reused","payment_unexpected_state"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed, payments_not_enabled","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed","payments_not_enabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use, operation_in_progress","x-kashu-error-codes":["idempotency_key_in_use","operation_in_progress"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/refunds":{"post":{"operationId":"refunds.create","summary":"Refund part or all of a captured payment. Without an amount, all that is left","tags":["Refunds"],"x-kashu-scope":"refunds:write","x-kashu-publishable":false,"x-kashu-lane":"money","x-kashu-idempotency":"required","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Required. Retry with the same key and get the same result.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundsCreateBody"}}}},"responses":{"201":{"description":"Created","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refund"}}}},"400":{"description":"invalid_json, parameter_missing, parameter_invalid, parameter_unknown, api_version_invalid, idempotency_key_missing, idempotency_key_invalid, idempotency_key_reused, payment_unexpected_state, amount_too_large","x-kashu-error-codes":["invalid_json","parameter_missing","parameter_invalid","parameter_unknown","api_version_invalid","idempotency_key_missing","idempotency_key_invalid","idempotency_key_reused","payment_unexpected_state","amount_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed, payments_not_enabled","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed","payments_not_enabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use, operation_in_progress","x-kashu-error-codes":["idempotency_key_in_use","operation_in_progress"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"refunds.list","summary":"List refunds, newest first","tags":["Refunds"],"x-kashu-scope":"refunds:read","x-kashu-publishable":false,"x-kashu-lane":"list","x-kashu-idempotency":"none","parameters":[{"name":"payment","in":"query","required":false,"schema":{"type":"string","pattern":"^py_[0-9A-Za-z]{24}$"}},{"name":"limit","in":"query","required":false,"schema":{"default":10,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundsListResponse"}}}},"400":{"description":"parameter_missing, parameter_invalid, parameter_unknown, cursor_invalid, cursor_expired, api_version_invalid","x-kashu-error-codes":["parameter_missing","parameter_invalid","parameter_unknown","cursor_invalid","cursor_expired","api_version_invalid"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/refunds/{id}":{"get":{"operationId":"refunds.retrieve","summary":"Retrieve a refund","tags":["Refunds"],"x-kashu-scope":"refunds:read","x-kashu-publishable":false,"x-kashu-lane":"read","x-kashu-idempotency":"none","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^rf_[0-9A-Za-z]{24}$"}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refund"}}}},"400":{"description":"parameter_unknown, api_version_invalid","x-kashu-error-codes":["parameter_unknown","api_version_invalid"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/subscriptions":{"post":{"operationId":"subscriptions.create","summary":"Bill a customer's saved card on a schedule. The first charge is made at once; it and every renewal arrive as payments that name the subscription","tags":["Subscriptions"],"x-kashu-scope":"subscriptions:write","x-kashu-publishable":false,"x-kashu-lane":"money","x-kashu-idempotency":"required","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Required. Retry with the same key and get the same result.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionsCreateBody"}}}},"responses":{"201":{"description":"Created","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"400":{"description":"invalid_json, parameter_missing, parameter_invalid, parameter_unknown, api_version_invalid, idempotency_key_missing, idempotency_key_invalid, idempotency_key_reused","x-kashu-error-codes":["invalid_json","parameter_missing","parameter_invalid","parameter_unknown","api_version_invalid","idempotency_key_missing","idempotency_key_invalid","idempotency_key_reused"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed, payments_not_enabled","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed","payments_not_enabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use","x-kashu-error-codes":["idempotency_key_in_use"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"subscriptions.list","summary":"List subscriptions, newest first","tags":["Subscriptions"],"x-kashu-scope":"subscriptions:read","x-kashu-publishable":false,"x-kashu-lane":"list","x-kashu-idempotency":"none","parameters":[{"name":"customer","in":"query","required":false,"schema":{"type":"string","pattern":"^cu_[0-9A-Za-z]{24}$"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","active","canceled","failed"]}},{"name":"limit","in":"query","required":false,"schema":{"default":10,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionsListResponse"}}}},"400":{"description":"parameter_missing, parameter_invalid, parameter_unknown, cursor_invalid, cursor_expired, api_version_invalid","x-kashu-error-codes":["parameter_missing","parameter_invalid","parameter_unknown","cursor_invalid","cursor_expired","api_version_invalid"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/subscriptions/{id}":{"get":{"operationId":"subscriptions.retrieve","summary":"Retrieve a subscription","tags":["Subscriptions"],"x-kashu-scope":"subscriptions:read","x-kashu-publishable":false,"x-kashu-lane":"read","x-kashu-idempotency":"none","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^sb_[0-9A-Za-z]{24}$"}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"400":{"description":"parameter_unknown, api_version_invalid","x-kashu-error-codes":["parameter_unknown","api_version_invalid"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/subscriptions/{id}/cancel":{"post":{"operationId":"subscriptions.cancel","summary":"Cancel a subscription at the end of its period, or now with at_period_end false. Either way nothing more is billed after it ends","tags":["Subscriptions"],"x-kashu-scope":"subscriptions:write","x-kashu-publishable":false,"x-kashu-lane":"money","x-kashu-idempotency":"required","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^sb_[0-9A-Za-z]{24}$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Required. Retry with the same key and get the same result.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionsCancelBody"}}}},"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"400":{"description":"invalid_json, parameter_missing, parameter_invalid, parameter_unknown, api_version_invalid, idempotency_key_missing, idempotency_key_invalid, idempotency_key_reused, subscription_unexpected_state","x-kashu-error-codes":["invalid_json","parameter_missing","parameter_invalid","parameter_unknown","api_version_invalid","idempotency_key_missing","idempotency_key_invalid","idempotency_key_reused","subscription_unexpected_state"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed, payments_not_enabled","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed","payments_not_enabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use, operation_in_progress","x-kashu-error-codes":["idempotency_key_in_use","operation_in_progress"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/subscriptions/{id}/resume":{"post":{"operationId":"subscriptions.resume","summary":"Undo a cancel scheduled for the end of the period. A canceled subscription cannot be resumed","tags":["Subscriptions"],"x-kashu-scope":"subscriptions:write","x-kashu-publishable":false,"x-kashu-lane":"money","x-kashu-idempotency":"required","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^sb_[0-9A-Za-z]{24}$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Required. Retry with the same key and get the same result.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeysRevokeBody"}}}},"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"400":{"description":"invalid_json, parameter_unknown, api_version_invalid, idempotency_key_missing, idempotency_key_invalid, idempotency_key_reused, subscription_unexpected_state","x-kashu-error-codes":["invalid_json","parameter_unknown","api_version_invalid","idempotency_key_missing","idempotency_key_invalid","idempotency_key_reused","subscription_unexpected_state"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed, payments_not_enabled","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed","payments_not_enabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use, operation_in_progress","x-kashu-error-codes":["idempotency_key_in_use","operation_in_progress"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/subscriptions/{id}/charge_now":{"post":{"operationId":"subscriptions.charge_now","summary":"Bill the subscription now if its next charge is due within 12 hours. Otherwise nothing is charged and it is returned unchanged","tags":["Subscriptions"],"x-kashu-scope":"subscriptions:write","x-kashu-publishable":false,"x-kashu-lane":"money","x-kashu-idempotency":"required","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^sb_[0-9A-Za-z]{24}$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Required. Retry with the same key and get the same result.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeysRevokeBody"}}}},"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"400":{"description":"invalid_json, parameter_unknown, api_version_invalid, idempotency_key_missing, idempotency_key_invalid, idempotency_key_reused, subscription_unexpected_state","x-kashu-error-codes":["invalid_json","parameter_unknown","api_version_invalid","idempotency_key_missing","idempotency_key_invalid","idempotency_key_reused","subscription_unexpected_state"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed, payments_not_enabled","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed","payments_not_enabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use, operation_in_progress","x-kashu-error-codes":["idempotency_key_in_use","operation_in_progress"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/disputes/{id}":{"get":{"operationId":"disputes.retrieve","summary":"Retrieve a dispute","tags":["Disputes"],"x-kashu-scope":"disputes:read","x-kashu-publishable":false,"x-kashu-lane":"read","x-kashu-idempotency":"none","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^dp_[0-9A-Za-z]{24}$"}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dispute"}}}},"400":{"description":"parameter_unknown, api_version_invalid","x-kashu-error-codes":["parameter_unknown","api_version_invalid"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/disputes":{"get":{"operationId":"disputes.list","summary":"List disputes, newest first","tags":["Disputes"],"x-kashu-scope":"disputes:read","x-kashu-publishable":false,"x-kashu-lane":"list","x-kashu-idempotency":"none","parameters":[{"name":"payment","in":"query","required":false,"schema":{"type":"string","pattern":"^py_[0-9A-Za-z]{24}$"}},{"name":"limit","in":"query","required":false,"schema":{"default":10,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisputesListResponse"}}}},"400":{"description":"parameter_missing, parameter_invalid, parameter_unknown, cursor_invalid, cursor_expired, api_version_invalid","x-kashu-error-codes":["parameter_missing","parameter_invalid","parameter_unknown","cursor_invalid","cursor_expired","api_version_invalid"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/disputes/{id}/evidence":{"post":{"operationId":"disputes.submit_evidence","summary":"Send evidence for a dispute. Not available yet: every request answers feature_unavailable","tags":["Disputes"],"x-kashu-scope":"disputes:write","x-kashu-publishable":false,"x-kashu-lane":"money","x-kashu-idempotency":"required","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^dp_[0-9A-Za-z]{24}$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Required. Retry with the same key and get the same result.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisputesSubmitEvidenceBody"}}}},"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dispute"}}}},"400":{"description":"invalid_json, parameter_missing, parameter_invalid, parameter_unknown, api_version_invalid, idempotency_key_missing, idempotency_key_invalid, idempotency_key_reused","x-kashu-error-codes":["invalid_json","parameter_missing","parameter_invalid","parameter_unknown","api_version_invalid","idempotency_key_missing","idempotency_key_invalid","idempotency_key_reused"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed, feature_unavailable","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed","feature_unavailable"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use","x-kashu-error-codes":["idempotency_key_in_use"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/disputes/{id}/accept":{"post":{"operationId":"disputes.accept","summary":"Accept a dispute and give up the disputed amount. Not available yet: every request answers feature_unavailable","tags":["Disputes"],"x-kashu-scope":"disputes:write","x-kashu-publishable":false,"x-kashu-lane":"money","x-kashu-idempotency":"required","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^dp_[0-9A-Za-z]{24}$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Required. Retry with the same key and get the same result.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeysRevokeBody"}}}},"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dispute"}}}},"400":{"description":"invalid_json, parameter_unknown, api_version_invalid, idempotency_key_missing, idempotency_key_invalid, idempotency_key_reused","x-kashu-error-codes":["invalid_json","parameter_unknown","api_version_invalid","idempotency_key_missing","idempotency_key_invalid","idempotency_key_reused"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed, feature_unavailable","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed","feature_unavailable"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use","x-kashu-error-codes":["idempotency_key_in_use"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/checkout_sessions":{"post":{"operationId":"checkout_sessions.create","summary":"Create a checkout session for Kashu.js to take payment for. The response is the only place its client secret appears","tags":["Checkout sessions"],"x-kashu-scope":"checkout_sessions:write","x-kashu-publishable":false,"x-kashu-lane":"write","x-kashu-idempotency":"optional","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional. When absent, Kashu mints one and returns it.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionsCreateBody"}}}},"responses":{"201":{"description":"Created","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSession"}}}},"400":{"description":"invalid_json, parameter_missing, parameter_invalid, parameter_unknown, api_version_invalid, idempotency_key_invalid, idempotency_key_reused","x-kashu-error-codes":["invalid_json","parameter_missing","parameter_invalid","parameter_unknown","api_version_invalid","idempotency_key_invalid","idempotency_key_reused"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed, payments_not_enabled","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed","payments_not_enabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use","x-kashu-error-codes":["idempotency_key_in_use"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"checkout_sessions.list","summary":"List checkout sessions, newest first","tags":["Checkout sessions"],"x-kashu-scope":"checkout_sessions:read","x-kashu-publishable":false,"x-kashu-lane":"list","x-kashu-idempotency":"none","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","complete","expired"]}},{"name":"customer","in":"query","required":false,"schema":{"type":"string","pattern":"^cu_[0-9A-Za-z]{24}$"}},{"name":"limit","in":"query","required":false,"schema":{"default":10,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionsListResponse"}}}},"400":{"description":"parameter_missing, parameter_invalid, parameter_unknown, cursor_invalid, cursor_expired, api_version_invalid","x-kashu-error-codes":["parameter_missing","parameter_invalid","parameter_unknown","cursor_invalid","cursor_expired","api_version_invalid"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/checkout_sessions/{id}":{"get":{"operationId":"checkout_sessions.retrieve","summary":"Retrieve a checkout session","tags":["Checkout sessions"],"x-kashu-scope":"checkout_sessions:read","x-kashu-publishable":false,"x-kashu-lane":"read","x-kashu-idempotency":"none","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^cs_[0-9A-Za-z]{24}$"}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSession"}}}},"400":{"description":"parameter_unknown, api_version_invalid","x-kashu-error-codes":["parameter_unknown","api_version_invalid"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/checkout_sessions/{id}/expire":{"post":{"operationId":"checkout_sessions.expire","summary":"Expire an open checkout session now, so it takes no payment. A session whose payment is in flight or made cannot be expired","tags":["Checkout sessions"],"x-kashu-scope":"checkout_sessions:write","x-kashu-publishable":false,"x-kashu-lane":"write","x-kashu-idempotency":"optional","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^cs_[0-9A-Za-z]{24}$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional. When absent, Kashu mints one and returns it.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeysRevokeBody"}}}},"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSession"}}}},"400":{"description":"invalid_json, parameter_unknown, api_version_invalid, idempotency_key_invalid, idempotency_key_reused, checkout_session_unexpected_state","x-kashu-error-codes":["invalid_json","parameter_unknown","api_version_invalid","idempotency_key_invalid","idempotency_key_reused","checkout_session_unexpected_state"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use","x-kashu-error-codes":["idempotency_key_in_use"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/checkout_sessions/{id}/client":{"get":{"operationId":"checkout_sessions.retrieve_client","summary":"Read what the card form shows of a session, with the publishable key and the session's client secret","tags":["Checkout sessions"],"x-kashu-scope":"checkout_sessions:read","x-kashu-publishable":true,"x-kashu-lane":"read","x-kashu-idempotency":"none","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^cs_[0-9A-Za-z]{24}$"}},{"name":"client_secret","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionClient"}}}},"400":{"description":"parameter_missing, parameter_invalid, parameter_unknown, api_version_invalid","x-kashu-error-codes":["parameter_missing","parameter_invalid","parameter_unknown","api_version_invalid"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope","x-kashu-error-codes":["livemode_unavailable","insufficient_scope"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/checkout_sessions/{id}/pay":{"post":{"operationId":"checkout_sessions.pay","summary":"Pay a checkout session with a card token. Kashu's card form calls this for you","tags":["Checkout sessions"],"x-kashu-scope":"checkout_sessions:write","x-kashu-publishable":true,"x-kashu-lane":"money","x-kashu-idempotency":"required","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^cs_[0-9A-Za-z]{24}$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Required. Retry with the same key and get the same result.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionsPayBody"}}}},"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionClient"}}}},"400":{"description":"invalid_json, parameter_missing, parameter_invalid, parameter_unknown, api_version_invalid, idempotency_key_missing, idempotency_key_invalid, idempotency_key_reused, token_already_used, token_expired, checkout_session_unexpected_state","x-kashu-error-codes":["invalid_json","parameter_missing","parameter_invalid","parameter_unknown","api_version_invalid","idempotency_key_missing","idempotency_key_invalid","idempotency_key_reused","token_already_used","token_expired","checkout_session_unexpected_state"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, payments_not_enabled","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","payments_not_enabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use, operation_in_progress","x-kashu-error-codes":["idempotency_key_in_use","operation_in_progress"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhook_endpoints":{"post":{"operationId":"webhook_endpoints.create","summary":"Create a webhook endpoint. The response is the only place its signing secret appears","tags":["Webhook endpoints"],"x-kashu-scope":"webhook_endpoints:write","x-kashu-publishable":false,"x-kashu-lane":"write","x-kashu-idempotency":"optional","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional. When absent, Kashu mints one and returns it.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointsCreateBody"}}}},"responses":{"201":{"description":"Created","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"description":"invalid_json, parameter_missing, parameter_invalid, parameter_unknown, api_version_invalid, idempotency_key_invalid, idempotency_key_reused, webhook_endpoint_limit","x-kashu-error-codes":["invalid_json","parameter_missing","parameter_invalid","parameter_unknown","api_version_invalid","idempotency_key_invalid","idempotency_key_reused","webhook_endpoint_limit"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use","x-kashu-error-codes":["idempotency_key_in_use"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"webhook_endpoints.list","summary":"List the webhook endpoints of the calling key's mode, newest first","tags":["Webhook endpoints"],"x-kashu-scope":"webhook_endpoints:read","x-kashu-publishable":false,"x-kashu-lane":"list","x-kashu-idempotency":"none","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":10,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointsListResponse"}}}},"400":{"description":"parameter_missing, parameter_invalid, parameter_unknown, cursor_invalid, cursor_expired, api_version_invalid","x-kashu-error-codes":["parameter_missing","parameter_invalid","parameter_unknown","cursor_invalid","cursor_expired","api_version_invalid"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhook_endpoints/{id}":{"get":{"operationId":"webhook_endpoints.retrieve","summary":"Retrieve a webhook endpoint","tags":["Webhook endpoints"],"x-kashu-scope":"webhook_endpoints:read","x-kashu-publishable":false,"x-kashu-lane":"read","x-kashu-idempotency":"none","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^we_[0-9A-Za-z]{24}$"}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"description":"parameter_unknown, api_version_invalid","x-kashu-error-codes":["parameter_unknown","api_version_invalid"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"webhook_endpoints.update","summary":"Update a webhook endpoint: its URL, description and event types, or disable and enable it","tags":["Webhook endpoints"],"x-kashu-scope":"webhook_endpoints:write","x-kashu-publishable":false,"x-kashu-lane":"write","x-kashu-idempotency":"optional","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^we_[0-9A-Za-z]{24}$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional. When absent, Kashu mints one and returns it.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointsUpdateBody"}}}},"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"description":"invalid_json, parameter_missing, parameter_invalid, parameter_unknown, api_version_invalid, idempotency_key_invalid, idempotency_key_reused","x-kashu-error-codes":["invalid_json","parameter_missing","parameter_invalid","parameter_unknown","api_version_invalid","idempotency_key_invalid","idempotency_key_reused"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use","x-kashu-error-codes":["idempotency_key_in_use"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"webhook_endpoints.delete","summary":"Delete a webhook endpoint. Kashu sends it nothing more","tags":["Webhook endpoints"],"x-kashu-scope":"webhook_endpoints:write","x-kashu-publishable":false,"x-kashu-lane":"write","x-kashu-idempotency":"optional","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^we_[0-9A-Za-z]{24}$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional. When absent, Kashu mints one and returns it.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeysRevokeBody"}}}},"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedWebhookEndpoint"}}}},"400":{"description":"invalid_json, parameter_unknown, api_version_invalid, idempotency_key_invalid, idempotency_key_reused","x-kashu-error-codes":["invalid_json","parameter_unknown","api_version_invalid","idempotency_key_invalid","idempotency_key_reused"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use","x-kashu-error-codes":["idempotency_key_in_use"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhook_endpoints/{id}/roll":{"post":{"operationId":"webhook_endpoints.roll","summary":"Replace the endpoint's signing secret at once. The response is the only place the new secret appears","tags":["Webhook endpoints"],"x-kashu-scope":"webhook_endpoints:write","x-kashu-publishable":false,"x-kashu-lane":"write","x-kashu-idempotency":"optional","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^we_[0-9A-Za-z]{24}$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional. When absent, Kashu mints one and returns it.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeysRevokeBody"}}}},"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"description":"invalid_json, parameter_unknown, api_version_invalid, idempotency_key_invalid, idempotency_key_reused","x-kashu-error-codes":["invalid_json","parameter_unknown","api_version_invalid","idempotency_key_invalid","idempotency_key_reused"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use","x-kashu-error-codes":["idempotency_key_in_use"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/events":{"get":{"operationId":"events.list","summary":"List events, newest first, each with its object as it is now","tags":["Events"],"x-kashu-scope":"events:read","x-kashu-publishable":false,"x-kashu-lane":"list","x-kashu-idempotency":"none","parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["customer.created","customer.updated","payment.created","payment.updated","payment.requires_action","payment.requires_capture","payment.succeeded","payment.failed","payment.canceled","refund.created","refund.succeeded","refund.failed","subscription.created","subscription.updated","subscription.canceled","dispute.created","dispute.updated","checkout.session.completed","checkout.session.expired"]}},{"name":"limit","in":"query","required":false,"schema":{"default":10,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventsListResponse"}}}},"400":{"description":"parameter_missing, parameter_invalid, parameter_unknown, cursor_invalid, cursor_expired, api_version_invalid","x-kashu-error-codes":["parameter_missing","parameter_invalid","parameter_unknown","cursor_invalid","cursor_expired","api_version_invalid"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/events/{id}":{"get":{"operationId":"events.retrieve","summary":"Retrieve an event, with its object as it is now","tags":["Events"],"x-kashu-scope":"events:read","x-kashu-publishable":false,"x-kashu-lane":"read","x-kashu-idempotency":"none","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^ev_[0-9A-Za-z]{24}$"}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"400":{"description":"parameter_unknown, api_version_invalid","x-kashu-error-codes":["parameter_unknown","api_version_invalid"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/events/{id}/redeliver":{"post":{"operationId":"events.redeliver","summary":"Send an event again, now: to one endpoint, or to every enabled endpoint that takes its type","tags":["Events"],"x-kashu-scope":"events:write","x-kashu-publishable":false,"x-kashu-lane":"write","x-kashu-idempotency":"optional","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^ev_[0-9A-Za-z]{24}$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional. When absent, Kashu mints one and returns it.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Kashu-Version","in":"header","required":false,"description":"The API version to answer in. Defaults to the key's pinned version.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventsRedeliverBody"}}}},"responses":{"200":{"description":"OK","headers":{"Request-Id":{"description":"This request's id, also in every error.","schema":{"type":"string"}},"Kashu-Version":{"description":"The API version the body is in.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"400":{"description":"invalid_json, parameter_missing, parameter_invalid, parameter_unknown, api_version_invalid, idempotency_key_invalid, idempotency_key_reused","x-kashu-error-codes":["invalid_json","parameter_missing","parameter_invalid","parameter_unknown","api_version_invalid","idempotency_key_invalid","idempotency_key_reused"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"api_key_missing, api_key_invalid, api_key_expired","x-kashu-error-codes":["api_key_missing","api_key_invalid","api_key_expired"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"livemode_unavailable, insufficient_scope, publishable_key_not_allowed","x-kashu-error-codes":["livemode_unavailable","insufficient_scope","publishable_key_not_allowed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"resource_missing","x-kashu-error-codes":["resource_missing"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_key_in_use","x-kashu-error-codes":["idempotency_key_in_use"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","x-kashu-error-codes":["rate_limited"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"api_error","x-kashu-error-codes":["api_error"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"kashu_sk_... (secret), kashu_rk_... (restricted to its scopes) or, on endpoints marked x-kashu-publishable, kashu_pk_..."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","idempotency_error","rate_limit_error","api_error"]},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","api_key_expired","livemode_unavailable","insufficient_scope","publishable_key_not_allowed","route_not_found","method_not_allowed","resource_missing","invalid_json","parameter_missing","parameter_invalid","parameter_unknown","cursor_invalid","cursor_expired","api_version_invalid","idempotency_key_missing","idempotency_key_invalid","idempotency_key_reused","idempotency_key_in_use","payment_unexpected_state","amount_too_large","operation_in_progress","payments_not_enabled","subscription_unexpected_state","feature_unavailable","token_already_used","token_expired","checkout_session_unexpected_state","webhook_endpoint_limit","rate_limited","api_error"]},"message":{"type":"string"},"param":{"type":"string"},"request_id":{"type":"string","pattern":"^req_[0-9A-Za-z]{24}$"},"doc_url":{"type":"string"}},"required":["type","code","message","request_id","doc_url"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"Account":{"type":"object","properties":{"object":{"type":"string","const":"account"},"business_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"livemode":{"type":"boolean"},"api_version":{"type":"string","enum":["2026-11-06"]},"default_store":{"anyOf":[{"type":"string","pattern":"^st_[0-9A-Za-z]{24}$"},{"type":"null"}]}},"required":["object","business_name","livemode","api_version","default_store"],"additionalProperties":false},"ApiKey":{"type":"object","properties":{"id":{"type":"string","pattern":"^key_[0-9A-Za-z]{24}$"},"object":{"type":"string","const":"api_key"},"type":{"type":"string","enum":["secret","restricted","publishable"]},"livemode":{"type":"boolean"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"display":{"type":"string"},"token":{"type":"string"},"scopes":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-z_]+:(read|write)$"}},{"type":"null"}]},"allowed_origins":{"description":"Where a publishable key's card form may be embedded. null for every other kind of key.","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"status":{"type":"string","enum":["active","expiring","revoked"]},"api_version":{"type":"string","enum":["2026-11-06"]},"expires_at":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"created":{"type":"integer","minimum":0}},"required":["id","object","type","livemode","label","display","scopes","allowed_origins","status","api_version","expires_at","revoked_at","created"],"additionalProperties":false},"CardToken":{"type":"object","properties":{"id":{"type":"string","pattern":"^tok_[0-9A-Za-z]{24}$"},"object":{"type":"string","const":"card_token"},"used":{"type":"boolean"},"livemode":{"type":"boolean"},"created":{"type":"integer","minimum":0},"expires_at":{"type":"integer","minimum":0}},"required":["id","object","used","livemode","created","expires_at"],"additionalProperties":false},"Customer":{"type":"object","properties":{"id":{"type":"string","pattern":"^cu_[0-9A-Za-z]{24}$"},"object":{"type":"string","const":"customer"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"address":{"anyOf":[{"type":"object","properties":{"line1":{"anyOf":[{"type":"string"},{"type":"null"}]},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"anyOf":[{"type":"string"},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["line1","line2","city","state","postal_code","country"],"additionalProperties":false},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"livemode":{"type":"boolean"},"created":{"type":"integer","minimum":0}},"required":["id","object","email","name","phone","address","metadata","livemode","created"],"additionalProperties":false},"PaymentMethod":{"type":"object","properties":{"id":{"type":"string","pattern":"^pm_[0-9A-Za-z]{24}$"},"object":{"type":"string","const":"payment_method"},"type":{"type":"string","enum":["card"]},"status":{"type":"string","enum":["active","detached","processing","failed"]},"customer":{"anyOf":[{"type":"string","pattern":"^cu_[0-9A-Za-z]{24}$"},{"type":"null"}]},"card":{"anyOf":[{"type":"object","properties":{"brand":{"type":"string"},"last4":{"type":"string"},"exp_month":{"anyOf":[{"type":"integer"},{"type":"null"}]},"exp_year":{"anyOf":[{"type":"integer"},{"type":"null"}]},"funding":{"type":"string","enum":["credit","debit","prepaid","unknown"]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["brand","last4","exp_month","exp_year","funding","country"],"additionalProperties":false},{"type":"null"}]},"livemode":{"type":"boolean"},"created":{"type":"integer","minimum":0}},"required":["id","object","type","status","customer","card","livemode","created"],"additionalProperties":false},"Dispute":{"type":"object","properties":{"id":{"type":"string","pattern":"^dp_[0-9A-Za-z]{24}$"},"object":{"type":"string","const":"dispute"},"payment":{"type":"string","pattern":"^py_[0-9A-Za-z]{24}$"},"amount":{"anyOf":[{"type":"integer","exclusiveMinimum":0},{"type":"null"}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["warning_needs_response","warning_under_review","warning_closed","needs_response","under_review","won","lost"]},"reason":{"type":"string","enum":["bank_cannot_process","credit_not_processed","customer_initiated","debit_not_authorized","duplicate","fraudulent","general","incorrect_account_details","insufficient_funds","product_not_received","product_unacceptable","subscription_canceled","unrecognized"]},"evidence_due_by":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"livemode":{"type":"boolean"},"created":{"type":"integer","minimum":0}},"required":["id","object","payment","amount","currency","status","reason","evidence_due_by","livemode","created"],"additionalProperties":false},"Payment":{"type":"object","properties":{"id":{"type":"string","pattern":"^py_[0-9A-Za-z]{24}$"},"object":{"type":"string","const":"payment"},"amount":{"type":"integer","exclusiveMinimum":0},"amount_capturable":{"type":"integer","minimum":0},"amount_captured":{"type":"integer","minimum":0},"amount_refunded":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"capture_method":{"type":"string","enum":["automatic","manual"]},"status":{"type":"string","enum":["pending","requires_action","requires_capture","succeeded","failed","canceled","processing"]},"store":{"type":"string","pattern":"^st_[0-9A-Za-z]{24}$"},"customer":{"anyOf":[{"type":"string","pattern":"^cu_[0-9A-Za-z]{24}$"},{"type":"null"}]},"payment_method":{"anyOf":[{"type":"string","pattern":"^pm_[0-9A-Za-z]{24}$"},{"type":"null"}]},"subscription":{"description":"The subscription this payment renewed, for a payment made on a schedule.","anyOf":[{"type":"string","pattern":"^sb_[0-9A-Za-z]{24}$"},{"type":"null"}]},"disputed":{"description":"Whether the buyer has disputed the payment. The dispute never changes its amounts.","type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"statement_descriptor":{"anyOf":[{"type":"string"},{"type":"null"}]},"failure_code":{"anyOf":[{"type":"string","enum":["card_declined","processing_error"]},{"type":"null"}]},"decline_code":{"anyOf":[{"type":"string","enum":["generic_decline","insufficient_funds","do_not_honor","expired_card","incorrect_cvc","lost_card","stolen_card","fraudulent"]},{"type":"null"}]},"next_action":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"redirect_to_url"},"redirect_to_url":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false}},"required":["type","redirect_to_url"],"additionalProperties":false},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"livemode":{"type":"boolean"},"created":{"type":"integer","minimum":0}},"required":["id","object","amount","amount_capturable","amount_captured","amount_refunded","currency","capture_method","status","store","customer","payment_method","subscription","disputed","description","statement_descriptor","failure_code","decline_code","next_action","metadata","livemode","created"],"additionalProperties":false},"Refund":{"type":"object","properties":{"id":{"type":"string","pattern":"^rf_[0-9A-Za-z]{24}$"},"object":{"type":"string","const":"refund"},"amount":{"type":"integer","exclusiveMinimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"payment":{"type":"string","pattern":"^py_[0-9A-Za-z]{24}$"},"status":{"type":"string","enum":["pending","succeeded","failed"]},"reason":{"anyOf":[{"type":"string","enum":["requested_by_customer","duplicate","fraudulent"]},{"type":"null"}]},"failure_reason":{"anyOf":[{"type":"string","enum":["already_refunded","processing_error"]},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"livemode":{"type":"boolean"},"created":{"type":"integer","minimum":0}},"required":["id","object","amount","currency","payment","status","reason","failure_reason","metadata","livemode","created"],"additionalProperties":false},"CheckoutSession":{"type":"object","properties":{"id":{"type":"string","pattern":"^cs_[0-9A-Za-z]{24}$"},"object":{"type":"string","const":"checkout_session"},"status":{"type":"string","enum":["open","complete","expired"]},"payment_status":{"description":"unpaid until a payment is made or after one failed; processing while one is in flight; authorized when held for capture; paid once captured.","type":"string","enum":["unpaid","processing","authorized","paid"]},"amount":{"type":"integer","exclusiveMinimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"capture_method":{"type":"string","enum":["automatic","manual"]},"customer":{"anyOf":[{"type":"string","pattern":"^cu_[0-9A-Za-z]{24}$"},{"type":"null"}]},"payment":{"description":"The latest payment made for the session.","anyOf":[{"type":"string","pattern":"^py_[0-9A-Za-z]{24}$"},{"type":"null"}]},"store":{"type":"string","pattern":"^st_[0-9A-Za-z]{24}$"},"success_url":{"type":"string"},"cancel_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"client_secret":{"description":"For Kashu.js in the buyer's page. Shown only in the response that created the session; keep it with the order.","anyOf":[{"type":"string"},{"type":"null"}]},"expires_at":{"type":"integer","minimum":0},"completed_at":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"livemode":{"type":"boolean"},"created":{"type":"integer","minimum":0}},"required":["id","object","status","payment_status","amount","currency","capture_method","customer","payment","store","success_url","cancel_url","client_secret","expires_at","completed_at","metadata","livemode","created"],"additionalProperties":false},"CheckoutSessionClient":{"type":"object","properties":{"id":{"type":"string","pattern":"^cs_[0-9A-Za-z]{24}$"},"object":{"type":"string","const":"checkout_session"},"status":{"type":"string","enum":["open","complete","expired"]},"payment_status":{"description":"unpaid until a payment is made or after one failed; processing while one is in flight; authorized when held for capture; paid once captured.","type":"string","enum":["unpaid","processing","authorized","paid"]},"payment_error":{"description":"Why the latest attempt failed, while the session is open for another.","anyOf":[{"type":"string","enum":["card_declined","processing_error"]},{"type":"null"}]},"amount":{"type":"integer","exclusiveMinimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"collect_email":{"description":"Whether the form asks for the buyer's email: the session names no customer.","type":"boolean"},"success_url":{"type":"string"},"expires_at":{"type":"integer","minimum":0},"livemode":{"type":"boolean"}},"required":["id","object","status","payment_status","payment_error","amount","currency","collect_email","success_url","expires_at","livemode"],"additionalProperties":false},"Subscription":{"type":"object","properties":{"id":{"type":"string","pattern":"^sb_[0-9A-Za-z]{24}$"},"object":{"type":"string","const":"subscription"},"status":{"type":"string","enum":["pending","active","canceled","failed","processing"]},"customer":{"type":"string","pattern":"^cu_[0-9A-Za-z]{24}$"},"payment_method":{"type":"string","pattern":"^pm_[0-9A-Za-z]{24}$"},"store":{"type":"string","pattern":"^st_[0-9A-Za-z]{24}$"},"amount":{"type":"integer","exclusiveMinimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"interval":{"type":"string","enum":["day","week","month","year"]},"interval_count":{"type":"integer","exclusiveMinimum":0},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"current_period_start":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"current_period_end":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"next_billing_at":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"canceled_at":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"livemode":{"type":"boolean"},"created":{"type":"integer","minimum":0}},"required":["id","object","status","customer","payment_method","store","amount","currency","interval","interval_count","description","cancel_at_period_end","current_period_start","current_period_end","next_billing_at","canceled_at","metadata","livemode","created"],"additionalProperties":false},"Event":{"type":"object","properties":{"id":{"type":"string","pattern":"^ev_[0-9A-Za-z]{24}$"},"object":{"type":"string","const":"event"},"type":{"type":"string","enum":["customer.created","customer.updated","payment.created","payment.updated","payment.requires_action","payment.requires_capture","payment.succeeded","payment.failed","payment.canceled","refund.created","refund.succeeded","refund.failed","subscription.created","subscription.updated","subscription.canceled","dispute.created","dispute.updated","checkout.session.completed","checkout.session.expired"]},"api_version":{"type":"string","enum":["2026-11-06"]},"created":{"type":"integer","minimum":0},"livemode":{"type":"boolean"},"data":{"type":"object","properties":{"object_version":{"type":"integer","exclusiveMinimum":0},"object":{"anyOf":[{"$ref":"#/components/schemas/Customer"},{"$ref":"#/components/schemas/Payment"},{"$ref":"#/components/schemas/Refund"},{"$ref":"#/components/schemas/Subscription"},{"$ref":"#/components/schemas/Dispute"},{"$ref":"#/components/schemas/CheckoutSession"}]}},"required":["object_version","object"],"additionalProperties":false}},"required":["id","object","type","api_version","created","livemode","data"],"additionalProperties":false},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","pattern":"^we_[0-9A-Za-z]{24}$"},"object":{"type":"string","const":"webhook_endpoint"},"url":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled_events":{"type":"array","items":{"type":"string","enum":["*","customer.created","customer.updated","payment.created","payment.updated","payment.requires_action","payment.requires_capture","payment.succeeded","payment.failed","payment.canceled","refund.created","refund.succeeded","refund.failed","subscription.created","subscription.updated","subscription.canceled","dispute.created","dispute.updated","checkout.session.completed","checkout.session.expired"]}},"status":{"type":"string","enum":["enabled","disabled"]},"disabled_reason":{"anyOf":[{"type":"string","enum":["requested","failing"]},{"type":"null"}]},"api_version":{"type":"string","enum":["2026-11-06"]},"secret":{"type":"string"},"secret_last4":{"type":"string"},"livemode":{"type":"boolean"},"created":{"type":"integer","minimum":0}},"required":["id","object","url","description","enabled_events","status","disabled_reason","api_version","secret_last4","livemode","created"],"additionalProperties":false},"DeletedWebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","pattern":"^we_[0-9A-Za-z]{24}$"},"object":{"type":"string","const":"webhook_endpoint"},"deleted":{"type":"boolean","const":true}},"required":["id","object","deleted"],"additionalProperties":false},"ApiKeysListResponse":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}},"has_more":{"type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false},"ApiKeysCreateBody":{"type":"object","properties":{"type":{"type":"string","enum":["secret","restricted","publishable"]},"scopes":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","pattern":"^[a-z_]+:(read|write)$"}},"allowed_origins":{"description":"Publishable keys only: the origins (https://shop.example.com) the card form may be embedded on. A test key may also name http://localhost or http://127.0.0.1, with a port. Without any, the card form refuses to load.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","maxLength":255}},"label":{"type":"string","minLength":1,"maxLength":100}},"required":["type"],"additionalProperties":false},"ApiKeysRollBody":{"type":"object","properties":{"expires_in":{"type":"integer","minimum":0,"maximum":604800}},"additionalProperties":false},"ApiKeysRevokeBody":{"type":"object","properties":{},"additionalProperties":false},"CustomersCreateBody":{"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-z]{2,}$"},"name":{"type":"string","minLength":1,"maxLength":200},"phone":{"type":"string","minLength":1,"maxLength":40},"address":{"type":"object","properties":{"line1":{"type":"string","minLength":1,"maxLength":200},"line2":{"type":"string","minLength":1,"maxLength":200},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string","minLength":1,"maxLength":100},"postal_code":{"type":"string","minLength":1,"maxLength":20},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"additionalProperties":false},"metadata":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"additionalProperties":false},"CustomersUpdateBody":{"type":"object","properties":{"email":{"anyOf":[{"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-z]{2,}$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"address":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string","minLength":1,"maxLength":200},"line2":{"type":"string","minLength":1,"maxLength":200},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string","minLength":1,"maxLength":100},"postal_code":{"type":"string","minLength":1,"maxLength":20},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"additionalProperties":false},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"additionalProperties":false},"CustomersListResponse":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"has_more":{"type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false},"CardTokensCreateBody":{"type":"object","properties":{"token":{"description":"What the card form's tokenizer returned. It is kept sealed and never shown again.","type":"string","minLength":1,"maxLength":4096}},"required":["token"],"additionalProperties":false},"PaymentMethodsCreateBody":{"type":"object","properties":{"customer":{"type":"string","pattern":"^cu_[0-9A-Za-z]{24}$"},"token":{"description":"A card token (tok_) from Kashu's card form. This request spends it.","type":"string","pattern":"^tok_[0-9A-Za-z]{24}$"}},"required":["customer","token"],"additionalProperties":false},"PaymentMethodsListResponse":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}},"has_more":{"type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false},"PaymentsCreateBody":{"type":"object","properties":{"amount":{"type":"integer","exclusiveMinimum":0,"maximum":99999999},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"payment_method":{"description":"A saved card to charge. Give this or token.","type":"string","pattern":"^pm_[0-9A-Za-z]{24}$"},"token":{"description":"A card token (tok_) to charge instead of a saved card; customer is then required. The card is saved for the customer and the token is spent.","type":"string","pattern":"^tok_[0-9A-Za-z]{24}$"},"customer":{"type":"string","pattern":"^cu_[0-9A-Za-z]{24}$"},"capture_method":{"type":"string","enum":["automatic","manual"]},"store":{"type":"string","pattern":"^st_[0-9A-Za-z]{24}$"},"description":{"type":"string","minLength":1,"maxLength":500},"statement_descriptor":{"type":"string","minLength":1,"maxLength":22},"metadata":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["amount","currency"],"additionalProperties":false},"PaymentsListResponse":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Payment"}},"has_more":{"type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false},"PaymentsCaptureBody":{"type":"object","properties":{"amount":{"type":"integer","exclusiveMinimum":0,"maximum":99999999}},"additionalProperties":false},"RefundsCreateBody":{"type":"object","properties":{"payment":{"type":"string","pattern":"^py_[0-9A-Za-z]{24}$"},"amount":{"type":"integer","exclusiveMinimum":0,"maximum":99999999},"reason":{"type":"string","enum":["requested_by_customer","duplicate","fraudulent"]},"metadata":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["payment"],"additionalProperties":false},"RefundsListResponse":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Refund"}},"has_more":{"type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false},"SubscriptionsCreateBody":{"type":"object","properties":{"customer":{"type":"string","pattern":"^cu_[0-9A-Za-z]{24}$"},"payment_method":{"description":"A saved card of the customer's. Every charge goes to it.","type":"string","pattern":"^pm_[0-9A-Za-z]{24}$"},"amount":{"type":"integer","exclusiveMinimum":0,"maximum":99999999},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"interval":{"type":"string","enum":["day","week","month","year"]},"interval_count":{"description":"How many intervals each period spans, 1 by default. A period is at most a year.","type":"integer","minimum":1,"maximum":365},"store":{"type":"string","pattern":"^st_[0-9A-Za-z]{24}$"},"description":{"description":"What the plan is called. The buyer may see it.","type":"string","minLength":1,"maxLength":200},"metadata":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["customer","payment_method","amount","currency","interval"],"additionalProperties":false},"SubscriptionsListResponse":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Subscription"}},"has_more":{"type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false},"SubscriptionsCancelBody":{"type":"object","properties":{"at_period_end":{"description":"true by default: the subscription runs to the end of the period it is in.","type":"boolean"}},"additionalProperties":false},"DisputesListResponse":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Dispute"}},"has_more":{"type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false},"DisputesSubmitEvidenceBody":{"type":"object","properties":{"evidence":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":20000}}},"additionalProperties":false},"CheckoutSessionsCreateBody":{"type":"object","properties":{"amount":{"type":"integer","exclusiveMinimum":0,"maximum":99999999},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"success_url":{"description":"Where Kashu.js sends the buyer once the session is paid. https; a test session may use http://localhost.","type":"string","minLength":1,"maxLength":2048},"cancel_url":{"description":"Where the buyer goes back to if they leave. The same rules as success_url.","type":"string","minLength":1,"maxLength":2048},"customer":{"description":"The buyer, if you know them. Without one the form asks for an email and makes a customer.","type":"string","pattern":"^cu_[0-9A-Za-z]{24}$"},"capture_method":{"type":"string","enum":["automatic","manual"]},"store":{"type":"string","pattern":"^st_[0-9A-Za-z]{24}$"},"expires_at":{"description":"When the session stops taking payment: 30 minutes to 24 hours from now. Defaults to 24 hours.","type":"integer","minimum":0},"metadata":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["amount","currency","success_url"],"additionalProperties":false},"CheckoutSessionsListResponse":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/CheckoutSession"}},"has_more":{"type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false},"CheckoutSessionsPayBody":{"type":"object","properties":{"client_secret":{"type":"string","minLength":1,"maxLength":200},"token":{"description":"A card token (tok_) from the card form. Paying spends it.","type":"string","pattern":"^tok_[0-9A-Za-z]{24}$"},"email":{"description":"The buyer's email, required when the session names no customer.","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-z]{2,}$"},"name":{"description":"The name on the card.","type":"string","minLength":1,"maxLength":200}},"required":["client_secret","token"],"additionalProperties":false},"WebhookEndpointsCreateBody":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048},"enabled_events":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","enum":["*","customer.created","customer.updated","payment.created","payment.updated","payment.requires_action","payment.requires_capture","payment.succeeded","payment.failed","payment.canceled","refund.created","refund.succeeded","refund.failed","subscription.created","subscription.updated","subscription.canceled","dispute.created","dispute.updated","checkout.session.completed","checkout.session.expired"]}},"description":{"type":"string","minLength":1,"maxLength":200}},"required":["url","enabled_events"],"additionalProperties":false},"WebhookEndpointsUpdateBody":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048},"enabled_events":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","enum":["*","customer.created","customer.updated","payment.created","payment.updated","payment.requires_action","payment.requires_capture","payment.succeeded","payment.failed","payment.canceled","refund.created","refund.succeeded","refund.failed","subscription.created","subscription.updated","subscription.canceled","dispute.created","dispute.updated","checkout.session.completed","checkout.session.expired"]}},"description":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"disabled":{"type":"boolean"}},"additionalProperties":false},"WebhookEndpointsListResponse":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}},"has_more":{"type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false},"EventsListResponse":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"has_more":{"type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false},"EventsRedeliverBody":{"type":"object","properties":{"endpoint":{"type":"string","pattern":"^we_[0-9A-Za-z]{24}$"}},"additionalProperties":false}}}}