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

# invoice.refunded

> [!TIP]
>
> Make sure to read the [Webhooks Overview](https://docs.salesbricks.com/api-reference/webhooks/overview.md) for important
> information about signature verification.

## Purpose

The `invoice.refunded` webhook is triggered when money paid against an **Invoice** is returned to the customer.

A refund usually reopens the invoice, so the refunded amount is owed again. A refund that returns money because a downgrade reduced the invoice does not. Read the invoice's `status` and `remaining_amount` rather than assuming.

## Timing and delivery

* **One event per refund, when the refund is final.** An account-credit refund is final when it is made. A card refund is final when Stripe reports that it succeeded; a pending, failed or canceled card refund sends nothing.
* **Only refunds issued in Salesbricks.** A refund made directly in the Stripe dashboard doesn't send it.
* **Not sent** for refunds on invoices migrated from another system before your cutover date, or on invoices of deleted or lost orders.

## Payload format

Your configured endpoint will receive a `refund` object.

| Field | Description |
| - | - |
| `id` | The refund's ID, unique only together with `refund_method`. |
| `refund_method` | `ORIGINAL_PAYMENT_METHOD` (returned to the card) or `ACCOUNT_CREDIT` (given to the customer as account credit). |
| `amount` | The refunded amount, in the smallest unit of the invoice's currency, e.g. cents for USD. |
| `currency` | The invoice's currency, such as `USD`. |
| `refunded_at` | When Salesbricks recorded the refund as succeeded, or when the account-credit refund was made. |
| `reason` | The reason given for the refund, or `null`. |
| `stripe_refund_id` | The Stripe refund ID. `null` for account-credit refunds. |
| `customer_id` | The end customer the invoice is for. Not necessarily the company that pays. |
| `billed_company_id` | The company billed for the invoice. Equal to `customer_id` unless the invoice is [partner-billed](https://docs.salesbricks.com/partners/overview.md#how-partners-work), in which case it is the partner's company. |
| `payment` | The refunded payment, in the [Payment](https://docs.salesbricks.com/api-reference/webhooks/payment/payload.md) shape without the nested invoice. Its `status` is the payment's stored status, which a refund does not change. |
| `invoice` | The invoice after the refund, in the [Invoice](https://docs.salesbricks.com/api-reference/webhooks/invoice/payload.md) shape plus `refunded_amount`, the total refunded on the invoice so far. |

## Example

```json JSON theme={null}
{
  "event_type": "invoice.refunded",
  "refund": {
    "amount": 6000,
    "billed_company_id": "77fc9165-7eb4-4ded-9480-437864dcba64",
    "currency": "USD",
    "customer_id": "77fc9165-7eb4-4ded-9480-437864dcba64",
    "id": 4812,
    "invoice": {
      "billed_company_id": "77fc9165-7eb4-4ded-9480-437864dcba64",
      "customer_id": "77fc9165-7eb4-4ded-9480-437864dcba64",
      "due_at": "2025-11-24T01:10:38.405403Z",
      "due_days": 30,
      "ends_at": "2025-11-24T23:59:59.999999Z",
      "id": "16eda8d7-7418-4aa1-bd07-41e6430688bc",
      "invoice_number": "16eda8d7-0",
      "is_partial_agreement": false,
      "num_days": 0,
      "order": {
        "accounts_payable_emails": [],
        "agreement_number": 1,
        "approval_status": "approved",
        "billing_schedule": "annually",
        "buyer": {
          "address": {
            "city": "Address City",
            "country": "Address Country",
            "id": "cccccccc-cccc-cccc-cccc-cccccccccccc",
            "line_1": "123 Address Line 1",
            "line_2": "Address Line 2 ",
            "region": "Address Region",
            "zip": "00000"
          },
          "external_id": null,
          "id": "77fc9165-7eb4-4ded-9480-437864dcba64",
          "is_partner": false,
          "name": "Example Co."
        },
        "chain_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
        "closed_at": "2025-10-24T01:15:38.405403Z",
        "created_at": "2025-10-24T01:10:38.405403Z",
        "crm_account_id": null,
        "crm_opportunity_id": null,
        "current_order_skus": [
          {
            "is_unlimited": false,
            "quantity": 1,
            "sku": {
              "code": "OrderBrickCode",
              "id": "ffffffff-ffff-ffff-ffff-ffffffffffff",
              "name": "OrderBrick"
            }
          }
        ],
        "ends_at": "2026-10-24T23:59:59.999+00:00",
        "grand_total": 100,
        "id": "c9b23aec-b7b7-4d2e-865d-71e4743ba828",
        "metadata": {
          "custom_field": "some value"
        },
        "order_type": "standard",
        "owner": null,
        "primary_user": {
          "company": {
            "address": {
              "city": "Address City",
              "country": "Address Country",
              "id": "cccccccc-cccc-cccc-cccc-cccccccccccc",
              "line_1": "123 Address Line 1",
              "line_2": "Address Line 2 ",
              "region": "Address Region",
              "zip": "00000"
            },
            "external_id": null,
            "id": "77fc9165-7eb4-4ded-9480-437864dcba64",
            "is_partner": false,
            "name": "Example Co."
          },
          "email": "buyername@buyer.com",
          "first_name": "BuyerFirstName",
          "id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
          "last_name": "BuyerLastName"
        },
        "stage": "closed",
        "starts_at": "2025-10-25T00:00:00.000+00:00",
        "subscription_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
        "terminated_at": null,
        "updated_at": "2026-10-24T01:10:37.405620Z"
      },
      "paid_amount": 10238,
      "paid_at": "2026-10-21T01:10:38.405401Z",
      "payment_url": "https://app.salesbricks.com/invoice/16eda8d7-7418-4aa1-bd07-41e6430688bc/pay",
      "payments": [
        {
          "error": null,
          "id": "4a842a5a-90b3-4f2e-80b0-511ab495226e",
          "invoice": "16eda8d7-7418-4aa1-bd07-41e6430688bc",
          "paid_amount": 16238,
          "paid_at": "2026-10-21T01:10:38.405401Z",
          "payment_method": "CREDIT_CARD",
          "status": "SUCCESS"
        }
      ],
      "refunded_amount": 6000,
      "remaining_amount": 6000,
      "starts_at": "2025-10-25T00:00:00Z",
      "status": "PARTIALLY_PAID"
    },
    "payment": {
      "error": null,
      "id": "4a842a5a-90b3-4f2e-80b0-511ab495226e",
      "invoice": "16eda8d7-7418-4aa1-bd07-41e6430688bc",
      "paid_amount": 16238,
      "paid_at": "2026-10-21T01:10:38.405401Z",
      "payment_method": "CREDIT_CARD",
      "status": "SUCCESS"
    },
    "reason": "Seats reduced mid-period",
    "refund_method": "ORIGINAL_PAYMENT_METHOD",
    "refunded_at": "2026-10-24T01:10:38.405401Z",
    "stripe_refund_id": "re_000000000000000000000000"
  },
  "webhook_run_id": "00000000-0000-0000-0000-000000000000"
}
```


## Related topics

- [Payment Webhook Payload](https://docs.salesbricks.com/api-reference/webhooks/payment/payload.md)
- [Overview](https://docs.salesbricks.com/integrations/quickbooks/overview.md)
- [Setup & Troubleshooting](https://docs.salesbricks.com/integrations/xero/setup.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.