> ## Documentation Index
> Fetch the complete documentation index at: https://dev.nickel.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Refund or Void a Payment

> Give money back fully or partially, and know when a refund is fee-free

Sometimes you need to send money back — a duplicate invoice, a returned order, an overcharge. One endpoint handles it, but *when* you call it changes what happens: refund quickly enough and Nickel cancels the original charge outright (a **void**, with no processing fee); refund after the charge has settled and the money is sent back as a true refund. This guide walks through both.

<Note>
  In the API, an invoice is a **payment link** — the endpoints and field names below say `paymentLink`. Same thing; this guide says "invoice" because that's what your customer sees.
</Note>

<Info>
  **Before you start**: You need a payment in the `SUCCEEDED` state — only successful payments can be refunded. Follow [Send an Invoice and Get Paid](/guides/send-an-invoice) to create one in the sandbox.
</Info>

<Steps>
  <Step title="Refund the payment">
    Call [`POST /payment/{paymentId}/refund`](/api-reference/payment/refund-a-payment) with the amount to give back. For a full refund, pass the payment's full `amountInCents`; for a partial refund, pass less. The `reason` is optional and shows up in your records:

    ```bash theme={null}
    curl -X POST https://rest.staging.nickel.com/payment/cmr9zvqgk000csf025pyi3qfi/refund \
      -H "Authorization: Bearer $NICKEL_SANDBOX_KEY" \
      -H "Content-Type: application/json" \
      -d '{"amountCents": 12055, "reason": "Duplicate invoice"}'
    ```

    The response is the updated payment:

    ```json theme={null}
    {
      "id": "cmr9zvqgk000csf025pyi3qfi",
      "status": "REFUNDED",
      "amountInCents": 12055,
      "chargedAmountInCents": 12230,
      "fees": [{ "type": "CREDIT_CARD_FEE", "amountInCents": 350 }],
      "refunds": [
        {
          "id": "cmr9zwf4s000rsf02qxi7es8s",
          "amountCents": 12055,
          "refundDate": "2026-07-07T01:53:47.933Z",
          "voided": false
        }
      ],
      ...
    }
    ```

    <Warning>
      `amountCents` is in **cents**, and the refund amount can't exceed what's refundable on the payment. Any refund — even a partial one — moves the payment's `status` to `REFUNDED`.
    </Warning>
  </Step>

  <Step title="Check whether it voided">
    Look at `refunds[].voided` in the response:

    * **`"voided": true`** — the original charge was cancelled before it settled. The money movement never completes, and **no processing fee applies**. This is possible within minutes to a few hours of the payment, while the card charge hasn't been submitted for settlement (or the ACH debit hasn't been sent to the network).
    * **`"voided": false`** — the charge already settled, so this is a true refund: the money travels back to your customer. For card payments the original processing fee still applies, because the card networks charged it when the payment was made.

    You can't choose which happens — Nickel voids automatically whenever it still can, because that's the better outcome for you.
  </Step>

  <Step title="Watch for the webhook">
    Your webhook subscription receives `payment.voided` when the charge was cancelled, or `payment.refunded` for a true refund. Either way, fetch the payment with [`GET /payment/{paymentId}`](/api-reference/payment/returns-a-payment-by-id) for the current state — see [Webhook Events](/concepts/webhooks).
  </Step>

  <Step title="Know what happens to the invoice">
    A fully refunded payment reopens its invoice: the invoice's `status` returns to `ACTIVE` and the amount becomes payable again, so your customer can re-pay the corrected version. If you don't want that, delete the invoice with [`DELETE /paymentLink/{paymentLinkId}`](/api-reference/payment-link/deletes-a-payment-link) or leave it to expire.
  </Step>
</Steps>

## Don't confuse refunds with ACH returns

A refund is something **you** initiate. An ACH **return** is initiated by your customer's bank — insufficient funds, a closed account, or a disputed debit — and moves the payment to `FAILED`, not `REFUNDED`. Returns can arrive up to 60 days after the payment. [How Payments Work](/concepts/payments) covers what happens to the money in each case.

## Where to go next

<Columns cols={2}>
  <Card title="Track your payouts" href="/guides/payouts" icon="building-columns">
    What refunds and returns mean for the money that reaches your bank.
  </Card>

  <Card title="Webhook events" href="/concepts/webhooks" icon="bolt">
    Subscribe to payment.refunded and payment.voided.
  </Card>
</Columns>
