Cancel a subscription immediately and credit what you paid on its most recent invoice (card charge plus any account balance applied, up to the invoice total) to your Stripe billing account balance. Designed for reseller organizations whose end-customer’s payment failed after our subscription had already renewed.
This cancels the subscription immediately (not at period end) and queues the proxies for deletion right away. The order is marked expired.
If the order was already cancelled and credited, the same call returns 200 with already_processed: true and the original credit details. You are not credited a second time.
{ "response": "success", "message": "Subscription was already cancelled and the account credited", "already_processed": true, "details": { "...": "same fields as above" }}
{ "response": "error", "message": "Refund window has passed. The most recent payment was 5 day(s) ago. Credits are only available within 3 days of renewal."}
{ "response": "error", "message": "The most recent invoice has no refundable payment. Use the delete endpoint to cancel without a credit, or contact support."}
Schedule a cancellation at period end (no immediate refund).
List Orders
Check an order’s current status.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Stat Proxies","colors":{"primary":"#10B981","light":"#34D399","dark":"#059669"},"logo":{"light":"https://mintcdn.com/statproxies/F50S_mnKvy2HL5XJ/logo/header-logo-nav.png?fit=max\u0026auto=format\u0026n=F50S_mnKvy2HL5XJ\u0026q=85\u0026s=559f073447efcad1ac3df69f669af0aa","dark":"https://mintcdn.com/statproxies/F50S_mnKvy2HL5XJ/logo/header-logo-nav.png?fit=max\u0026auto=format\u0026n=F50S_mnKvy2HL5XJ\u0026q=85\u0026s=559f073447efcad1ac3df69f669af0aa"},"favicon":"https://mintcdn.com/statproxies/F50S_mnKvy2HL5XJ/favicon.ico?fit=max\u0026auto=format\u0026n=F50S_mnKvy2HL5XJ\u0026q=85\u0026s=c381978d14b178e29d4461e03eb64195","navbar":{"links":[{"href":"https://discord.gg/6gExKHK","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://dashboard.statproxies.com"}},"footer":{"socials":{"discord":"https://discord.gg/6gExKHK","x":"https://x.com/statproxies"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Dashboard","icon":"gauge","href":"https://dashboard.statproxies.com"},{"anchor":"Discord","icon":"discord","href":"https://discord.gg/6gExKHK"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"statproxies","hasAudioNarration":false,"actualSubdomain":"statproxies","customDomains":["docs.statproxies.com"],"gitSource":{"type":"github","owner":"limitedhype","repo":"stat-proxies-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ad039a11b140aa9ff57e883","clientVersion":"0.0.4102","searchFilterCounts":[{"language":"default","tag":"API Reference","count":16},{"language":"default","tag":"Help Center","count":14},{"language":"default","tag":"Order API","count":11},{"language":"default","tag":"Getting Started","count":7},{"language":"default","tag":"Billing \u0026 Account","count":4},{"language":"default","tag":"Troubleshooting","count":3},{"language":"default","tag":"Integration Guides","count":3},{"language":"default","tag":"Account API","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/order/cancel-refund-order","slug":"/api-reference/order/cancel-refund-order","pageMetadata":{"title":"Cancel \u0026 Refund","description":"Cancel a subscription immediately and credit its most recent invoice.","api":"POST https://dashboard.statproxies.com/api/v2/order/cancel-refund/{subscription_id}/{product_id}","href":"/api-reference/order/cancel-refund-order"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Cancel a subscription immediately and credit its most recent invoice.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,Heading,ParamField,ResponseField,Table,Warning}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Cancel a subscription `,_jsx(_components.strong,{children:`immediately`}),` and credit what you paid on its most recent invoice (card charge plus any account balance applied, up to the invoice total) to your Stripe billing account balance. Designed for reseller organizations whose end-customer’s payment failed after our subscription had already renewed.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`This cancels the subscription immediately (not at period end) and queues the proxies for deletion right away. The order is marked expired.`})}),`\n`,_jsx(Heading,{level:`2`,id:`requirements`,children:`Requirements`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Organization API key only`}),` — user-scoped keys receive `,_jsx(_components.strong,{children:`403`})]}),`\n`,_jsxs(_components.li,{children:[`The `,_jsx(_components.code,{children:`cancel_refund`}),` feature must be enabled for your organization (contact support)`]}),`\n`,_jsxs(_components.li,{children:[`Must be called within `,_jsx(_components.strong,{children:`3 days (72 hours)`}),` of the most recent invoice payment`]}),`\n`,_jsxs(_components.li,{children:[`The order must be active or cancelled (not expired), and `,_jsx(_components.strong,{children:`not`}),` a crypto subscription`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`effects`,children:`Effects`}),`\n`,_jsx(_components.p,{children:`When successful:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`The order is marked `,_jsx(_components.strong,{children:`expired`})]}),`\n`,_jsxs(_components.li,{children:[`The Stripe subscription is cancelled `,_jsx(_components.strong,{children:`immediately`}),` (not at period end)`]}),`\n`,_jsx(_components.li,{children:`The amount paid on the invoice is credited to the Stripe customer the order was billed to`}),`\n`,_jsx(_components.li,{children:`The proxies are queued for deletion right away`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`request`,children:`Request`}),`\n`,_jsx(Heading,{level:`3`,id:`headers`,children:`Headers`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Header`}),_jsx(_components.th,{children:`Value`}),_jsx(_components.th,{children:`Required`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Authorization`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Bearer {your_api_key}`})}),_jsx(_components.td,{children:`Yes`})]})})]}),`\n`,_jsx(Heading,{level:`3`,id:`path-parameters`,children:`Path Parameters`}),`\n`,_jsx(ParamField,{path:`subscription_id`,type:`string`,required:true,id:`param-subscription-id`,children:_jsx(_components.p,{children:`The subscription ID from order creation.`})}),`\n`,_jsx(ParamField,{path:`product_id`,type:`string`,required:true,id:`param-product-id`,children:_jsxs(_components.p,{children:[`The product ID (e.g., `,_jsx(_components.code,{children:`\"captcha\"`}),`).`]})}),`\n`,_jsx(Heading,{level:`3`,id:`example-request`,children:`Example Request`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://dashboard.statproxies.com/api/v2/order/cancel-refund/sub_1RqJP3JB4G9i6PKHDwmKPJOb/captcha\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer {your_api_key}\"`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(Heading,{level:`3`,id:`success-response`,children:`Success Response`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Subscription cancelled and account credited\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"details\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"order_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sub_1rqjp3jb4g9i6pkhdwmkpjob\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"subscription_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sub_1RqJP3JB4G9i6PKHDwmKPJOb\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"credit_amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`25.5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"credit_amount_cents\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2550`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"invoice_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"in_1RqJP3JB4G9i6PKHAbCdEfGh\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"hours_since_renewal\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5.25`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`response-fields`,children:`Response Fields`}),`\n`,_jsx(ResponseField,{name:`response`,type:`string`,id:`param-response`,children:_jsx(_components.p,{children:`Status of the request.`})}),`\n`,_jsx(ResponseField,{name:`message`,type:`string`,id:`param-message`,children:_jsx(_components.p,{children:`Human-readable result message.`})}),`\n`,_jsx(ResponseField,{name:`details.order_id`,type:`string`,id:`param-details-order-id`,children:_jsx(_components.p,{children:`The order ID that was processed.`})}),`\n`,_jsx(ResponseField,{name:`details.subscription_id`,type:`string`,id:`param-details-subscription-id`,children:_jsx(_components.p,{children:`The Stripe subscription that was cancelled.`})}),`\n`,_jsx(ResponseField,{name:`details.credit_amount`,type:`number`,id:`param-details-credit-amount`,children:_jsx(_components.p,{children:`Amount credited, in dollars.`})}),`\n`,_jsx(ResponseField,{name:`details.credit_amount_cents`,type:`integer`,id:`param-details-credit-amount-cents`,children:_jsx(_components.p,{children:`Amount credited, in cents.`})}),`\n`,_jsx(ResponseField,{name:`details.invoice_id`,type:`string`,id:`param-details-invoice-id`,children:_jsx(_components.p,{children:`The Stripe invoice that was credited.`})}),`\n`,_jsx(ResponseField,{name:`details.hours_since_renewal`,type:`number`,id:`param-details-hours-since-renewal`,children:_jsx(_components.p,{children:`Hours between the invoice payment and this request.`})}),`\n`,_jsx(ResponseField,{name:`already_processed`,type:`boolean`,id:`param-already-processed`,children:_jsxs(_components.p,{children:[`Present and `,_jsx(_components.code,{children:`true`}),` only when an earlier request already cancelled and credited this order.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`retrying-a-completed-request`,children:`Retrying a Completed Request`}),`\n`,_jsxs(_components.p,{children:[`If the order was already cancelled and credited, the same call returns `,_jsx(_components.strong,{children:`200`}),` with `,_jsx(_components.code,{children:`already_processed: true`}),` and the original credit details. You are not credited a second time.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Subscription was already cancelled and the account credited\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"already_processed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"details\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"same fields as above\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`error-responses`,children:`Error Responses`}),`\n`,_jsx(Heading,{level:`4`,id:`403-forbidden-not-an-organization-key`,children:`403 Forbidden - Not an Organization Key`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"This endpoint is only available for organization API keys\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`4`,id:`403-forbidden-feature-not-enabled`,children:`403 Forbidden - Feature Not Enabled`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Post-renewal cancellation feature is not enabled for your organization. Contact support to enable this feature.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`4`,id:`400-bad-request-no-billing-account`,children:`400 Bad Request - No Billing Account`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Organization does not have a billing account configured. Contact support.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`4`,id:`400-bad-request-order-not-processable`,children:`400 Bad Request - Order Not Processable`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Order cannot be processed (current status: expired)\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`4`,id:`400-bad-request-crypto-subscription`,children:`400 Bad Request - Crypto Subscription`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"This endpoint does not support crypto subscriptions. Contact support for manual processing.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`4`,id:`400-bad-request-no-paid-invoices`,children:`400 Bad Request - No Paid Invoices`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"No paid invoices found for this subscription\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`4`,id:`400-bad-request-refund-window-passed`,children:`400 Bad Request - Refund Window Passed`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Refund window has passed. The most recent payment was 5 day(s) ago. Credits are only available within 3 days of renewal.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`4`,id:`400-bad-request-nothing-to-credit`,children:`400 Bad Request - Nothing to Credit`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The most recent invoice has no refundable payment. Use the delete endpoint to cancel without a credit, or contact support.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`4`,id:`404-not-found`,children:`404 Not Found`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Order not found\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`4`,id:`409-conflict-request-in-progress`,children:`409 Conflict - Request In Progress`}),`\n`,_jsx(_components.p,{children:`Another cancel-refund request for this order is still running. Wait a moment and retry.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"This order is already being processed for cancellation\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`4`,id:`500-internal-server-error`,children:`500 Internal Server Error`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Internal server error\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`related-endpoints`,children:`Related Endpoints`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Delete Order`,icon:`trash`,href:`/api-reference/order/delete-order`,children:_jsx(_components.p,{children:`Schedule a cancellation at period end (no immediate refund).`})}),_jsx(Card,{title:`List Orders`,icon:`list`,href:`/api-reference/order/list-orders`,children:_jsx(_components.p,{children:`Check an order’s current status.`})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Cancel \u0026 Refund","description":"Cancel a subscription immediately and credit its most recent invoice.","api":"POST https://dashboard.statproxies.com/api/v2/order/cancel-refund/{subscription_id}/{product_id}","href":"/api-reference/order/cancel-refund-order"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Requirements","slug":"requirements","depth":2,"children":[]},{"title":"Effects","slug":"effects","depth":2,"children":[]},{"title":"Request","slug":"request","depth":2,"children":[{"title":"Headers","slug":"headers","depth":3,"children":[]},{"title":"Path Parameters","slug":"path-parameters","depth":3,"children":[]},{"title":"Example Request","slug":"example-request","depth":3,"children":[]}]},{"title":"Response","slug":"response","depth":2,"children":[{"title":"Success Response","slug":"success-response","depth":3,"children":[]},{"title":"Response Fields","slug":"response-fields","depth":3,"children":[]},{"title":"Retrying a Completed Request","slug":"retrying-a-completed-request","depth":3,"children":[]},{"title":"Error Responses","slug":"error-responses","depth":3,"children":[]},{"title":"403 Forbidden - Not an Organization Key","slug":"403-forbidden-not-an-organization-key","depth":4,"children":[]},{"title":"403 Forbidden - Feature Not Enabled","slug":"403-forbidden-feature-not-enabled","depth":4,"children":[]},{"title":"400 Bad Request - No Billing Account","slug":"400-bad-request-no-billing-account","depth":4,"children":[]},{"title":"400 Bad Request - Order Not Processable","slug":"400-bad-request-order-not-processable","depth":4,"children":[]},{"title":"400 Bad Request - Crypto Subscription","slug":"400-bad-request-crypto-subscription","depth":4,"children":[]},{"title":"400 Bad Request - No Paid Invoices","slug":"400-bad-request-no-paid-invoices","depth":4,"children":[]},{"title":"400 Bad Request - Refund Window Passed","slug":"400-bad-request-refund-window-passed","depth":4,"children":[]},{"title":"400 Bad Request - Nothing to Credit","slug":"400-bad-request-nothing-to-credit","depth":4,"children":[]},{"title":"404 Not Found","slug":"404-not-found","depth":4,"children":[]},{"title":"409 Conflict - Request In Progress","slug":"409-conflict-request-in-progress","depth":4,"children":[]},{"title":"500 Internal Server Error","slug":"500-internal-server-error","depth":4,"children":[]}]},{"title":"Related Endpoints","slug":"related-endpoints","depth":2,"children":[]}],"codeExamples":{},"endpoint":{"title":"Cancel \u0026 Refund","path":"/api/v2/order/cancel-refund/{subscription_id}/{product_id}","servers":[{"url":"https://dashboard.statproxies.com"}],"method":"post","request":{"security":[],"parameters":{"query":{},"header":{},"cookie":{},"path":{"subscription_id":{"schema":[{"type":"string","description":"The subscription ID from order creation.","required":true}]},"product_id":{"schema":[{"type":"string","description":"The product ID (e.g., `\"captcha\"` ).","required":true}]}}},"body":{}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"response":[{"type":"string","description":"Status of the request."}],"message":[{"type":"string","description":"Human-readable result message."}],"details.order_id":[{"type":"string","description":"The order ID that was processed."}],"details.subscription_id":[{"type":"string","description":"The Stripe subscription that was cancelled."}],"details.credit_amount":[{"type":"number","description":"Amount credited, in dollars."}],"details.credit_amount_cents":[{"type":"integer","description":"Amount credited, in cents."}],"details.invoice_id":[{"type":"string","description":"The Stripe invoice that was credited."}],"details.hours_since_renewal":[{"type":"number","description":"Hours between the invoice payment and this request."}],"already_processed":[{"type":"boolean","description":"Present and `true` only when an earlier request already cancelled and credited this order."}]}}],"examples":{"example":{"value":{"response":"\u003cstring>","message":"\u003cstring>","details.order_id":"\u003cstring>","details.subscription_id":"\u003cstring>","details.credit_amount":123,"details.credit_amount_cents":123,"details.invoice_id":"\u003cstring>","details.hours_since_renewal":123,"already_processed":true}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"statproxies","siteName":"Stat Proxies","title":"Cancel \u0026 Refund - Stat Proxies","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-05T04:03:30.666Z","originalFileLocation":"api-reference/order/cancel-refund-order.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Cancel a subscription immediately and credit its most recent invoice.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Stat Proxies\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/statproxies/XwrgOIj1Mk9LcHto/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/statproxies/XwrgOIj1Mk9LcHto/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/statproxies/XwrgOIj1Mk9LcHto/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/statproxies/XwrgOIj1Mk9LcHto/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/statproxies/XwrgOIj1Mk9LcHto/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/statproxies/XwrgOIj1Mk9LcHto/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/statproxies/XwrgOIj1Mk9LcHto/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/statproxies/XwrgOIj1Mk9LcHto/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/statproxies/XwrgOIj1Mk9LcHto/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Cancel \u0026amp; Refund - Stat Proxies\">\u003cmeta data-mint-head property=\"og:description\" content=\"Cancel a subscription immediately and credit its most recent invoice.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Stat Proxies\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.statproxies.com/api-reference/order/cancel-refund-order\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://statproxies.mintlify.site/_mintlify/api/og/v2?division=Order+API\u0026amp;title=Cancel+%26+Refund\u0026amp;description=Cancel+a+subscription+immediately+and+credit+its+most+recent+invoice.\u0026amp;theme=67d37c0441cee6590ffcec3f\u0026amp;signature=2ff1177739f5c13edf3bdbfe9de150d40d7df385478206f942aa8e28c11d6c81\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Cancel \u0026amp; Refund - Stat Proxies\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Cancel a subscription immediately and credit its most recent invoice.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://statproxies.mintlify.site/_mintlify/api/og/v2?division=Order+API\u0026amp;title=Cancel+%26+Refund\u0026amp;description=Cancel+a+subscription+immediately+and+credit+its+most+recent+invoice.\u0026amp;theme=67d37c0441cee6590ffcec3f\u0026amp;signature=2ff1177739f5c13edf3bdbfe9de150d40d7df385478206f942aa8e28c11d6c81\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/statproxies/XwrgOIj1Mk9LcHto/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Stat Proxies\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#10B981\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.statproxies.com/api-reference/order/cancel-refund-order\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/order/cancel-refund-order.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.statproxies.com/#organization\",\"name\":\"Stat Proxies\",\"url\":\"https://docs.statproxies.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/statproxies/F50S_mnKvy2HL5XJ/logo/header-logo-nav.png?fit=max\u0026auto=format\u0026n=F50S_mnKvy2HL5XJ\u0026q=85\u0026s=559f073447efcad1ac3df69f669af0aa\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.statproxies.com#website\",\"name\":\"Stat Proxies\",\"url\":\"https://docs.statproxies.com\",\"publisher\":{\"@id\":\"https://docs.statproxies.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.statproxies.com/api-reference/order/cancel-refund-order#webpage\",\"url\":\"https://docs.statproxies.com/api-reference/order/cancel-refund-order\",\"name\":\"Cancel \u0026 Refund\",\"description\":\"Cancel a subscription immediately and credit its most recent invoice.\",\"dateModified\":\"2026-10-05T04:03:30.666Z\",\"isPartOf\":{\"@id\":\"https://docs.statproxies.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.statproxies.com/api-reference/order/cancel-refund-order#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.statproxies.com/api-reference/order/cancel-refund-order#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Order API\",\"item\":\"https://docs.statproxies.com/api-reference/order/create-order\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cancel \u0026 Refund\",\"item\":\"https://docs.statproxies.com/api-reference/order/cancel-refund-order\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.statproxies.com/api-reference/order/cancel-refund-order#apireference\",\"headline\":\"Cancel \u0026 Refund\",\"name\":\"Cancel \u0026 Refund\",\"description\":\"Cancel a subscription immediately and credit its most recent invoice.\",\"url\":\"https://docs.statproxies.com/api-reference/order/cancel-refund-order\",\"mainEntityOfPage\":{\"@id\":\"https://docs.statproxies.com/api-reference/order/cancel-refund-order#webpage\"},\"dateModified\":\"2026-10-05T04:03:30.666Z\",\"publisher\":{\"@id\":\"https://docs.statproxies.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.statproxies.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Stat Proxies\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Stat Proxies\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/order/cancel-refund-order.md","siteName":"Stat Proxies","nav":{"global":{"anchors":[{"anchor":"Dashboard","icon":"gauge","href":"https://dashboard.statproxies.com"},{"anchor":"Discord","icon":"discord","href":"https://discord.gg/6gExKHK"}]},"tabs":[{"tab":"Help Center","pages":[{"title":"Help Center","href":"/articles/quick-start"}]},{"tab":"API Reference","groups":[{"group":"Getting Started","pages":[{"title":"API Reference","sidebarTitle":"Introduction","href":"/api-reference/introduction"},{"title":"Authentication","href":"/api-reference/authentication"},{"title":"TCP Fingerprint Profiles","href":"/api-reference/fingerprint-profiles"}]},{"group":"Order API","pages":[{"title":"Create Order","api":"POST https://dashboard.statproxies.com/api/v2/order/newscale","href":"/api-reference/order/create-order"},{"title":"List Orders","api":"GET https://dashboard.statproxies.com/api/v2/order/list","href":"/api-reference/order/list-orders"},{"title":"Get Order","api":"GET https://dashboard.statproxies.com/api/v2/order/fetch/{order_id}","href":"/api-reference/order/get-order"},{"title":"Get Order Details","api":"GET https://dashboard.statproxies.com/api/v2/order/details/fetch","href":"/api-reference/order/get-order-details"},{"title":"Get Customer Orders","api":"GET https://dashboard.statproxies.com/api/v2/order/fetch/customer/{customer_id}","href":"/api-reference/order/get-customer-orders"},{"title":"Get Usage Statistics","api":"GET https://dashboard.statproxies.com/api/v2/order/usage/{order_id}","href":"/api-reference/order/get-usage"},{"title":"Exchange Proxies","api":"POST https://dashboard.statproxies.com/api/v2/order/exchange/{order_id}","href":"/api-reference/order/exchange-proxies"},{"title":"Replace Proxy","api":"POST https://dashboard.statproxies.com/api/v2/order/replace/{order_id}","href":"/api-reference/order/replace-proxy"},{"title":"Delete Order","api":"DELETE https://dashboard.statproxies.com/api/v2/order/delete/{subscription_id}/{product_id}","href":"/api-reference/order/delete-order"},{"title":"Uncancel Order","description":"Reverse a scheduled cancellation so the subscription renews normally.","api":"POST https://dashboard.statproxies.com/api/v2/order/uncancel/{subscription_id}/{product_id}","href":"/api-reference/order/uncancel-order"},{"title":"Cancel \u0026 Refund","api":"POST https://dashboard.statproxies.com/api/v2/order/cancel-refund/{subscription_id}/{product_id}","href":"/api-reference/order/cancel-refund-order"}]},{"group":"Account API","pages":[{"title":"Get Order History","description":"Retrieve the complete order history for a specific customer.","api":"GET https://dashboard.statproxies.com/api/v2/account/fetch/details/{customer_id}","href":"/api-reference/account/get-order-history"},{"title":"Get Active Orders","api":"GET https://dashboard.statproxies.com/api/v2/account/fetch/all/{customer_id}","href":"/api-reference/account/get-active-orders"}]}]}]},"basePath":"","title":"Cancel \u0026 Refund - Stat Proxies","buildId":"dpl_596ePT575z4qnAFksq1biRW97aLY","deploymentId":"dpl_596ePT575z4qnAFksq1biRW97aLY","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-C9Wu0MeN.js","utils-jWgu-6Qf.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DBD8f9qn.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BGuX1ui5.js","snippetPresets-Evy63nQB.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BQHO1lnV.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-B6C8m-t_.js","shallow-BG4cT0fH.js","getApiPlaygroundDisplay-CgEPrE-D.js","CodeSnippet-CU8JyZ9N.js","CodeSnippets-BnxHU32T.js","Page-D6S0Yh6q.js","getPastedJson-CwiYOonh.js","icon-DYDpWmDf.js","MethodPill-C-J-l7_c.js","DuplicateIcon-B6ARwg9w.js","createIcon-Dsv4MtDq.js","DynamicMarkdown-CtasenyM.js","SectionHeading-YNcgYwjB.js","axios-vUo_bRtp.js"]}