Will generate a Payment object and return it as a successful response.
Optional amount argument can be included in the request body to request a partial refund.
Consult refund_availability field on Purchase on details whether this Purchase can be refunded or not.
If this operation takes too long to be processed on the acquirer side - you will get a response with status code 200 and a Purchase object having status = pending_refund in body (you will receive a corresponding Webhook callback too for a purchase.pending_refund event). To be notified of a successful operation completion, please subscribe to payment.refunded callback event - it will deliver a Payment generated by this refund.
If refund fails due to payment processing error, you will receive HTTP response code 400 with error code purchase_refund_error. In this case, to get more details about the error, you should perform a GET /purchases/{id}/ request for the Purchase you tried to refund. In transaction_data.attempts[] array (newest element first) you’ll find the corresponding attempt with error code and description in .error parameter.
The object type and id this object is related to, if any. E.g. refund Payments are related to a specific Purchase, so this object will contain type: purchase and id: <purchase's id>.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"CHIP API","colors":{"primary":"#5147DD","light":"#AE87FF","dark":"#0D001D"},"logo":{"light":"https://mintcdn.com/chipinsdnbhd/_ZYOd6liWS9njiPb/logo/wordmark.svg?fit=max\u0026auto=format\u0026n=_ZYOd6liWS9njiPb\u0026q=85\u0026s=f32c001ffd0f5418d58f69fffa20bda6","dark":"https://mintcdn.com/chipinsdnbhd/_ZYOd6liWS9njiPb/logo/wordmark.svg?fit=max\u0026auto=format\u0026n=_ZYOd6liWS9njiPb\u0026q=85\u0026s=f32c001ffd0f5418d58f69fffa20bda6"},"favicon":"https://mintcdn.com/chipinsdnbhd/_ZYOd6liWS9njiPb/favicon.png?fit=max\u0026auto=format\u0026n=_ZYOd6liWS9njiPb\u0026q=85\u0026s=a6b6c40ed82e53a96658e9c80455c134","api":{"openapi":["_openapi-chip-collect.yml","_openapi-chip-send.yml"]},"appearance":{"default":"dark","strict":true},"background":{"image":"https://mintcdn.com/chipinsdnbhd/_ZYOd6liWS9njiPb/images/background.png?fit=max\u0026auto=format\u0026n=_ZYOd6liWS9njiPb\u0026q=85\u0026s=dc517538f4416172f67b6e5eea3b1e41","color":{"dark":"#0C1220"}},"navbar":{"links":[{"href":"https://wa.me/chip.asia?text=Hi%20CHIP","label":"Support"},{"href":"https://blog.chip-in.asia","label":"Blog"}],"primary":{"type":"button","label":"Dashboard","href":"https://portal.chip-in.asia/login"}},"footer":{"socials":{"facebook":"https://www.facebook.com/chip.asia.fb","instagram":"https://www.instagram.com/chip_asia","github":"https://github.com/CHIPAsia","linkedin":"https://www.linkedin.com/company/chip-asia","twitter":"https://twitter.com/CHIP_asia"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"chipinsdnbhd","hasAudioNarration":false,"actualSubdomain":"chipinsdnbhd","customDomains":["docs.chip-in.asia"],"gitSource":{"type":"github","owner":"chipasia","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adf6c4a6c71dd37a9885ca0","collectionId":"820e74a1-76a9-49b2-ab8e-13fbd464d81b","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adf6c4a6c71dd37a9885ca0"},"entitlements":{},"buildId":"6adf6c4a6c71dd37a9885ca0","clientVersion":"0.0.3971","searchFilterCounts":[{"language":"default","tag":"CHIP Collect","count":54},{"language":"default","tag":"API Reference","count":34},{"language":"default","tag":"CHIP Send","count":34},{"language":"default","tag":"Overview","count":25},{"language":"default","tag":"Webhooks","count":13},{"language":"default","tag":"Purchases","count":10},{"language":"default","tag":"Clients","count":9},{"language":"default","tag":"Direct post \u0026 Skip payment page","count":8},{"language":"default","tag":"Bank Accounts","count":5},{"language":"default","tag":"Groups","count":5}]},"assistantConfig":{},"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}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"chip-collect/api-reference/purchases/refund","slug":"/chip-collect/api-reference/purchases/refund","pageMetadata":{"openapi":"_openapi-chip-collect POST /purchases/{id}/refund/","description":"Will generate a Payment object and return it as a successful response.\n\nOptional `amount` argument can be included in the request body to request a partial refund.\n\nConsult `refund_availability` field on Purchase on details whether this Purchase can be refunded or not.\n\nIf this operation takes too long to be processed on the acquirer side - you will get a response with status code 200 and a Purchase object having `status` = `pending_refund` in body (you will receive a corresponding Webhook callback too for a `purchase.pending_refund` event). To be notified of a successful operation completion, please subscribe to `payment.refunded` callback event - it will deliver a Payment generated by this refund.\n\nIf refund fails due to payment processing error, you will receive HTTP response code 400 with error code `purchase_refund_error`. In this case, to get more details about the error, you should perform a `GET /purchases/{id}/` request for the Purchase you tried to refund. In `transaction_data.attempts[]` array (newest element first) you'll find the corresponding attempt with error code and description in `.error` parameter.","title":"Refund a paid purchase","href":"/chip-collect/api-reference/purchases/refund"},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Will generate a Payment object and return it as a successful response.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Optional \", _jsx(_components.code, {\n children: \"amount\"\n }), \" argument can be included in the request body to request a partial refund.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Consult \", _jsx(_components.code, {\n children: \"refund_availability\"\n }), \" field on Purchase on details whether this Purchase can be refunded or not.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"If this operation takes too long to be processed on the acquirer side - you will get a response with status code 200 and a Purchase object having \", _jsx(_components.code, {\n children: \"status\"\n }), \" = \", _jsx(_components.code, {\n children: \"pending_refund\"\n }), \" in body (you will receive a corresponding Webhook callback too for a \", _jsx(_components.code, {\n children: \"purchase.pending_refund\"\n }), \" event). To be notified of a successful operation completion, please subscribe to \", _jsx(_components.code, {\n children: \"payment.refunded\"\n }), \" callback event - it will deliver a Payment generated by this refund.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"If refund fails due to payment processing error, you will receive HTTP response code 400 with error code \", _jsx(_components.code, {\n children: \"purchase_refund_error\"\n }), \". In this case, to get more details about the error, you should perform a \", _jsx(_components.code, {\n children: \"GET /purchases/{id}/\"\n }), \" request for the Purchase you tried to refund. In \", _jsx(_components.code, {\n children: \"transaction_data.attempts[]\"\n }), \" array (newest element first) you’ll find the corresponding attempt with error code and description in \", _jsx(_components.code, {\n children: \".error\"\n }), \" parameter.\"]\n })]\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}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"openapi":"_openapi-chip-collect POST /purchases/{id}/refund/","description":"Will generate a Payment object and return it as a successful response.\n\nOptional `amount` argument can be included in the request body to request a partial refund.\n\nConsult `refund_availability` field on Purchase on details whether this Purchase can be refunded or not.\n\nIf this operation takes too long to be processed on the acquirer side - you will get a response with status code 200 and a Purchase object having `status` = `pending_refund` in body (you will receive a corresponding Webhook callback too for a `purchase.pending_refund` event). To be notified of a successful operation completion, please subscribe to `payment.refunded` callback event - it will deliver a Payment generated by this refund.\n\nIf refund fails due to payment processing error, you will receive HTTP response code 400 with error code `purchase_refund_error`. In this case, to get more details about the error, you should perform a `GET /purchases/{id}/` request for the Purchase you tried to refund. In `transaction_data.attempts[]` array (newest element first) you'll find the corresponding attempt with error code and description in `.error` parameter.","title":"Refund a paid purchase","href":"/chip-collect/api-reference/purchases/refund"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"purchases_refund","description":"Will generate a Payment object and return it as a successful response.\n\nOptional `amount` argument can be included in the request body to request a partial refund.\n\nConsult `refund_availability` field on Purchase on details whether this Purchase can be refunded or not.\n\nIf this operation takes too long to be processed on the acquirer side - you will get a response with status code 200 and a Purchase object having `status` = `pending_refund` in body (you will receive a corresponding Webhook callback too for a `purchase.pending_refund` event). To be notified of a successful operation completion, please subscribe to `payment.refunded` callback event - it will deliver a Payment generated by this refund.\n\nIf refund fails due to payment processing error, you will receive HTTP response code 400 with error code `purchase_refund_error`. In this case, to get more details about the error, you should perform a `GET /purchases/{id}/` request for the Purchase you tried to refund. In `transaction_data.attempts[]` array (newest element first) you'll find the corresponding attempt with error code and description in `.error` parameter.","responses":{"200":"eee95d96-6002-40a2-98d3-4eecefb87c38","400":"b4c17af9-2dae-4419-b365-c6fcae5df34c","404":"b836ffc5-31ce-45a5-9dd9-4fd0f66ed789"},"requestBody":"de40bf8a-59a5-45f1-9d2b-3557ff1c8aa7","summary":"Refund a paid purchase","tags":["Purchases"],"security":["80ca9ebb-9487-43bc-8286-c5967ef00b5c"],"method":"post","type":"path","servers":["b158211a-bed0-41c2-b0f4-83a17dfd9b9a"],"path":"/purchases/{id}/refund/","baseUrlOptions":["https://gate.chip-in.asia/api/v1"],"title":"Refund a paid purchase","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"2a475b12-4640-4746-9ef8-3fb48d159a69":{"name":"id","required":true,"in":"path","description":"Object ID (UUID)","schema":{"type":"string","format":"uuid","isRequired":true,"description":"Object ID (UUID)","uniqueKey":"","typeLabel":"string\u003cuuid>"}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"amount":{"type":"integer","description":"Amount to refund in minor units of the purchase's currency - e.g. `100` for RM 1.00. Should not be more than `Purchase.refundable_amount`.\n\nOptional; if not provided, a full refund will be executed. See the description for `Purchase.refund_availability` field.","uniqueKey":"amount","typeLabel":"integer"}},"type":"object","uniqueKey":"","typeLabel":"object"},"example":{"amount":120},"examples":{"Example":{"title":"Example","value":{"amount":120}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"eee95d96-6002-40a2-98d3-4eecefb87c38":{"description":"OK","content":{"application/json":{"schema":{"type":"object","description":"A record of a performed financial transaction. Can be generated e.g. as a result of refund operation.","properties":{"type":{"type":"string","description":"Object type identifier","uniqueKey":"type","typeLabel":"string"},"id":{"type":"string","format":"uuid","uniqueKey":"id","typeLabel":"string\u003cuuid>"},"created_on":{"type":"integer","description":"Object creation time","format":"int64","example":1619740800,"uniqueKey":"created_on","typeLabel":"integer\u003cint64>"},"updated_on":{"type":"integer","description":"Object last modification time","format":"int64","example":1619740800,"uniqueKey":"updated_on","typeLabel":"integer\u003cint64>"},"client":{"type":"object","description":"Contains details about the client of a purchase or payment - the remote payer/fund recipient party.","required":["email"],"properties":{"email":{"type":"string","format":"email","maxLength":254,"example":"customer@example.com","description":"Email address","isRequired":true,"uniqueKey":"client.email","typeLabel":"string\u003cemail>"},"bank_account":{"type":"string","maxLength":64,"description":"Bank account number (e.g. IBAN)","uniqueKey":"client.bank_account","typeLabel":"string"},"bank_code":{"type":"string","maxLength":32,"description":"SWIFT/BIC code of the bank","uniqueKey":"client.bank_code","typeLabel":"string"},"phone":{"type":"string","maxLength":32,"description":"Phone number in the `\u003ccountry_code> \u003cnumber>` format","example":"+60 123456789","uniqueKey":"client.phone","typeLabel":"string"},"full_name":{"type":"string","maxLength":1000,"description":"Name and surname of client. It is advisable to include `full_name` in request body.","uniqueKey":"client.full_name","typeLabel":"string"},"personal_code":{"type":"string","maxLength":32,"description":"Personal identification code of client","uniqueKey":"client.personal_code","typeLabel":"string"},"street_address":{"type":"string","maxLength":128,"description":"Street house number and flat address where applicable","uniqueKey":"client.street_address","typeLabel":"string"},"country":{"type":"string","maxLength":2,"description":"Country code in the ISO 3166-1 alpha-2 format (e.g. 'GB')","uniqueKey":"client.country","typeLabel":"string"},"city":{"type":"string","maxLength":128,"description":"City name","uniqueKey":"client.city","typeLabel":"string"},"zip_code":{"type":"string","maxLength":32,"description":"ZIP or postal code","uniqueKey":"client.zip_code","typeLabel":"string"},"state":{"type":"string","maxLength":128,"description":"State code","uniqueKey":"client.state","typeLabel":"string"},"shipping_street_address":{"type":"string","maxLength":128,"description":"Street house number and flat address where applicable","uniqueKey":"client.shipping_street_address","typeLabel":"string"},"shipping_country":{"type":"string","maxLength":2,"description":"Country code in the ISO 3166-1 alpha-2 format (e.g. 'GB')","uniqueKey":"client.shipping_country","typeLabel":"string"},"shipping_city":{"type":"string","maxLength":128,"description":"City name","uniqueKey":"client.shipping_city","typeLabel":"string"},"shipping_zip_code":{"type":"string","maxLength":32,"description":"ZIP or postal code","uniqueKey":"client.shipping_zip_code","typeLabel":"string"},"shipping_state":{"type":"string","maxLength":128,"description":"State code","uniqueKey":"client.shipping_state","typeLabel":"string"},"cc":{"type":"array","items":{"type":"string","format":"email","maxLength":254,"example":"customer@example.com","description":"Email address","uniqueKey":"client.cc.items.[INDEX]","typeLabel":"string\u003cemail>"},"description":"Email addresses to receive a carbon copy of all notification emails","uniqueKey":"client.cc","typeLabel":"string\u003cemail>[]"},"bcc":{"type":"array","items":{"type":"string","format":"email","maxLength":254,"example":"customer@example.com","description":"Email address","uniqueKey":"client.bcc.items.[INDEX]","typeLabel":"string\u003cemail>"},"description":"Email addresses to receive a blind carbon copy of all notification emails","uniqueKey":"client.bcc","typeLabel":"string\u003cemail>[]"},"legal_name":{"type":"string","maxLength":1000,"description":"Legal name of company","uniqueKey":"client.legal_name","typeLabel":"string"},"brand_name":{"type":"string","maxLength":128,"description":"Company brand name","uniqueKey":"client.brand_name","typeLabel":"string"},"registration_number":{"type":"string","maxLength":32,"description":"Registration number of company","uniqueKey":"client.registration_number","typeLabel":"string"},"tax_number":{"type":"string","maxLength":32,"description":"Tax payer registration number","uniqueKey":"client.tax_number","typeLabel":"string"}},"uniqueKey":"client","typeLabel":"object"},"payment":{"type":"object","description":"Details of an executed transaction. Read-only for `Purchase`s and `Payout`s. For an unpaid `Purchase`, this object will be `null`.","properties":{"is_outgoing":{"type":"boolean","default":false,"description":"Denotes the direction of payment, e.g. for a paid Purchase, is granted to be `false`, `true` for payouts.","uniqueKey":"payment.is_outgoing","typeLabel":"boolean"},"payment_type":{"type":"string","enum":["purchase","purchase_charge","payout","bank_payment","refund","custom"],"uniqueKey":"payment.payment_type","typeLabel":"enum\u003cstring>"},"amount":{"type":"integer","description":"Amount of money as the smallest indivisible units of the currency. Examples: 100 is equivalent to RM 1.00.","uniqueKey":"payment.amount","typeLabel":"integer"},"currency":{"type":"string","maxLength":3,"description":"Currency code in the ISO 4217 standard (e.g. 'MYR').","uniqueKey":"payment.currency","typeLabel":"string"},"net_amount":{"type":"integer","description":"Amount of money as the smallest indivisible units of the currency. Examples: 100 is equivalent to RM 1.00.","x-summary":"Net amount of payment with all fees and pending amount subtracted. `amount` = `net_amount` + `fee_amount` + `pending_amount`. The respective account is credited or debited with this value.","uniqueKey":"payment.net_amount","typeLabel":"integer"},"fee_amount":{"type":"integer","description":"Amount of money as the smallest indivisible units of the currency. Examples: 100 is equivalent to RM 1.00.","x-summary":"Amount of fees for this payment. For a Purchase's PurchaseDetails this is the calculated transaction fee. The same fee is also exposed per-attempt at `transaction_data.attempts[].fee_amount`, alongside `markup_amount` and `processing_fee`. See [Card response metadata](/chip-collect/overview/direct-post/card-response-metadata).","uniqueKey":"payment.fee_amount","typeLabel":"integer"},"pending_amount":{"type":"integer","description":"Amount of money as the smallest indivisible units of the currency. Examples: 100 is equivalent to RM 1.00.","x-summary":"Pending amount for this payment that will be unfrozen later. If e.g. it's a Purchase's PaymentDetails and a part of transaction sum is withheld to form a rolling reserve, this field will be equal to the frozen part amount.","uniqueKey":"payment.pending_amount","typeLabel":"integer"},"pending_unfreeze_on":{"oneOf":[{"type":"integer","format":"int64","x-summary":"Informs when the `pending_amount` will be unfrozen.","example":1619740800,"uniqueKey":"payment.pending_unfreeze_on.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","uniqueKey":"payment.pending_unfreeze_on.oneOf.1","typeLabel":"null"}],"uniqueKey":"payment.pending_unfreeze_on","typeLabel":"integer\u003cint64> | null"},"description":{"type":"string","maxLength":256,"uniqueKey":"payment.description","typeLabel":"string"},"paid_on":{"type":"integer","description":"When the payment was accepted in (`is_outgoing == false`) or sent from (`is_outgoing == true`) the gateway system.","format":"int64","example":1619740800,"uniqueKey":"payment.paid_on","typeLabel":"integer\u003cint64>"},"remote_paid_on":{"type":"integer","description":"If available, this field will report the date the payment was sent by the remote payer (`is_outgoing == false`) or when funds arrived to the remote beneficiary (`is_outgoing == true`).","format":"int64","example":1619740800,"uniqueKey":"payment.remote_paid_on","typeLabel":"integer\u003cint64>"}},"uniqueKey":"payment","typeLabel":"object"},"transaction_data":{"oneOf":[{"type":"object","description":"Payment method-specific, read-only, internal transaction data. Will contain information about all the transaction attempts, if available.","uniqueKey":"transaction_data.oneOf.0","typeLabel":"object"},{"type":"null","description":"Payment method-specific, read-only, internal transaction data. Will contain information about all the transaction attempts, if available.","uniqueKey":"transaction_data.oneOf.1","typeLabel":"null"}],"uniqueKey":"transaction_data","typeLabel":"object | null"},"related_to":{"oneOf":[{"type":"object","description":"The object type and id this object is related to, if any. E.g. refund Payments are related to a specific Purchase, so this object will contain `type: purchase` and `id: \u003cpurchase's id>`.","properties":{"type":{"type":"string","description":"Object type identifier","uniqueKey":"related_to.oneOf.0.type","typeLabel":"string"},"id":{"type":"string","format":"uuid","uniqueKey":"related_to.oneOf.0.id","typeLabel":"string\u003cuuid>"}},"uniqueKey":"related_to.oneOf.0","typeLabel":"object"},{"type":"null","description":"The object type and id this object is related to, if any. E.g. refund Payments are related to a specific Purchase, so this object will contain `type: purchase` and `id: \u003cpurchase's id>`.","properties":{"type":{"type":"string","description":"Object type identifier"},"id":{"type":"string","format":"uuid"}},"uniqueKey":"related_to.oneOf.1","typeLabel":"null"}],"uniqueKey":"related_to","typeLabel":"object | null"},"reference_generated":{"type":"string","description":"If an explicit invoice `reference` wasn't provided, this autogenerated value will be used as a reference instead.","uniqueKey":"reference_generated","typeLabel":"string"},"reference":{"type":"string","description":"Invoice reference.","uniqueKey":"reference","typeLabel":"string"},"account_id":{"type":"string","format":"uuid","description":"ID of an account this Payment is associated with.","uniqueKey":"account_id","typeLabel":"string\u003cuuid>"},"company_id":{"type":"string","format":"uuid","uniqueKey":"company_id","typeLabel":"string\u003cuuid>"},"is_test":{"type":"boolean","description":"Indicates this is a test object, created using test API keys or using the merchant portal while in test mode.","uniqueKey":"is_test","typeLabel":"boolean"},"user_id":{"oneOf":[{"type":"string","format":"uuid","description":"ID of user who has created this object in the merchant portal, if applicable.","uniqueKey":"user_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"ID of user who has created this object in the merchant portal, if applicable.","uniqueKey":"user_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"user_id","typeLabel":"string\u003cuuid> | null"},"brand_id":{"type":"string","format":"uuid","description":"ID of the brand this Payment is associated with.","uniqueKey":"brand_id","typeLabel":"string\u003cuuid>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","created_on":1619740800,"updated_on":1619740800,"client":{"email":"customer@example.com","bank_account":"\u003cstring>","bank_code":"\u003cstring>","phone":"+60 123456789","full_name":"\u003cstring>","personal_code":"\u003cstring>","street_address":"\u003cstring>","country":"\u003cstring>","city":"\u003cstring>","zip_code":"\u003cstring>","state":"\u003cstring>","shipping_street_address":"\u003cstring>","shipping_country":"\u003cstring>","shipping_city":"\u003cstring>","shipping_zip_code":"\u003cstring>","shipping_state":"\u003cstring>","cc":["customer@example.com"],"bcc":["customer@example.com"],"legal_name":"\u003cstring>","brand_name":"\u003cstring>","registration_number":"\u003cstring>","tax_number":"\u003cstring>"},"payment":{"is_outgoing":false,"payment_type":"purchase","amount":123,"currency":"\u003cstring>","net_amount":123,"fee_amount":123,"pending_amount":123,"pending_unfreeze_on":1619740800,"description":"\u003cstring>","paid_on":1619740800,"remote_paid_on":1619740800},"transaction_data":{},"related_to":{"type":"\u003cstring>","id":"3c90c3cc-0d44-4b50-8888-8dd25736052a"},"reference_generated":"\u003cstring>","reference":"\u003cstring>","account_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","company_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","is_test":true,"user_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","brand_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a"}}},"exampleType":"generated"}},"exampleType":"generated"},"b4c17af9-2dae-4419-b365-c6fcae5df34c":{"description":"Invalid data submitted or request processing error","content":{"application/json":{"schema":{"type":"object","example":"{\n \"__all__\": {\n \"message\": \"descriptive error message\",\n \"code\": \"error_code\"\n }\n}\n","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":"{\n \"__all__\": {\n \"message\": \"descriptive error message\",\n \"code\": \"error_code\"\n }\n}\n"}},"exampleType":"generated"}},"exampleType":"generated"},"b836ffc5-31ce-45a5-9dd9-4fd0f66ed789":{"description":"No such object","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{"80ca9ebb-9487-43bc-8286-c5967ef00b5c":{"bearerAuth":{"type":"http","scheme":"bearer","scopes":[]}}},"servers":{"b158211a-bed0-41c2-b0f4-83a17dfd9b9a":{"url":"https://gate.chip-in.asia/api/v1"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"_openapi-chip-collect.yml"},"subdomain":"chipinsdnbhd","siteName":"CHIP API","title":"Refund a paid purchase - CHIP API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-27T13:42:31.050Z","originalFileLocation":"chip-collect/api-reference/purchases/refund.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"dark\";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=\"dark\"}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=\"Will generate a Payment object and return it as a successful response. Optional amount argument can be included in the request body to request a partial refund. Consult refund_availability field on Purchase on details whether this Purchase can be refunded or not. If this operation takes too long to be processed on the acquirer side - you will get a response with status code 200 and a Purchase object having status = pending_refund in body (you will receive a corresponding Webhook callback too for a purchase.pending_refund event). To be notified of a successful operation completion, please subscribe to payment.refunded callback event - it will deliver a Payment generated by this refund. If refund fails due to payment processing error, you will receive HTTP response code 400 with error code purchase_refund_error. In this case, to get more details about the error, you should perform a GET /purchases/{id}/ request for the Purchase you tried to refund. In transaction_data.attempts[] array (newest element first) you\u0026#x27;ll find the corresponding attempt with error code and description in .error parameter.\">\u003cmeta data-mint-head name=\"application-name\" content=\"CHIP API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/chipinsdnbhd/tC8aMMXQKavc-_7e/_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/chipinsdnbhd/tC8aMMXQKavc-_7e/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/chipinsdnbhd/tC8aMMXQKavc-_7e/_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/chipinsdnbhd/tC8aMMXQKavc-_7e/_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/chipinsdnbhd/tC8aMMXQKavc-_7e/_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/chipinsdnbhd/tC8aMMXQKavc-_7e/_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/chipinsdnbhd/tC8aMMXQKavc-_7e/_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/chipinsdnbhd/tC8aMMXQKavc-_7e/_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/chipinsdnbhd/tC8aMMXQKavc-_7e/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Refund a paid purchase - CHIP API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Will generate a Payment object and return it as a successful response. Optional amount argument can be included in the request body to request a partial refund. Consult refund_availability field on Purchase on details whether this Purchase can be refunded or not. If this operation takes too long to be processed on the acquirer side - you will get a response with status code 200 and a Purchase object having status = pending_refund in body (you will receive a corresponding Webhook callback too for a purchase.pending_refund event). To be notified of a successful operation completion, please subscribe to payment.refunded callback event - it will deliver a Payment generated by this refund. If refund fails due to payment processing error, you will receive HTTP response code 400 with error code purchase_refund_error. In this case, to get more details about the error, you should perform a GET /purchases/{id}/ request for the Purchase you tried to refund. In transaction_data.attempts[] array (newest element first) you\u0026#x27;ll find the corresponding attempt with error code and description in .error parameter.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"CHIP API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.chip-in.asia/chip-collect/api-reference/purchases/refund\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://chipinsdnbhd.mintlify.app/_mintlify/api/og/v2?division=Purchases\u0026amp;title=Refund+a+paid+purchase\u0026amp;description=Will+generate+a+Payment+object+and+return+it+as+a+successful+response.%0A%0AOptional+%60amount%60+argument+can+be+included+in+the+request+body+to+request+a+partial+refu\u0026amp;theme=76944bc5cf62695feaaacb7a\u0026amp;signature=169947be0e767bf4bf35ff3d974ff8c395562e194cfa362c9181979a61feac20\">\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=\"Refund a paid purchase - CHIP API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Will generate a Payment object and return it as a successful response. Optional amount argument can be included in the request body to request a partial refund. Consult refund_availability field on Purchase on details whether this Purchase can be refunded or not. If this operation takes too long to be processed on the acquirer side - you will get a response with status code 200 and a Purchase object having status = pending_refund in body (you will receive a corresponding Webhook callback too for a purchase.pending_refund event). To be notified of a successful operation completion, please subscribe to payment.refunded callback event - it will deliver a Payment generated by this refund. If refund fails due to payment processing error, you will receive HTTP response code 400 with error code purchase_refund_error. In this case, to get more details about the error, you should perform a GET /purchases/{id}/ request for the Purchase you tried to refund. In transaction_data.attempts[] array (newest element first) you\u0026#x27;ll find the corresponding attempt with error code and description in .error parameter.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://chipinsdnbhd.mintlify.app/_mintlify/api/og/v2?division=Purchases\u0026amp;title=Refund+a+paid+purchase\u0026amp;description=Will+generate+a+Payment+object+and+return+it+as+a+successful+response.%0A%0AOptional+%60amount%60+argument+can+be+included+in+the+request+body+to+request+a+partial+refu\u0026amp;theme=76944bc5cf62695feaaacb7a\u0026amp;signature=169947be0e767bf4bf35ff3d974ff8c395562e194cfa362c9181979a61feac20\">\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/chipinsdnbhd/tC8aMMXQKavc-_7e/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"CHIP API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#5147DD\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.chip-in.asia/chip-collect/api-reference/purchases/refund\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/chip-collect/api-reference/purchases/refund.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.chip-in.asia/#organization\",\"name\":\"CHIP API\",\"url\":\"https://docs.chip-in.asia\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/chipinsdnbhd/_ZYOd6liWS9njiPb/logo/wordmark.svg?fit=max\u0026auto=format\u0026n=_ZYOd6liWS9njiPb\u0026q=85\u0026s=f32c001ffd0f5418d58f69fffa20bda6\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.chip-in.asia#website\",\"name\":\"CHIP API\",\"url\":\"https://docs.chip-in.asia\",\"publisher\":{\"@id\":\"https://docs.chip-in.asia/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.chip-in.asia/chip-collect/api-reference/purchases/refund#webpage\",\"url\":\"https://docs.chip-in.asia/chip-collect/api-reference/purchases/refund\",\"name\":\"Refund a paid purchase\",\"description\":\"Will generate a Payment object and return it as a successful response. Optional amount argument can be included in the request body to request a partial refund. Consult refund_availability field on Purchase on details whether this Purchase can be refunded or not. If this operation takes too long to be processed on the acquirer side - you will get a response with status code 200 and a Purchase object having status = pending_refund in body (you will receive a corresponding Webhook callback too for a purchase.pending_refund event). To be notified of a successful operation completion, please subscribe to payment.refunded callback event - it will deliver a Payment generated by this refund. If refund fails due to payment processing error, you will receive HTTP response code 400 with error code purchase_refund_error. In this case, to get more details about the error, you should perform a GET /purchases/{id}/ request for the Purchase you tried to refund. In transaction_data.attempts[] array (newest element first) you'll find the corresponding attempt with error code and description in .error parameter.\",\"dateModified\":\"2026-07-27T13:42:31.050Z\",\"isPartOf\":{\"@id\":\"https://docs.chip-in.asia#website\"},\"breadcrumb\":{\"@id\":\"https://docs.chip-in.asia/chip-collect/api-reference/purchases/refund#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.chip-in.asia/chip-collect/api-reference/purchases/refund#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Reference\",\"item\":\"https://docs.chip-in.asia/chip-collect/api-reference/purchases/create\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Purchases\",\"item\":\"https://docs.chip-in.asia/chip-collect/api-reference/purchases/create\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Refund a paid purchase\",\"item\":\"https://docs.chip-in.asia/chip-collect/api-reference/purchases/refund\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.chip-in.asia/chip-collect/api-reference/purchases/refund#apireference\",\"headline\":\"Refund a paid purchase\",\"name\":\"Refund a paid purchase\",\"description\":\"Will generate a Payment object and return it as a successful response. Optional amount argument can be included in the request body to request a partial refund. Consult refund_availability field on Purchase on details whether this Purchase can be refunded or not. If this operation takes too long to be processed on the acquirer side - you will get a response with status code 200 and a Purchase object having status = pending_refund in body (you will receive a corresponding Webhook callback too for a purchase.pending_refund event). To be notified of a successful operation completion, please subscribe to payment.refunded callback event - it will deliver a Payment generated by this refund. If refund fails due to payment processing error, you will receive HTTP response code 400 with error code purchase_refund_error. In this case, to get more details about the error, you should perform a GET /purchases/{id}/ request for the Purchase you tried to refund. In transaction_data.attempts[] array (newest element first) you'll find the corresponding attempt with error code and description in .error parameter.\",\"url\":\"https://docs.chip-in.asia/chip-collect/api-reference/purchases/refund\",\"mainEntityOfPage\":{\"@id\":\"https://docs.chip-in.asia/chip-collect/api-reference/purchases/refund#webpage\"},\"dateModified\":\"2026-07-27T13:42:31.050Z\",\"publisher\":{\"@id\":\"https://docs.chip-in.asia/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.chip-in.asia#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"CHIP API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"CHIP API","nav":{"global":null,"tabs":[{"tab":"CHIP Collect","groups":[{"group":"Overview","pages":[{"title":"CHIP Collect API","href":"/chip-collect/overview/introduction"},{"title":"Quickstart","href":"/chip-collect/overview/quickstart"},{"title":"Authentication","href":"/chip-collect/overview/authentication"},{"title":"Webhook signatures","href":"/chip-collect/overview/webhook-signatures"},{"title":"Errors","href":"/chip-collect/overview/errors"},{"title":"Changelog","href":"/chip-collect/overview/changelog"},{"group":"Online Purchases","pages":[{"title":"Payment Link","href":"/chip-collect/overview/online-purchases/payment-link"},{"title":"Subscriptions","href":"/chip-collect/overview/online-purchases/subscription"},{"title":"Pre-Authorization","href":"/chip-collect/overview/online-purchases/pre-auth"},{"title":"Custom","href":"/chip-collect/overview/online-purchases/custom"}]},{"title":"Callbacks","href":"/chip-collect/overview/callbacks"},{"title":"What We Offer","href":"/chip-collect/overview/what-we-offer"},{"group":"Direct post \u0026 Skip payment page","pages":[{"title":"Introduction","href":"/chip-collect/overview/direct-post/intro"},{"title":"FPX","href":"/chip-collect/overview/direct-post/fpx"},{"title":"Card (VISA/Mastercard)","href":"/chip-collect/overview/direct-post/card"},{"title":"Card response metadata","href":"/chip-collect/overview/direct-post/card-response-metadata"},{"title":"E-Wallet","href":"/chip-collect/overview/direct-post/e-wallet"},{"title":"Duitnow-QR","href":"/chip-collect/overview/direct-post/duitnow-qr"},{"title":"Crypto Coin","href":"/chip-collect/overview/direct-post/crypto-coin"},{"title":"Set a default payment method","href":"/chip-collect/overview/direct-post/active-payment-method"}]}]},{"group":"Integrate with AI agents","pages":[{"title":"Install the skill","href":"/chip-collect/overview/vibe-coding-guide"}]},{"group":"API Reference","pages":[{"group":"Purchases","pages":[{"openapi":"_openapi-chip-collect POST /purchases/","title":"Create a purchase","href":"/chip-collect/api-reference/purchases/create"},{"openapi":"_openapi-chip-collect GET /purchases/{id}/","title":"Retrieve a purchase","href":"/chip-collect/api-reference/purchases/retrieve"},{"openapi":"_openapi-chip-collect POST /purchases/{id}/cancel/","title":"Cancel a pending purchase","href":"/chip-collect/api-reference/purchases/cancel"},{"openapi":"_openapi-chip-collect POST /purchases/{id}/capture/","title":"Capture a previously authorized payment","href":"/chip-collect/api-reference/purchases/capture"},{"openapi":"_openapi-chip-collect POST /purchases/{id}/charge/","title":"Charge a purchase using a saved token","href":"/chip-collect/api-reference/purchases/charge"},{"openapi":"_openapi-chip-collect POST /purchases/{id}/delete_recurring_token/","title":"Delete a recurring token associated with a purchase","href":"/chip-collect/api-reference/purchases/delete-recurring-token"},{"openapi":"_openapi-chip-collect POST /purchases/{id}/mark_as_paid/","description":"Sets the Purchase's status to `paid` and marks `purchase.marked_as_paid` as `true` to distinguish it.","title":"Mark a purchase as paid","href":"/chip-collect/api-reference/purchases/mark-as-paid"},{"openapi":"_openapi-chip-collect POST /purchases/{id}/refund/","title":"Refund a paid purchase","href":"/chip-collect/api-reference/purchases/refund"},{"openapi":"_openapi-chip-collect POST /purchases/{id}/release/","description":"Release funds reserved for a Purchase (`status == hold`). You can place a `hold` (authenticate the payment) using `skip_capture == true` when creating the Purchase and ensuring your client submits the payment form.\n\nIf this operation takes too long to be processed on the acquirer side - you will get a response with status code 200 and a Purchase object having `status` = `pending_release` in body (you will receive a corresponding Webhook callback too for a `purchase.pending_release` event). To be notified of a successful operation completion, please subscribe to `purchase.released` callback event - it will deliver an updated Purchase with `status` = `released`.\n\nIf fund release fails due to payment processing error, you will receive HTTP response code 400 with error code `purchase_release_error`. In this case, to get more details about the error, you should perform a `GET /purchases/{id}/` request for the Purchase you tried to release funds for. In `transaction_data.attempts[]` array (newest element first) you'll find the corresponding attempt with error code and description in `.error` parameter.","title":"Release funds on hold","href":"/chip-collect/api-reference/purchases/release"},{"openapi":"_openapi-chip-collect POST /purchases/{id}/resend_invoice/","title":"Resend an invoice","href":"/chip-collect/api-reference/purchases/resend-invoice"}]},{"group":"Payment methods","pages":[{"openapi":"_openapi-chip-collect GET /payment_methods/","title":"List of payment methods","href":"/chip-collect/api-reference/payment-methods/list"}]},{"group":"Clients","pages":[{"openapi":"_openapi-chip-collect POST /clients/","title":"Create a client","href":"/chip-collect/api-reference/clients/create"},{"openapi":"_openapi-chip-collect DELETE /clients/{client_id}/recurring_tokens/{purchase_id}/","title":"Delete a recurring token","href":"/chip-collect/api-reference/clients/delete-recurring-tokens"},{"openapi":"_openapi-chip-collect DELETE /clients/{id}/","title":"Delete a client","href":"/chip-collect/api-reference/clients/delete"},{"openapi":"_openapi-chip-collect GET /clients/{id}/recurring_tokens/","title":"List recurring tokens","href":"/chip-collect/api-reference/clients/list-recurring-tokens"},{"openapi":"_openapi-chip-collect GET /clients/","title":"List all clients","href":"/chip-collect/api-reference/clients/list"},{"openapi":"_openapi-chip-collect PATCH /clients/{id}/","title":"Partially update a client","href":"/chip-collect/api-reference/clients/partial-update"},{"openapi":"_openapi-chip-collect GET /clients/{client_id}/recurring_tokens/{purchase_id}/","title":"Retrieve a recurring token","href":"/chip-collect/api-reference/clients/retrieve-recurring-tokens"},{"openapi":"_openapi-chip-collect GET /clients/{id}/","title":"Retrieve a client","href":"/chip-collect/api-reference/clients/retrieve"},{"openapi":"_openapi-chip-collect PUT /clients/{id}/","title":"Update a client","href":"/chip-collect/api-reference/clients/update"}]},{"group":"Webhooks","pages":[{"openapi":"_openapi-chip-collect POST /webhooks/","title":"Create a webhook","href":"/chip-collect/api-reference/webhooks/create"},{"openapi":"_openapi-chip-collect DELETE /webhooks/{id}/","title":"Delete a webhook","href":"/chip-collect/api-reference/webhooks/delete"},{"openapi":"_openapi-chip-collect GET /webhooks/","title":"List all webhooks","href":"/chip-collect/api-reference/webhooks/list"},{"openapi":"_openapi-chip-collect PATCH /webhooks/{id}/","title":"Partially update a webhook","href":"/chip-collect/api-reference/webhooks/partial-update"},{"openapi":"_openapi-chip-collect GET /webhooks/{id}/","title":"Retrieve a webhook","href":"/chip-collect/api-reference/webhooks/retrieve"},{"openapi":"_openapi-chip-collect PUT /webhooks/{id}/","title":"Update a webhook","href":"/chip-collect/api-reference/webhooks/update"}]},{"group":"Public key","pages":[{"openapi":"_openapi-chip-collect GET /public_key/","title":"Retrieve a public key","href":"/chip-collect/api-reference/public-key/retrieve"}]},{"group":"Account","pages":[{"openapi":"_openapi-chip-collect GET /account/json/balance/","title":"Get company balance","href":"/chip-collect/api-reference/account/balance"},{"openapi":"_openapi-chip-collect GET /account/json/turnover/","title":"Get company turnover","href":"/chip-collect/api-reference/account/turnover"}]},{"group":"Company statements","pages":[{"openapi":"_openapi-chip-collect POST /company_statements/{id}/cancel/","title":"Cancel a statement","href":"/chip-collect/api-reference/company-statements/cancel"},{"openapi":"_openapi-chip-collect GET /company_statements/","title":"List all statements","href":"/chip-collect/api-reference/company-statements/list"},{"openapi":"_openapi-chip-collect GET /company_statements/{id}/","title":"Retrieve a statement","href":"/chip-collect/api-reference/company-statements/retrieve"},{"openapi":"_openapi-chip-collect POST /company_statements/","title":"Schedule a statement","href":"/chip-collect/api-reference/company-statements/schedule"}]}]}]},{"tab":"CHIP Send","pages":[{"title":"CHIP Send","href":"/chip-send/api-reference/overview"}]}]},"title":"Refund a paid purchase - CHIP API","buildId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","deploymentId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-rfhihCWU.js","utils-BmH1XFxk.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-BcNsxPKB.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BAES3tkd.js","snippetPresets-DCMQBKLP.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-D6l_bzE9.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BOktbnNh.js","shallow-BCs8SgM7.js","getApiPlaygroundDisplay-DEmW5bJB.js","CodeSnippet-CpZOpB9C.js","CodeSnippets-BOBDqibl.js","Page-D5fEM6aW.js","getPastedJson-DH2JBvmr.js","icon-BBJH-kKh.js","MethodPill-D2Sd5NLC.js","DuplicateIcon-CGgfL2qN.js","createIcon-BKudBBzi.js","DynamicMarkdown-85clUA0i.js","SectionHeading-D0JiMgDx.js","axios-vUo_bRtp.js","Markdown-Cfiy0xZO.js","clsx-rL8ZCCw4.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-aeztFa9U.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BywkCr5C.js"]}