{ "name": "NOT_FOUND", "message": "The payment request ID provided by you does not exist. Please enter a valid one and try again.", "status": 404, "errors": []}
{ "name": "METHOD_NOT_ALLOWED", "message": "Refunds are not available for this account. Please contact support.", "status": 405, "errors": []}
Refunds
Initiate Refund | Refunds API
Initiate refund via the Atoa Refunds API, request parameters, response schema and code samples in cURL, Python, JavaScript, PHP, Go and Java.
{ "name": "NOT_FOUND", "message": "The payment request ID provided by you does not exist. Please enter a valid one and try again.", "status": 404, "errors": []}
{ "name": "METHOD_NOT_ALLOWED", "message": "Refunds are not available for this account. Please contact support.", "status": 405, "errors": []}
Instant refunds are only available for selected merchants with same day payout
functionality. Please reach out to support if you want to enable refunds in
your account.
This API creates a refund for a specific successful payment. The refunded amount is credited to the customer’s source bank account via a bank transfer within 30 minutes, provided that you have sufficient balance available in your account.
Refund can be either full or partial.
The payment request ID of the transaction that needs to be refunded. Only
completed payments can be refunded.
Note: If you need to know how to generate a payment request ID, refer to
Process payment
.
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Up to 50 key-value pairs.
Each key must be 1–40 characters and must not contain [ or ].
Each value must be a string of at most 500 characters.
The refund’s metadata is independent of the payment’s — it is not inherited. Metadata is frozen when the refund is created and cannot be changed afterwards. An empty object ({}) is treated as no metadata.
{ "name": "NOT_FOUND", "message": "The payment request ID provided by you does not exist. Please enter a valid one and try again.", "status": 404, "errors": []}
{ "name": "METHOD_NOT_ALLOWED", "message": "Refunds are not available for this account. Please contact support.", "status": 405, "errors": []}
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Atoa Docs","colors":{"primary":"#E42646","light":"#E42646","dark":"#E42646"},"logo":{"light":"https://mintcdn.com/atoaproddocs/ZhMdcV3xf3fCdH09/logo/light.svg?fit=max\u0026auto=format\u0026n=ZhMdcV3xf3fCdH09\u0026q=85\u0026s=3d0d1627597f73b57756f6d09662507f","dark":"https://mintcdn.com/atoaproddocs/ZhMdcV3xf3fCdH09/logo/dark.svg?fit=max\u0026auto=format\u0026n=ZhMdcV3xf3fCdH09\u0026q=85\u0026s=7b8a90d650060586fed1988d47fd23c3","href":"/introduction"},"favicon":"https://mintcdn.com/atoaproddocs/ZhMdcV3xf3fCdH09/images/favicon.png?fit=max\u0026auto=format\u0026n=ZhMdcV3xf3fCdH09\u0026q=85\u0026s=48a6017035519938a738fbd8a8689d05","api":{"openapi":["openApi/atoa-openapi.yaml"],"playground":{"display":"interactive"},"mdx":{"auth":{"method":"bearer"},"server":"https://devapi.atoa.me/api/payments/stores"}},"navbar":{"links":[{"href":"https://atoa.instatus.com/","label":"Status"}],"primary":{"type":"button","label":"Dashboard","href":"https://dashboard.paywithatoa.co.uk/"}},"seo":{"metatags":{"robots":"index, follow","og:image":"https://atoa-static-images.s3.eu-west-2.amazonaws.com/Atoa-logo-SEO-metatag.png"},"indexing":"navigable"},"integrations":{"gtm":{"tagId":"GTM-524G8QG5"}},"errors":{"404":{"redirect":true}},"contextual":{"options":["copy","view","assistant","chatgpt","claude","perplexity","grok","aistudio","devin","mcp","add-mcp","cursor","vscode","devin-mcp"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"atoaproddocs","hasAudioNarration":false,"actualSubdomain":"atoaproddocs","customDomains":["docs.paywithatoa.co.uk"],"gitSource":{"type":"github","owner":"atoapaymentslimited","repo":"atoa-docs-new","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6ab36a0b27586c1a8ac3a8cd","collectionId":"b9761cd3-f631-4a5f-860c-8a12478718e1","liveDeploymentHistoryId":"6ab36a0b27586c1a8ac3a8cd","schemaVersion":"v3"},"entitlements":{},"buildId":"6ab36a0b27586c1a8ac3a8cd","clientVersion":"0.0.4006","searchFilterCounts":[{"language":"default","tag":"API Reference","count":51},{"language":"default","tag":"Reference","count":28},{"language":"default","tag":"Documentation","count":24},{"language":"default","tag":"Webhook","count":17},{"language":"default","tag":"Payments","count":9},{"language":"default","tag":"Bank Feed","count":8},{"language":"default","tag":"Agentic Payments","count":8},{"language":"default","tag":"Endpoints","count":6},{"language":"default","tag":"Card on File","count":5},{"language":"default","tag":"Customers","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":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":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","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":"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":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"editor-nav-generations","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":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"custom/custom.css","content":".ml-auto.text-gray-500.w-8.h-8.-my-1.items-center.justify-center,button[type=button].hidden{display:none}.sm\\:flex,.sm\\:flex a[href=\"https://mintlify.com?utm_campaign=poweredBy\u0026amp;utm_medium=docs\u0026amp;utm_source=undefined\"]{display:none!important}"}],"page":{"pagePath":"api-reference/refund/initiate-refund","slug":"/api-reference/refund/initiate-refund","pageMetadata":{"title":"Initiate Refund | Refunds API","sidebarTitle":"Initiate Refund","api":"POST https://api.atoa.me/api/refund","description":"Initiate refund via the Atoa Refunds API, request parameters, response schema and code samples in cURL, Python, JavaScript, PHP, Go and Java.","href":"/api-reference/refund/initiate-refund"},"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: \"Initiate refund via the Atoa Refunds API, request parameters, response schema and code samples in cURL, Python, JavaScript, PHP, Go and Java.\"\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={a:`a`,code:`code`,li:`li`,p:`p`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Heading,Info,Note,ParamField,ResponseField}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsx(Note,{icon:`lightbulb`,title:`Note`,children:_jsx(_components.p,{children:`Instant refunds are only available for selected merchants with same day payout\nfunctionality. Please reach out to support if you want to enable refunds in\nyour account.`})}),`\n`,_jsx(_components.p,{children:`This API creates a refund for a specific successful payment. The refunded amount is credited to the customer’s source bank account via a bank transfer within 30 minutes, provided that you have sufficient balance available in your account.\nRefund can be either full or partial.`}),`\n`,_jsx(Heading,{level:`3`,id:`authorization`,children:`Authorization`}),`\n`,_jsxs(_components.p,{children:[`Bearer `,_jsx(_components.code,{children:`\u003ctoken>`})]}),`\n`,_jsx(Heading,{level:`3`,id:`request-body-schema`,children:`Request Body Schema`}),`\n`,_jsx(ParamField,{body:`paymentRequestId`,type:`string`,required:true,id:`param-payment-request-id`,children:_jsxs(_components.p,{children:[`The payment request ID of the transaction that needs to be refunded. Only\ncompleted payments can be refunded. `,_jsx(`br`,{}),`\nNote: If you need to know how to generate a payment request ID, refer to `,_jsx(_components.a,{href:`/api-reference/payment/process-payment`,children:`\nProcess payment\n`}),`.`]})}),`\n`,_jsx(ParamField,{body:`amount`,type:`number`,required:true,id:`param-amount`,children:_jsx(_components.p,{children:`Amount to be refunded (should not exceed the original transaction amount).\nDecimal values are allowed. Minimum value is 1.`})}),`\n`,_jsx(ParamField,{body:`currency`,type:`string`,optional:true,id:`param-currency`,children:_jsx(_components.p,{children:`The currency of the refund amount. If not specified, the currency of the\noriginal transaction will be used. Example: “GBP”.`})}),`\n`,_jsxs(ParamField,{body:`refundNotes`,type:`string`,id:`param-refund-notes`,children:[_jsxs(_components.p,{children:[`Refund reason for your internal reference.\n`,_jsx(Info,{children:`Note:- The note must be 200 characters or less.`})]}),_jsx(Info,{icon:`lightbulb`,title:`Note`,children:_jsxs(_components.p,{children:[`To simulate a `,_jsx(_components.code,{children:`FAILED`}),` refund in sandbox environment you can pass a note with `,_jsx(_components.code,{children:`FAILURE TEST`})]})})]}),`\n`,_jsxs(ParamField,{body:`metadata`,type:`object`,id:`param-metadata`,children:[_jsx(_components.p,{children:`Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Up to `,_jsx(_components.strong,{children:`50`}),` key-value pairs.`]}),`\n`,_jsxs(_components.li,{children:[`Each key must be `,_jsx(_components.strong,{children:`1–40`}),` characters and must not contain `,_jsx(_components.code,{children:`[`}),` or `,_jsx(_components.code,{children:`]`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Each value must be a `,_jsx(_components.strong,{children:`string`}),` of at most `,_jsx(_components.strong,{children:`500`}),` characters.`]}),`\n`]}),_jsxs(_components.p,{children:[`Once set, metadata is returned in the `,_jsx(_components.a,{href:`/api-reference/refund/get-refund-payments`,children:`Get Refunds`}),` response, and is included in the `,_jsx(_components.a,{href:`/api-reference/webhook/refund-status-webhook-response`,children:`Refund Status Webhook`}),`.`]}),_jsxs(Info,{children:[`The refund’s metadata is independent of the payment’s — it is not inherited. Metadata is frozen when the refund is created and cannot be changed afterwards. An empty object (`,_jsx(_components.code,{children:`{}`}),`) is treated as no metadata.`]})]}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`refundId`,type:`string`,id:`param-refund-id`,children:_jsxs(_components.p,{children:[`The unique identifier for the refund transaction. You can use this ID to\ncancel the refund later via the`,` `,`\n`,_jsx(_components.a,{href:`/api-reference/refund/cancel-refund`,children:`Cancel Refund`}),` API.`]})}),`\n`,_jsx(ResponseField,{name:`paymentRequestId`,type:`string`,id:`param-payment-request-id-1`,children:_jsx(_components.p,{children:`The ID of the original payment request that is being refunded.`})}),`\n`,_jsx(ResponseField,{name:`paymentIdempotencyId`,type:`string`,id:`param-payment-idempotency-id`,children:_jsx(_components.p,{children:`The idempotency ID of the original payment, used to ensure the payment was\nprocessed only once.`})}),`\n`,_jsx(ResponseField,{name:`status`,type:`string`,id:`param-status`,children:_jsx(_components.p,{children:`The current status of the refund request (e.g., “INITIATED”, “COMPLETED”,\n“FAILED”).`})}),`\n`,_jsx(ResponseField,{name:`paidAmount`,type:`string`,id:`param-paid-amount`,children:_jsx(_components.p,{children:`The original amount that was paid in the transaction being refunded.`})}),`\n`,_jsx(ResponseField,{name:`refundAmount`,type:`string`,id:`param-refund-amount`,children:_jsx(_components.p,{children:`The amount being refunded to the customer.`})}),`\n`,_jsx(ResponseField,{name:`currency`,type:`string`,id:`param-currency-1`,children:_jsx(_components.p,{children:`The currency code for the refund transaction (e.g., “GBP”).`})}),`\n`,_jsx(ResponseField,{name:`refundNotes`,type:`string`,id:`param-refund-notes-1`,children:_jsx(_components.p,{children:`Notes or reason provided for the refund.`})}),`\n`,_jsx(ResponseField,{name:`orderId`,type:`string`,id:`param-order-id`,children:_jsx(_components.p,{children:`The order ID associated with the original transaction.`})}),`\n`,_jsx(ResponseField,{name:`updatedAt`,type:`string`,id:`param-updated-at`,children:_jsx(_components.p,{children:`The timestamp when this refund request was last updated.`})}),`\n`,_jsx(ResponseField,{name:`createdAt`,type:`string`,id:`param-created-at`,children:_jsx(_components.p,{children:`The timestamp when this refund request was created in the system.`})})]})}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":"Initiate Refund | Refunds API","sidebarTitle":"Initiate Refund","api":"POST https://api.atoa.me/api/refund","description":"Initiate refund via the Atoa Refunds API, request parameters, response schema and code samples in cURL, Python, JavaScript, PHP, Go and Java.","href":"/api-reference/refund/initiate-refund"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Info,Note,ParamField,ResponseExample,ResponseField}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsx(Note,{icon:`lightbulb`,title:`Note`,children:_jsx(_components.p,{children:`Instant refunds are only available for selected merchants with same day payout\nfunctionality. Please reach out to support if you want to enable refunds in\nyour account.`})}),`\n`,_jsx(_components.p,{children:`This API creates a refund for a specific successful payment. The refunded amount is credited to the customer’s source bank account via a bank transfer within 30 minutes, provided that you have sufficient balance available in your account.\nRefund can be either full or partial.`}),`\n`,_jsx(Heading,{level:`3`,id:`authorization`,children:`Authorization`}),`\n`,_jsxs(_components.p,{children:[`Bearer `,_jsx(_components.code,{children:`\u003ctoken>`})]}),`\n`,_jsx(Heading,{level:`3`,id:`request-body-schema`,children:`Request Body Schema`}),`\n`,_jsx(ParamField,{body:`paymentRequestId`,type:`string`,required:true,id:`param-payment-request-id`,children:_jsxs(_components.p,{children:[`The payment request ID of the transaction that needs to be refunded. Only\ncompleted payments can be refunded. `,_jsx(`br`,{}),`\nNote: If you need to know how to generate a payment request ID, refer to `,_jsx(_components.a,{href:`/api-reference/payment/process-payment`,children:`\nProcess payment\n`}),`.`]})}),`\n`,_jsx(ParamField,{body:`amount`,type:`number`,required:true,id:`param-amount`,children:_jsx(_components.p,{children:`Amount to be refunded (should not exceed the original transaction amount).\nDecimal values are allowed. Minimum value is 1.`})}),`\n`,_jsx(ParamField,{body:`currency`,type:`string`,optional:true,id:`param-currency`,children:_jsx(_components.p,{children:`The currency of the refund amount. If not specified, the currency of the\noriginal transaction will be used. Example: “GBP”.`})}),`\n`,_jsxs(ParamField,{body:`refundNotes`,type:`string`,id:`param-refund-notes`,children:[_jsxs(_components.p,{children:[`Refund reason for your internal reference.\n`,_jsx(Info,{children:`Note:- The note must be 200 characters or less.`})]}),_jsx(Info,{icon:`lightbulb`,title:`Note`,children:_jsxs(_components.p,{children:[`To simulate a `,_jsx(_components.code,{children:`FAILED`}),` refund in sandbox environment you can pass a note with `,_jsx(_components.code,{children:`FAILURE TEST`})]})})]}),`\n`,_jsxs(ParamField,{body:`metadata`,type:`object`,id:`param-metadata`,children:[_jsx(_components.p,{children:`Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Up to `,_jsx(_components.strong,{children:`50`}),` key-value pairs.`]}),`\n`,_jsxs(_components.li,{children:[`Each key must be `,_jsx(_components.strong,{children:`1–40`}),` characters and must not contain `,_jsx(_components.code,{children:`[`}),` or `,_jsx(_components.code,{children:`]`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Each value must be a `,_jsx(_components.strong,{children:`string`}),` of at most `,_jsx(_components.strong,{children:`500`}),` characters.`]}),`\n`]}),_jsxs(_components.p,{children:[`Once set, metadata is returned in the `,_jsx(_components.a,{href:`/api-reference/refund/get-refund-payments`,children:`Get Refunds`}),` response, and is included in the `,_jsx(_components.a,{href:`/api-reference/webhook/refund-status-webhook-response`,children:`Refund Status Webhook`}),`.`]}),_jsxs(Info,{children:[`The refund’s metadata is independent of the payment’s — it is not inherited. Metadata is frozen when the refund is created and cannot be changed afterwards. An empty object (`,_jsx(_components.code,{children:`{}`}),`) is treated as no metadata.`]})]}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`refundId`,type:`string`,id:`param-refund-id`,children:_jsxs(_components.p,{children:[`The unique identifier for the refund transaction. You can use this ID to\ncancel the refund later via the`,` `,`\n`,_jsx(_components.a,{href:`/api-reference/refund/cancel-refund`,children:`Cancel Refund`}),` API.`]})}),`\n`,_jsx(ResponseField,{name:`paymentRequestId`,type:`string`,id:`param-payment-request-id-1`,children:_jsx(_components.p,{children:`The ID of the original payment request that is being refunded.`})}),`\n`,_jsx(ResponseField,{name:`paymentIdempotencyId`,type:`string`,id:`param-payment-idempotency-id`,children:_jsx(_components.p,{children:`The idempotency ID of the original payment, used to ensure the payment was\nprocessed only once.`})}),`\n`,_jsx(ResponseField,{name:`status`,type:`string`,id:`param-status`,children:_jsx(_components.p,{children:`The current status of the refund request (e.g., “INITIATED”, “COMPLETED”,\n“FAILED”).`})}),`\n`,_jsx(ResponseField,{name:`paidAmount`,type:`string`,id:`param-paid-amount`,children:_jsx(_components.p,{children:`The original amount that was paid in the transaction being refunded.`})}),`\n`,_jsx(ResponseField,{name:`refundAmount`,type:`string`,id:`param-refund-amount`,children:_jsx(_components.p,{children:`The amount being refunded to the customer.`})}),`\n`,_jsx(ResponseField,{name:`currency`,type:`string`,id:`param-currency-1`,children:_jsx(_components.p,{children:`The currency code for the refund transaction (e.g., “GBP”).`})}),`\n`,_jsx(ResponseField,{name:`refundNotes`,type:`string`,id:`param-refund-notes-1`,children:_jsx(_components.p,{children:`Notes or reason provided for the refund.`})}),`\n`,_jsx(ResponseField,{name:`orderId`,type:`string`,id:`param-order-id`,children:_jsx(_components.p,{children:`The order ID associated with the original transaction.`})}),`\n`,_jsx(ResponseField,{name:`updatedAt`,type:`string`,id:`param-updated-at`,children:_jsx(_components.p,{children:`The timestamp when this refund request was last updated.`})}),`\n`,_jsx(ResponseField,{name:`createdAt`,type:`string`,id:`param-created-at`,children:_jsx(_components.p,{children:`The timestamp when this refund request was created in the system.`})}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`200`,numberOfLines:`13`,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:`13`,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:` \"refundId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"a7c82e45-9f31-42b6-8d15-7e63f1b92c4d\"`}),_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:` \"paymentRequestId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"5e8b2c73-1f64-4a97-9c38-d2f6ae15b8c2\"`}),_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:` \"paymentIdempotencyId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ATOA1234567890123\"`}),_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:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"INITIATED\"`}),_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:` \"paidAmount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"250.75\"`}),_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:` \"refundAmount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"25.50\"`}),_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:` \"currency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GBP\"`}),_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:` \"refundNotes\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Customer requested refund\"`}),_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:` \"orderId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"987654321\"`}),_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:` \"createdAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2023-11-15T14:32:45.789Z\"`}),_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:` \"updatedAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2023-11-15T14:32:45.789Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`400`,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:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BadRequestException\"`}),_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 amount exceeded\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`401`,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:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"UNAUTHORIZED\"`}),_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:`\"Unauthorized\"`}),_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:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`401`}),_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:` \"errors\"`}),_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`]})})}),_jsx(CodeBlock,{filename:`404`,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:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"NOT_FOUND\"`}),_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 payment request ID provided by you does not exist. Please enter a valid one and try again.\"`}),_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:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`404`}),_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:` \"errors\"`}),_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`]})})}),_jsx(CodeBlock,{filename:`405`,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:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"METHOD_NOT_ALLOWED\"`}),_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:`\"Refunds are not available for this account. Please contact support.\"`}),_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:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`405`}),_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:` \"errors\"`}),_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`]})})})]})]})}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":"Initiate Refund | Refunds API","sidebarTitle":"Initiate Refund","api":"POST https://api.atoa.me/api/refund","description":"Initiate refund via the Atoa Refunds API, request parameters, response schema and code samples in cURL, Python, JavaScript, PHP, Go and Java.","href":"/api-reference/refund/initiate-refund"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Authorization","slug":"authorization","depth":3,"children":[]},{"title":"Request Body Schema","slug":"request-body-schema","depth":3,"children":[]},{"title":"Response","slug":"response","depth":3,"children":[]}],"codeExamples":{"response":{"type":"ResponseExample","children":[{"filename":"200","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"13\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"refundId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"a7c82e45-9f31-42b6-8d15-7e63f1b92c4d\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"paymentRequestId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"5e8b2c73-1f64-4a97-9c38-d2f6ae15b8c2\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"paymentIdempotencyId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"ATOA1234567890123\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"INITIATED\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"paidAmount\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"250.75\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"refundAmount\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"25.50\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"currency\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"GBP\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"refundNotes\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Customer requested refund\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"orderId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"987654321\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"createdAt\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2023-11-15T14:32:45.789Z\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"updatedAt\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2023-11-15T14:32:45.789Z\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"400","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"BadRequestException\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Refund amount exceeded\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"401","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"6\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"UNAUTHORIZED\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Unauthorized\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">401\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"errors\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: []\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"404","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"6\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"NOT_FOUND\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"The payment request ID provided by you does not exist. Please enter a valid one and try again.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">404\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"errors\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: []\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"405","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"6\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"METHOD_NOT_ALLOWED\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Refunds are not available for this account. Please contact support.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">405\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"errors\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: []\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Initiate Refund | Refunds API","path":"/api/refund","servers":[{"url":"https://api.atoa.me"}],"method":"post","request":{"security":[{"title":"Bearer Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"paymentRequestId":[{"type":"string","description":"The payment request ID of the transaction that needs to be refunded. Only completed payments can be refunded. Note: If you need to know how to generate a payment request ID, refer to .","required":true}],"amount":[{"type":"number","description":"Amount to be refunded (should not exceed the original transaction amount). Decimal values are allowed. Minimum value is 1.","required":true}],"currency":[{"type":"string","description":"The currency of the refund amount. If not specified, the currency of the original transaction will be used. Example: “GBP”."}],"refundNotes":[{"type":"string","description":"Refund reason for your internal reference."}],"metadata":[{"type":"object","properties":{},"description":"Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Up to 50 key-value pairs. Each key must be 1–40 characters and must not contain `[` or `]` . Each value must be a string of at most 500 characters. Once set, metadata is returned in the Get Refunds response, and is included in the Refund Status Webhook ."}]}}],"examples":{"example":{"value":{"paymentRequestId":"\u003cstring>","amount":123,"currency":"\u003cstring>","refundNotes":"\u003cstring>","metadata":{}}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"refundId":[{"type":"string","description":"The unique identifier for the refund transaction. You can use this ID to cancel the refund later via the API."}],"paymentRequestId":[{"type":"string","description":"The ID of the original payment request that is being refunded."}],"paymentIdempotencyId":[{"type":"string","description":"The idempotency ID of the original payment, used to ensure the payment was processed only once."}],"status":[{"type":"string","description":"The current status of the refund request (e.g., “INITIATED”, “COMPLETED”, “FAILED”)."}],"paidAmount":[{"type":"string","description":"The original amount that was paid in the transaction being refunded."}],"refundAmount":[{"type":"string","description":"The amount being refunded to the customer."}],"currency":[{"type":"string","description":"The currency code for the refund transaction (e.g., “GBP”)."}],"refundNotes":[{"type":"string","description":"Notes or reason provided for the refund."}],"orderId":[{"type":"string","description":"The order ID associated with the original transaction."}],"updatedAt":[{"type":"string","description":"The timestamp when this refund request was last updated."}],"createdAt":[{"type":"string","description":"The timestamp when this refund request was created in the system."}]}}],"examples":{"example":{"value":{"refundId":"\u003cstring>","paymentRequestId":"\u003cstring>","paymentIdempotencyId":"\u003cstring>","status":"\u003cstring>","paidAmount":"\u003cstring>","refundAmount":"\u003cstring>","currency":"\u003cstring>","refundNotes":"\u003cstring>","orderId":"\u003cstring>","updatedAt":"\u003cstring>","createdAt":"\u003cstring>"}}}}}},"deprecated":false}},"jsLinks":["/_mintlify/custom/atoaproddocs/3bfbc9666ac68ff2/scripts/generate-llms-full.js","/_mintlify/custom/atoaproddocs/8ee229d6855650fe/custom/script.js"],"subdomain":"atoaproddocs","siteName":"Atoa Docs","title":"Initiate Refund | Refunds API - Atoa Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-23T05:03:22.344Z","originalFileLocation":"api-reference/refund/initiate-refund.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=\"Initiate refund via the Atoa Refunds API, request parameters, response schema and code samples in cURL, Python, JavaScript, PHP, Go and Java.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Atoa Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"index, follow\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/atoaproddocs/Go5UPt9tcMPy4Sk8/_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/atoaproddocs/Go5UPt9tcMPy4Sk8/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/atoaproddocs/Go5UPt9tcMPy4Sk8/_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/atoaproddocs/Go5UPt9tcMPy4Sk8/_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/atoaproddocs/Go5UPt9tcMPy4Sk8/_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/atoaproddocs/Go5UPt9tcMPy4Sk8/_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/atoaproddocs/Go5UPt9tcMPy4Sk8/_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/atoaproddocs/Go5UPt9tcMPy4Sk8/_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/atoaproddocs/Go5UPt9tcMPy4Sk8/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Initiate Refund | Refunds API - Atoa Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Initiate refund via the Atoa Refunds API, request parameters, response schema and code samples in cURL, Python, JavaScript, PHP, Go and Java.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Atoa Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.paywithatoa.co.uk/api-reference/refund/initiate-refund\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://atoa-static-images.s3.eu-west-2.amazonaws.com/Atoa-logo-SEO-metatag.png\">\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=\"Initiate Refund | Refunds API - Atoa Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Initiate refund via the Atoa Refunds API, request parameters, response schema and code samples in cURL, Python, JavaScript, PHP, Go and Java.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://atoa-static-images.s3.eu-west-2.amazonaws.com/Atoa-logo-SEO-metatag.png\">\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/atoaproddocs/Go5UPt9tcMPy4Sk8/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Atoa Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#E42646\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.paywithatoa.co.uk/api-reference/refund/initiate-refund\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/refund/initiate-refund.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.paywithatoa.co.uk/#organization\",\"name\":\"Atoa Docs\",\"url\":\"https://docs.paywithatoa.co.uk\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/atoaproddocs/ZhMdcV3xf3fCdH09/logo/light.svg?fit=max\u0026auto=format\u0026n=ZhMdcV3xf3fCdH09\u0026q=85\u0026s=3d0d1627597f73b57756f6d09662507f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.paywithatoa.co.uk#website\",\"name\":\"Atoa Docs\",\"url\":\"https://docs.paywithatoa.co.uk\",\"publisher\":{\"@id\":\"https://docs.paywithatoa.co.uk/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.paywithatoa.co.uk/api-reference/refund/initiate-refund#webpage\",\"url\":\"https://docs.paywithatoa.co.uk/api-reference/refund/initiate-refund\",\"name\":\"Initiate Refund | Refunds API\",\"description\":\"Initiate refund via the Atoa Refunds API, request parameters, response schema and code samples in cURL, Python, JavaScript, PHP, Go and Java.\",\"dateModified\":\"2026-09-23T05:03:22.344Z\",\"isPartOf\":{\"@id\":\"https://docs.paywithatoa.co.uk#website\"},\"breadcrumb\":{\"@id\":\"https://docs.paywithatoa.co.uk/api-reference/refund/initiate-refund#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.paywithatoa.co.uk/api-reference/refund/initiate-refund#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Reference\",\"item\":\"https://docs.paywithatoa.co.uk/api-reference/customers/create-customer\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Initiate Refund | Refunds API\",\"item\":\"https://docs.paywithatoa.co.uk/api-reference/refund/initiate-refund\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.paywithatoa.co.uk/api-reference/refund/initiate-refund#apireference\",\"headline\":\"Initiate Refund | Refunds API\",\"name\":\"Initiate Refund | Refunds API\",\"description\":\"Initiate refund via the Atoa Refunds API, request parameters, response schema and code samples in cURL, Python, JavaScript, PHP, Go and Java.\",\"url\":\"https://docs.paywithatoa.co.uk/api-reference/refund/initiate-refund\",\"mainEntityOfPage\":{\"@id\":\"https://docs.paywithatoa.co.uk/api-reference/refund/initiate-refund#webpage\"},\"image\":\"https://atoa-static-images.s3.eu-west-2.amazonaws.com/Atoa-logo-SEO-metatag.png\",\"dateModified\":\"2026-09-23T05:03:22.344Z\",\"publisher\":{\"@id\":\"https://docs.paywithatoa.co.uk/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.paywithatoa.co.uk#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Atoa Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Atoa Docs","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/overview"}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"API Reference | Introduction","sidebarTitle":"Introduction","icon":"rectangle-code","iconType":"duotone","href":"/api-reference/introduction"}]},{"group":"Reference","pages":[{"group":"Customers","icon":"users","pages":[{"title":"Create Customer | Customers API","sidebarTitle":"Create Customer","api":"POST https://api.atoa.me/api/customers","href":"/api-reference/customers/create-customer"},{"title":"List Customers | Customers API","sidebarTitle":"List Customers","api":"GET https://api.atoa.me/api/customers","href":"/api-reference/customers/list-customers"},{"title":"Get Customer | Customers API","sidebarTitle":"Get Customer","api":"GET https://api.atoa.me/api/customers/{customerId}","href":"/api-reference/customers/get-customer"},{"title":"Update Customer | Customers API","sidebarTitle":"Update Customer","api":"PUT https://api.atoa.me/api/customers/{customerId}","href":"/api-reference/customers/update-customer"},{"title":"Delete Customer | Customers API","sidebarTitle":"Delete Customer","api":"DELETE https://api.atoa.me/api/customers/{customerId}","href":"/api-reference/customers/delete-customer"}]},{"group":"Payment Methods","icon":"credit-card","pages":[{"title":"List Payment Methods","sidebarTitle":"List Payment Methods","api":"GET https://api.atoa.me/api/customers/{customerId}/cards","href":"/api-reference/payment-methods/list-payment-methods"},{"title":"Get Payment Method","sidebarTitle":"Get Payment Method","api":"GET https://api.atoa.me/api/customers/{customerId}/cards/{cardId}","href":"/api-reference/payment-methods/get-payment-method"},{"title":"Update Payment Method","sidebarTitle":"Update Payment Method","api":"PUT https://api.atoa.me/api/customers/{customerId}/cards/{cardId}","href":"/api-reference/payment-methods/update-payment-method"},{"title":"Delete Payment Method","sidebarTitle":"Delete Payment Method","api":"DELETE https://api.atoa.me/api/customers/{customerId}/cards/{cardId}","href":"/api-reference/payment-methods/delete-payment-method"}]},{"group":"Payments","icon":"money-bill-wave","pages":[{"title":"Get stores | Payments API","sidebarTitle":"Get Stores","api":"Get https://api.atoa.me/api/payments/stores","href":"/api-reference/payment/get-stores"},{"title":"Process Payment: Create a Payment Request","sidebarTitle":"Process Payment","api":"Post https://api.atoa.me/api/payments/process-payment","href":"/api-reference/payment/process-payment"},{"title":"Cancel Payment | Payments API","sidebarTitle":"Cancel Payment","api":"Post https://api.atoa.me/api/payment-request/cancel/{paymentRequestId}","href":"/api-reference/payment/cancel-payment"},{"title":"Get Payment Status | Payments API","sidebarTitle":"Get Payment Status","api":"Get https://api.atoa.me/api/payments/v1/payment-status/{id}","href":"/api-reference/payment/get-payment-status"},{"title":"Get Transactions | Payments API","sidebarTitle":"Get Transactions","api":"POST https://api.atoa.me/api/payments/transactions","href":"/api-reference/payment/get-transactions"}]},{"group":"Remote Payments","icon":"tablet","pages":[{"title":"List Terminals (PAX) for Remote Payments","sidebarTitle":"List Terminals","api":"POST https://api.atoa.me/api/terminal/list","href":"/api-reference/remote-payments/list-terminals"},{"title":"Process Remote Payment","sidebarTitle":"Process Remote Payment","api":"POST https://api.atoa.me/api/terminal/process-remote-payment","description":"Trigger a payment on a merchant's own PAX terminal remotely through the Atoa API, and track it to completion using webhooks.","href":"/api-reference/remote-payments/process-remote-payment"}]},{"group":"Refunds","icon":"retweet","pages":[{"title":"Initiate Refund | Refunds API","sidebarTitle":"Initiate Refund","api":"POST https://api.atoa.me/api/refund","href":"/api-reference/refund/initiate-refund"},{"title":"Cancel Refund | Refunds API","sidebarTitle":"Cancel Refund","api":"DELETE https://api.atoa.me/api/refund/{refundId}/cancel","description":"Cancel refund via the Atoa Refunds API, request parameters, response schema and code samples in cURL, Python, JavaScript, PHP, Go and Java.","href":"/api-reference/refund/cancel-refund"},{"title":"Get Refund Payments | Refunds API","sidebarTitle":"Get Refunds","api":"GET https://api.atoa.me/api/refund/{paymentRequestId}","href":"/api-reference/refund/get-refund-payments"}]},{"group":"Institutions","icon":"building","pages":[{"title":"Get List of Available Institutions or Banks","sidebarTitle":"Get List of Available Institutions or Banks","api":"Get https://api.atoa.me/api/institutions","href":"/api-reference/institutions/institutions-controller"}]},{"group":"Bank Feed","icon":"building-columns","pages":[{"title":"Initiate Authorization Flow","sidebarTitle":"Initiate Authorization Flow","api":"POST https://api.atoa.me/api/bank/auth/initiate","href":"/api-reference/account-initiation-services/initiate-account-authorization"},{"title":"Fetch Account Transactions","sidebarTitle":"Fetch Account Transactions","api":"GET https://api.atoa.me/api/bank/accounts/{accountId}/transactions?from=YYYY-MM-DD\u0026before=YYYY-MM-DD\u0026cursor={cursor}","href":"/api-reference/account-initiation-services/fetch-account-transactions"},{"title":"Fetch Account Balance","sidebarTitle":"Fetch Account Balance","api":"GET https://api.atoa.me/api/bank/accounts/{accountId}/balance","href":"/api-reference/account-initiation-services/fetch-account-balance"},{"title":"Fetch Account Details","sidebarTitle":"Fetch Account Details","api":"GET https://api.atoa.me/api/bank/accounts/{accountId}","href":"/api-reference/account-initiation-services/fetch-account-details"},{"title":"Fetch All Accounts","sidebarTitle":"Fetch All Accounts","api":"GET https://api.atoa.me/api/bank/{accountAuthId}/accounts","href":"/api-reference/account-initiation-services/fetch-all-accounts"},{"title":"Revoke Account Access","sidebarTitle":"Revoke Account Access","api":"POST https://api.atoa.me/api/bank/auth/revoke","href":"/api-reference/account-initiation-services/revoke-account-access"}]},{"group":"Payouts","icon":"money-bill-transfer","pages":[{"title":"Get Payouts | Payouts API","sidebarTitle":"Get Payouts","api":"GET https://api.atoa.me/api/payouts","href":"/api-reference/payouts/get-payouts"},{"title":"Get Payout Transactions","sidebarTitle":"Get Payout Transactions","api":"GET https://api.atoa.me/api/payouts/{payoutId}/transactions","href":"/api-reference/payouts/get-payout-transactions"}]}]},{"group":"Webhook","pages":[{"title":"Introduction | Webhooks API","sidebarTitle":"Webhook","icon":"webhook","iconType":"solid","href":"/api-reference/webhook/introduction"},{"group":"Endpoints","pages":[{"title":"Create Endpoint | Webhooks API","sidebarTitle":"Create endpoint","api":"Post https://api.atoa.me/api/webhook/v2/endpoints","href":"/api-reference/webhook/v2/create-endpoint"},{"title":"Update Endpoint | Webhooks API","sidebarTitle":"Update endpoint","api":"Put https://api.atoa.me/api/webhook/v2/endpoints/{endpointId}","href":"/api-reference/webhook/v2/update-endpoint"},{"title":"Delete Endpoint | Webhooks API","sidebarTitle":"Delete endpoint","api":"Delete https://api.atoa.me/api/webhook/v2/endpoints/{endpointId}","href":"/api-reference/webhook/v2/delete-endpoint"},{"title":"List Endpoints | Webhooks API","sidebarTitle":"List endpoints","api":"Get https://api.atoa.me/api/webhook/v2/endpoints","href":"/api-reference/webhook/v2/list-endpoints"},{"title":"List Event Types | Webhooks API","sidebarTitle":"List event types","api":"Get https://api.atoa.me/api/webhook/v2/event-types","href":"/api-reference/webhook/v2/list-event-types"},{"title":"Trigger test webhook event","sidebarTitle":"Trigger test webhook event","api":"Post https://api.atoa.me/api/webhook/test","href":"/api-reference/webhook/test-webhook-event"}]},{"group":"Legacy Endpoints","pages":[{"title":"Create webhook event","sidebarTitle":"Create webhook event","api":"Post https://api.atoa.me/api/webhook/merchant","href":"/api-reference/webhook/create-webhook-event"},{"title":"Get all merchant webhooks","sidebarTitle":"Get all merchant webhooks","api":"Get https://api.atoa.me/api/webhook/merchant","href":"/api-reference/webhook/get-all-merchant-webhooks"},{"title":"Delete webhook event","sidebarTitle":"Delete webhook event","api":"Delete https://api.atoa.me/api/webhook/{webhookId}/merchant","href":"/api-reference/webhook/delete-webhook-event"}]},{"group":"Signature Verification","pages":[{"title":"V2 Webhook Signing","sidebarTitle":"V2 Webhook Signing","icon":"shield-check","iconType":"solid","href":"/api-reference/webhook/v2-signing"},{"title":"V1 Webhook Signing (Legacy)","sidebarTitle":"V1 Webhook Signing (Legacy)","icon":"key","iconType":"solid","href":"/api-reference/webhook/v1-signing"}]},{"group":"Payload Reference","pages":[{"title":"Payment Status Webhook Payload","sidebarTitle":"Payment Status Webhook Payload","icon":"right-to-bracket","href":"/api-reference/webhook/process-payment-webhook-response"},{"title":"Expired Status Webhook Payload","sidebarTitle":"Expired Status Webhook Payload","icon":"right-to-bracket","href":"/api-reference/webhook/expired-status-webhook-response"},{"title":"Refund Status Webhook Payload","sidebarTitle":"Refund Status Webhook Payload","icon":"right-to-bracket","href":"/api-reference/webhook/refund-status-webhook-response"},{"title":"POS Payment Status Webhook Payload","sidebarTitle":"POS Payment Status Webhook Payload","icon":"right-to-bracket","href":"/api-reference/webhook/pos-payment-status-webhook-response"},{"title":"Payment Method Status Webhook Payload","sidebarTitle":"Payment Method Status Webhook Payload","icon":"right-to-bracket","href":"/api-reference/webhook/payment-method-status-webhook-response"}]}]},{"group":"Card on File","pages":[{"title":"Introduction | Card on File API","sidebarTitle":"Card on File","icon":"credit-card","iconType":"solid","href":"/api-reference/card-on-file/introduction"},{"title":"Authorize Card | Card on File API","sidebarTitle":"Authorize Card","api":"POST https://api.atoa.me/api/customers/{customerId}/cards/authorize","href":"/api-reference/card-on-file/authorize-card"},{"title":"Charge Saved Card | Card on File API","sidebarTitle":"Charge Saved Card","api":"POST https://api.atoa.me/api/payments/card/process-payment","href":"/api-reference/card-on-file/charge-saved-card"},{"title":"Manual Capture Payment","sidebarTitle":"Manual Capture Payment","api":"POST https://api.atoa.me/api/payments/card/payment-request/{paymentRequestId}/capture","href":"/api-reference/card-on-file/capture-payment"},{"title":"Manual Cancel Payment","sidebarTitle":"Manual Cancel Payment","api":"POST https://api.atoa.me/api/payments/card/payment-request/{paymentRequestId}/cancel","href":"/api-reference/card-on-file/cancel-payment"}]}]}]},"title":"Initiate Refund | Refunds API - Atoa Docs","buildId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","deploymentId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-DmVyH30O.js","utils-BHQqGGOd.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-CD-E4BIt.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Bp5Lq9Ds.js","snippetPresets-C4xAVCFP.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CgXVLxUC.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BF8I5oUf.js","shallow-Byd0lWnC.js","getApiPlaygroundDisplay-BGOZG1OK.js","CodeSnippet-CpvQL0CY.js","CodeSnippets-B8wkBKXa.js","Page-CBCH2P7b.js","getPastedJson-Ry3scI3Y.js","icon-D7a9HcdD.js","MethodPill-CJ8pmHhz.js","DuplicateIcon-rh1HJF0t.js","createIcon-DvGznqYs.js","DynamicMarkdown-Cc6AuSHS.js","SectionHeading-B4A0S-ep.js","axios-vUo_bRtp.js"]}