{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["tabs","tab","admonition"]},"type":"markdown"},"seo":{"title":"Reefpay Docs","description":"Reefpay is the groundbreaking payment gateway that lets you integrate with the future of payments.","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"refund-a-settled-transaction","__idx":0},"children":["Refund a settled transaction"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prerequisites","__idx":1},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A valid API key — see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/how-tos/setup/obtain-credentials"},"children":["Obtain API credentials"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A transaction in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["settled"]}," state"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-1-confirm-the-transaction-has-settled","__idx":2},"children":["Step 1: Confirm the transaction has settled"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Retrieve the transaction and verify ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transaction_state"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["settled"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"curl -X GET \\\n  https://api.dev.paradisegateway.net/v1/transactions/TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y \\\n  -H \"APIKEY: YOUR-API-KEY\"\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If the state is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["authorized"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["captured"]},", use a ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/how-tos/manage-transactions/cancel-auth"},"children":["cancel (void)"]}," instead — it releases held funds immediately without incurring processing fees."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-2-issue-the-refund","__idx":3},"children":["Step 2: Issue the refund"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Send ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /v1/transactions/{id}/cancel"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type: refund"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"full-refund","__idx":4},"children":["Full refund"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Specify the original transaction amount to refund the full payment."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"curl","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"curl -X POST \\\n  https://api.dev.paradisegateway.net/v1/transactions/TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y/cancel \\\n  -H \"Content-Type: application/json\" \\\n  -H \"APIKEY: YOUR-API-KEY\" \\\n  -d '{\n    \"type\": \"refund\",\n    \"amount\": 15000\n  }'\n","lang":"shell"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\ntransaction_id = \"TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y\"\nresp = requests.post(\n    f\"https://api.dev.paradisegateway.net/v1/transactions/{transaction_id}/cancel\",\n    headers={\"Content-Type\": \"application/json\", \"APIKEY\": \"YOUR-API-KEY\"},\n    json={\"type\": \"refund\", \"amount\": 15000},\n)\nprint(resp.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"JavaScript","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"const transactionId = \"TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y\";\nconst resp = await fetch(\n  `https://api.dev.paradisegateway.net/v1/transactions/${transactionId}/cancel`,\n  {\n    method: \"POST\",\n    headers: {\n      \"Content-Type\": \"application/json\",\n      \"APIKEY\": \"YOUR-API-KEY\",\n    },\n    body: JSON.stringify({ type: \"refund\", amount: 15000 }),\n  }\n);\nconsole.log(await resp.json());\n","lang":"javascript"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"C#","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"csharp","header":{"controls":{"copy":{}}},"source":"var transactionId = \"TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y\";\nvar payload = new { type = \"refund\", amount = 15000 };\nvar resp = await client.PostAsJsonAsync(\n    $\"https://api.dev.paradisegateway.net/v1/transactions/{transactionId}/cancel\",\n    payload);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());\n","lang":"csharp"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"String transactionId = \"TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y\";\nString body = \"\"\"\n    {\"type\": \"refund\", \"amount\": 15000}\n    \"\"\";\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\n        \"https://api.dev.paradisegateway.net/v1/transactions/\"\n        + transactionId + \"/cancel\"))\n    .header(\"Content-Type\", \"application/json\")\n    .header(\"APIKEY\", \"YOUR-API-KEY\")\n    .POST(HttpRequest.BodyPublishers.ofString(body)).build();\nHttpResponse<String> resp = client.send(request,\n    HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Go","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"transactionID := \"TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y\"\npayload := strings.NewReader(`{\"type\": \"refund\", \"amount\": 15000}`)\nreq, _ := http.NewRequest(\"POST\",\n    \"https://api.dev.paradisegateway.net/v1/transactions/\"+transactionID+\"/cancel\",\n    payload)\nreq.Header.Set(\"Content-Type\", \"application/json\")\nreq.Header.Set(\"APIKEY\", \"YOUR-API-KEY\")\nresp, _ := http.DefaultClient.Do(req)\ndefer resp.Body.Close()\nbody, _ := io.ReadAll(resp.Body)\nfmt.Println(string(body))\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"PHP","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"$id = \"TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y\";\n$ch = curl_init(\"https://api.dev.paradisegateway.net/v1/transactions/$id/cancel\");\ncurl_setopt_array($ch, [\n    CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true,\n    CURLOPT_HTTPHEADER => [\"Content-Type: application/json\", \"APIKEY: YOUR-API-KEY\"],\n    CURLOPT_POSTFIELDS => json_encode([\"type\" => \"refund\", \"amount\" => 15000]),\n]);\necho curl_exec($ch); curl_close($ch);\n","lang":"php"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Ruby","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ruby","header":{"controls":{"copy":{}}},"source":"require \"net/http\"; require \"json\"\nid = \"TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y\"\nuri = URI(\"https://api.dev.paradisegateway.net/v1/transactions/#{id}/cancel\")\nreq = Net::HTTP::Post.new(uri, {\n  \"Content-Type\" => \"application/json\", \"APIKEY\" => \"YOUR-API-KEY\",\n})\nreq.body = { type: \"refund\", amount: 15000 }.to_json\nresp = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }\nputs resp.body\n","lang":"ruby"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"partial-refund","__idx":5},"children":["Partial refund"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Specify a lesser amount to refund only part of the transaction."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"type\": \"refund\",\n  \"amount\": 5000\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This refunds 50.00 USD of the original 150.00 USD transaction."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-3-verify-the-response","__idx":6},"children":["Step 3: Verify the response"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y\",\n  \"object\": \"RefundTransactionResponse\",\n  \"type\": \"refund\",\n  \"transaction_state\": \"authorized\",\n  \"response_status\": \"Approved\",\n  \"response_code\": \"00\",\n  \"response_message\": \"The API request is approved.\",\n  \"amount\": 15000,\n  \"correlation_id\": \"b2c3d4e5-f6a7-8901-bcde-f12345678901\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The refund transaction enters the next settlement batch. The person typically sees the credit on their statement within 5–10 business days."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Refund settlement"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A refund is itself a transaction that goes through the batch settlement process. The refund amount is deducted from the merchant's next settlement batch."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"deciding-cancel-or-refund","__idx":7},"children":["Deciding: cancel or refund?"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Transaction state"},"children":["Transaction state"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Action"},"children":["Action"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Result"},"children":["Result"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["authorized"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["captured"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Cancel (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cancel"]},")"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Hold released immediately, no funds move"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["settled"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Refund (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refund"]},")"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Credit returned to person in 5–10 days"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"next-steps","__idx":8},"children":["Next steps"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/how-tos/manage-transactions/cancel-auth"},"children":["Cancel an authorized transaction"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/concepts/transactions/cancels-and-refunds"},"children":["About cancels and refunds"]}]}]}]},"headings":[{"value":"Refund a settled transaction","id":"refund-a-settled-transaction","depth":1},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"Step 1: Confirm the transaction has settled","id":"step-1-confirm-the-transaction-has-settled","depth":2},{"value":"Step 2: Issue the refund","id":"step-2-issue-the-refund","depth":2},{"value":"Full refund","id":"full-refund","depth":3},{"value":"Partial refund","id":"partial-refund","depth":3},{"value":"Step 3: Verify the response","id":"step-3-verify-the-response","depth":2},{"value":"Deciding: cancel or refund?","id":"deciding-cancel-or-refund","depth":2},{"value":"Next steps","id":"next-steps","depth":2}],"frontmatter":{"title":"Refund a settled transaction","shortTitle":"Refund a transaction","intro":"Return funds to a person after a transaction has settled. Supports full and partial refunds for card transactions.","type":"how-to","seo":{"title":""}},"lastModified":"2026-06-05T02:46:44.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/how-tos/manage-transactions/refund-settled-auth","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}