{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["img","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":"about-cancels-and-refunds","__idx":0},"children":["About cancels and refunds"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"cancels-vs-refunds","__idx":1},"children":["Cancels vs. refunds"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Both cancels and refunds reverse a transaction, but they apply at different stages of the transaction lifecycle."]},{"$$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":""},"children":[]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Cancel (void)"},"children":["Cancel (void)"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Refund"},"children":["Refund"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["When"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Before batch settlement"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["After batch settlement"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Transaction state requirement"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["authorized"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["captured"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["settled"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Fund movement"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["No funds transferred — the hold is released"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Funds returned from merchant to person"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Speed"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Immediate release of held funds"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["5–10 business days for person to see credit"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["API type value"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cancel"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refund"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Endpoint"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /v1/transactions/{id}/cancel"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /v1/transactions/{id}/cancel"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"https://files.modern-mermaid.live/images/1776270283215-mermaid-diagram-1776270283356.png","alt":"Cancels vs. refunds","framed":false,"withLightbox":false,"className":"cancels-vs-refunds","width":"auto","height":"auto"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"when-to-cancel","__idx":2},"children":["When to cancel"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Cancel a transaction when you need to reverse it ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["before"]}," the settlement batch closes. Canceling releases the hold on the person's funds immediately without any funds transferring between accounts."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"common-cancel-scenarios","__idx":3},"children":["Common cancel scenarios"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Person changes their mind before the order ships"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Duplicate transaction detected"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Authorization was placed but the item is out of stock"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Incorrect amount authorized"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"cancel-request","__idx":4},"children":["Cancel request"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Send ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /v1/transactions/{id}/cancel"]}," with the cancel type and amount."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"type\": \"cancel\",\n  \"amount\": 15000\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Replace ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{id}"]}," with the transaction ID from the original authorization or sale."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"cancel-response","__idx":5},"children":["Cancel response"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y\",\n  \"object\": \"transaction\",\n  \"type\": \"cancel\",\n  \"transaction_state\": \"canceled\",\n  \"response_status\": \"Approved\",\n  \"response_code\": \"00\",\n  \"response_message\": \"The API request is approved.\",\n  \"correlation_id\": \"b2c3d4e5-f6a7-8901-bcde-f12345678901\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transaction_state"]}," changes to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["canceled"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"when-to-refund","__idx":6},"children":["When to refund"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Refund a transaction when the batch has already settled and funds have been transferred to the merchant's account. A refund creates a new credit transaction that returns funds to the person."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"common-refund-scenarios","__idx":7},"children":["Common refund scenarios"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Person returns a product after delivery"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Service was not rendered as described"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Billing dispute resolution"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"full-refund","__idx":8},"children":["Full refund"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To refund the full transaction amount, specify the original amount."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"type\": \"refund\",\n  \"amount\": 15000\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"partial-refund","__idx":9},"children":["Partial refund"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To refund part of the transaction, specify a lesser amount."]},{"$$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 US dollars (USD) of the original 150.00 US dollars transaction."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"refund-response","__idx":10},"children":["Refund response"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y\",\n  \"object\": \"transaction\",\n  \"type\": \"refund\",\n  \"transaction_state\": \"authorized\",\n  \"response_status\": \"Approved\",\n  \"response_code\": \"00\",\n  \"response_message\": \"The API request is approved.\",\n  \"correlation_id\": \"c3d4e5f6-a7b8-9012-cdef-123456789012\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Refund settlement"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A refund transaction goes through the same settlement process as a payment. The refund amount is deducted from the merchant's next settlement batch and credited back to the person's account."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ach-transaction-cancels","__idx":11},"children":["ACH transaction cancels"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ACH (bank account) transactions can also be canceled before settlement using the same endpoint."]},{"$$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 type"},"children":["Transaction type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Cancel type"},"children":["Cancel type"]}]}]},{"$$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":["payment"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cancel"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payout"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cancel"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ACH transactions that have already settled cannot be refunded through the API in the same way as card transactions. Instead, ACH reversals are subject to the ACH return process, which operates on the ACH network timeline (up to 60 days). For more information, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/concepts/transactions/ach-accounts"},"children":["About ACH/bank account payments"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"timing-considerations","__idx":12},"children":["Timing considerations"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The window for canceling vs. refunding depends on when the settlement batch closes."]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"https://files.modern-mermaid.live/images/1776270321741-mermaid-diagram-1776270321793.png","alt":"Timing considerations","framed":false,"withLightbox":true,"className":"timing-considerations","width":"auto","height":"auto"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Batch closure timing"]},": Batches typically close at the end of each business day, but merchants can also close batches manually through ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PUT /v1/batches/status"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Cancel deadline"]},": You must cancel before the batch containing the transaction closes."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Refund deadline"]},": Refunds can be issued after settlement. Check with your processor for any time limits on issuing refunds."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"deciding-between-cancel-and-refund","__idx":13},"children":["Deciding between cancel and refund"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this decision tree when handling a reversal request."]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Retrieve the transaction with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /v1/transactions/{id}"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Check the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transaction_state"]}," field."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If the state is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["authorized"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["captured"]}," → cancel."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If the state is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["settled"]}," → refund."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"further-reading","__idx":14},"children":["Further reading"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/concepts/transactions/transaction-lifecycle"},"children":["About the transaction lifecycle"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/concepts/transactions/sale-vs-auth"},"children":["About sale vs. authorization"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/concepts/transactions/batch-settlement"},"children":["About batch settlement"]}]}]}]},"headings":[{"value":"About cancels and refunds","id":"about-cancels-and-refunds","depth":1},{"value":"Cancels vs. refunds","id":"cancels-vs-refunds","depth":2},{"value":"When to cancel","id":"when-to-cancel","depth":2},{"value":"Common cancel scenarios","id":"common-cancel-scenarios","depth":3},{"value":"Cancel request","id":"cancel-request","depth":3},{"value":"Cancel response","id":"cancel-response","depth":3},{"value":"When to refund","id":"when-to-refund","depth":2},{"value":"Common refund scenarios","id":"common-refund-scenarios","depth":3},{"value":"Full refund","id":"full-refund","depth":3},{"value":"Partial refund","id":"partial-refund","depth":3},{"value":"Refund response","id":"refund-response","depth":3},{"value":"ACH transaction cancels","id":"ach-transaction-cancels","depth":2},{"value":"Timing considerations","id":"timing-considerations","depth":2},{"value":"Deciding between cancel and refund","id":"deciding-between-cancel-and-refund","depth":2},{"value":"Further reading","id":"further-reading","depth":2}],"frontmatter":{"title":"About cancels and refunds","shortTitle":"Cancels and refunds","intro":"Cancel (void) a transaction before settlement to release held funds immediately, or refund after settlement to return funds to the person. Both use the same endpoint but serve different purposes.","type":"overview","seo":{"title":""}},"lastModified":"2026-06-05T02:46:44.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/concepts/transactions/cancels-and-refunds","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}