{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["tabs","tab","img"]},"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":"close-a-batch-manually","__idx":0},"children":["Close a batch manually"]},{"$$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 with admin or manager permissions — see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/how-tos/setup/obtain-credentials"},"children":["Obtain API credentials"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["At least one authorized or captured transaction in the current open batch"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"when-to-close-manually","__idx":2},"children":["When to close manually"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Batches close automatically at the end of each business day. Close manually when you need to:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Settle transactions sooner"]}," — for example, at the end of a shift or event."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Control settlement timing"]}," — align batch closure with your accounting schedule."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resolve issues"]}," — close a batch after reviewing and correcting transactions."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-1-review-the-current-batch","__idx":3},"children":["Step 1: Review the current batch"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["List batches to see the current open batch and its transaction summary."]},{"$$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 GET \\\n  \"https://api.dev.paradisegateway.net/v1/batches?take=5&sort_order=desc\" \\\n  -H \"APIKEY: YOUR-API-KEY\"\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\nresp = requests.get(\n    \"https://api.dev.paradisegateway.net/v1/batches\",\n    headers={\"APIKEY\": \"YOUR-API-KEY\"},\n    params={\"take\": \"5\", \"sort_order\": \"desc\"},\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 resp = await fetch(\n  \"https://api.dev.paradisegateway.net/v1/batches?take=5&sort_order=desc\",\n  { headers: { \"APIKEY\": \"YOUR-API-KEY\" } }\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":"using var client = new HttpClient();\nclient.DefaultRequestHeaders.Add(\"APIKEY\", \"YOUR-API-KEY\");\nvar resp = await client.GetStringAsync(\n    \"https://api.dev.paradisegateway.net/v1/batches?take=5&sort_order=desc\");\nConsole.WriteLine(resp);\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":"HttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\n        \"https://api.dev.paradisegateway.net/v1/batches?take=5&sort_order=desc\"))\n    .header(\"APIKEY\", \"YOUR-API-KEY\")\n    .GET().build();\nHttpResponse<String> resp = HttpClient.newHttpClient().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":"req, _ := http.NewRequest(\"GET\",\n    \"https://api.dev.paradisegateway.net/v1/batches?take=5&sort_order=desc\", nil)\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":"$ch = curl_init(\n    \"https://api.dev.paradisegateway.net/v1/batches?take=5&sort_order=desc\");\ncurl_setopt_array($ch, [\n    CURLOPT_RETURNTRANSFER => true,\n    CURLOPT_HTTPHEADER => [\"APIKEY: YOUR-API-KEY\"],\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\"\nuri = URI(\"https://api.dev.paradisegateway.net/v1/batches?take=5&sort_order=desc\")\nreq = Net::HTTP::Get.new(uri, { \"APIKEY\" => \"YOUR-API-KEY\" })\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":2,"id":"step-2-close-the-batch","__idx":4},"children":["Step 2: Close the batch"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Send ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PUT /v1/batches/status"]}," to close the current open batch."]},{"$$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 PUT \\\n  https://api.dev.paradisegateway.net/v1/batches/status \\\n  -H \"Content-Type: application/json\" \\\n  -H \"APIKEY: YOUR-API-KEY\" \\\n  -d '{\n    \"status\": \"closed\"\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\nresp = requests.put(\n    \"https://api.dev.paradisegateway.net/v1/batches/status\",\n    headers={\"Content-Type\": \"application/json\", \"APIKEY\": \"YOUR-API-KEY\"},\n    json={\"status\": \"closed\"},\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 resp = await fetch(\n  \"https://api.dev.paradisegateway.net/v1/batches/status\",\n  {\n    method: \"PUT\",\n    headers: {\n      \"Content-Type\": \"application/json\",\n      \"APIKEY\": \"YOUR-API-KEY\",\n    },\n    body: JSON.stringify({ status: \"closed\" }),\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":"using var client = new HttpClient();\nclient.DefaultRequestHeaders.Add(\"APIKEY\", \"YOUR-API-KEY\");\nvar payload = new { status = \"closed\" };\nvar resp = await client.PutAsJsonAsync(\n    \"https://api.dev.paradisegateway.net/v1/batches/status\", 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":"HttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.dev.paradisegateway.net/v1/batches/status\"))\n    .header(\"Content-Type\", \"application/json\")\n    .header(\"APIKEY\", \"YOUR-API-KEY\")\n    .PUT(HttpRequest.BodyPublishers.ofString(\"{\\\"status\\\": \\\"closed\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient().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":"payload := strings.NewReader(`{\"status\": \"closed\"}`)\nreq, _ := http.NewRequest(\"PUT\",\n    \"https://api.dev.paradisegateway.net/v1/batches/status\", 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":"$ch = curl_init(\"https://api.dev.paradisegateway.net/v1/batches/status\");\ncurl_setopt_array($ch, [\n    CURLOPT_RETURNTRANSFER => true,\n    CURLOPT_CUSTOMREQUEST => \"PUT\",\n    CURLOPT_HTTPHEADER => [\"Content-Type: application/json\", \"APIKEY: YOUR-API-KEY\"],\n    CURLOPT_POSTFIELDS => json_encode([\"status\" => \"closed\"]),\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\"\nuri = URI(\"https://api.dev.paradisegateway.net/v1/batches/status\")\nreq = Net::HTTP::Put.new(uri, {\n  \"Content-Type\" => \"application/json\", \"APIKEY\" => \"YOUR-API-KEY\",\n})\nreq.body = { status: \"closed\" }.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":2,"id":"step-3-verify-the-closure","__idx":5},"children":["Step 3: Verify the closure"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After closing, list batches again to confirm the batch status changed."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"curl -X GET \\\n  \"https://api.dev.paradisegateway.net/v1/batches/status?client_id=YOUR-CLIENT-ID\" \\\n  -H \"APIKEY: YOUR-API-KEY\"\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"what-happens-after-batch-closure","__idx":6},"children":["What happens after batch closure"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The processor receives all transactions in the closed batch."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Card transactions are submitted to the card network for clearing."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ACH transactions are submitted to the ACH network."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Funds are deposited to the merchant's account within 1–3 business days."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A new open batch is created automatically for subsequent transactions."]}]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"https://files.modern-mermaid.live/images/1776276000418-mermaid-diagram-1776276000189.png","alt":"What happens after batch closure","framed":false,"withLightbox":true,"className":"what-happens-after-batch-closure","width":"auto","height":"auto"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"batch-query-parameters","__idx":7},"children":["Batch query parameters"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /v1/batches"]}," endpoint supports the same pagination and sorting as transactions."]},{"$$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":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$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":["skip"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Records to skip"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["take"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Records to return"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sort_column"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Column to sort by"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sort_order"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["asc"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["desc"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["search_text"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Free-text search"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["term"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Filter term"]}]}]}]}]},{"$$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/list-transactions"},"children":["List transactions with filters"]}," — view transactions within a batch"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/concepts/transactions/batch-settlement"},"children":["About batch settlement"]}," — detailed settlement process"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/how-tos/manage-transactions/retrieve-transaction-details"},"children":["Retrieve transaction details"]}," — check individual transaction status"]}]}]},"headings":[{"value":"Close a batch manually","id":"close-a-batch-manually","depth":1},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"When to close manually","id":"when-to-close-manually","depth":2},{"value":"Step 1: Review the current batch","id":"step-1-review-the-current-batch","depth":2},{"value":"Step 2: Close the batch","id":"step-2-close-the-batch","depth":2},{"value":"Step 3: Verify the closure","id":"step-3-verify-the-closure","depth":2},{"value":"What happens after batch closure","id":"what-happens-after-batch-closure","depth":2},{"value":"Batch query parameters","id":"batch-query-parameters","depth":2},{"value":"Next steps","id":"next-steps","depth":2}],"frontmatter":{"title":"Close a batch manually","shortTitle":"Close a batch","intro":"Trigger settlement by closing the current open batch. All captured transactions in the batch are submitted to the processor for clearing and fund transfer.","type":"how-to","seo":{"title":""}},"lastModified":"2026-06-05T02:46:44.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/how-tos/manage-transactions/close-batch-manually","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}