{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "external_id": "31415926535",
    "refunded_amount": 123,
    "status": "PAID",
    "completed_at": "2023-11-07T05:31:56Z",
    "allocations": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "amount": 123,
        "account_identifier": {
          "type": "AccountId",
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
        },
        "invoice_external_id": "invoice-123",
        "invoice_line_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "invoice_line_item_external_id": "line-item-123",
        "invoice_payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "invoice_payment_external_id": "payment-123",
        "customer": {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "external_id": "31415926535",
          "individual_name": "John Doe",
          "company_name": "Acme Corp",
          "email": "john@example.com",
          "mobile_phone": "555-123-4567",
          "office_phone": "555-987-6543",
          "address_string": "123 Main St, Anytown, CA 90210",
          "notes": "VIP customer",
          "status": "ACTIVE",
          "transaction_tags": [
            {
              "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "key": "CustomerType",
              "value": "Premium",
              "created_at": "2023-11-07T05:31:56Z",
              "updated_at": "2023-11-07T05:31:56Z",
              "deleted_at": null
            }
          ]
        },
        "transaction_tags": [
          {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "key": "RefundReason",
            "value": "CustomerRequest",
            "created_at": "2023-11-07T05:31:56Z",
            "updated_at": "2023-11-07T05:31:56Z",
            "deleted_at": null
          }
        ]
      }
    ],
    "payments": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "external_id": "31415926535",
        "refunded_amount": 123,
        "fee": 15,
        "completed_at": "2023-11-07T05:31:56Z",
        "method": "CREDIT_CARD",
        "processor": "STRIPE",
        "refunded_payment_fees": [
          {
            "account": {
              "type": "AccountId",
              "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
            },
            "description": "Processing fee refund",
            "fee_amount": 10
          }
        ],
        "transaction_tags": [
          {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "key": "ProcessorReference",
            "value": "ref_12345",
            "created_at": "2023-11-07T05:31:56Z",
            "updated_at": "2023-11-07T05:31:56Z",
            "deleted_at": null
          }
        ]
      }
    ],
    "transaction_tags": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "key": "Department",
        "value": "CustomerService",
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "deleted_at": null
      }
    ]
  }
}

A Refund represents a transaction that returns value from a business to a customer. Each refund has one or more Refund Allocations (targets) and zero or more Refund Payments.

Attributes

id
string
required

Unique identifier for the refund.

external_id
string

Unique ID of the refund in your system for linking purposes. Idempotency key.

refunded_amount
integer
required

Amount refunded to the customer in cents.

status
string
required

Status of the refund.

completed_at
ISO8601 timestamp
required

Time when the refund was completed.

allocations
array of RefundAllocation objects

Allocations associated with this refund. See Refund Allocation Object for details.

payments
array of RefundPayment objects

Payments associated with this refund. See Refund Payment Object for details.

transaction_tags
Array of Tags

Tags associated with the refund.

Refund Allocation Object

A Refund Allocation represents the one of the targets of a refund. It can reference a specific invoice, invoice line item, invoice payment, or customer. For example, a refund can apply to two separate invoices if the invoices have the same customer. The total of the amounts of the refund allocations must add up to the refund amount.

id
string
required

Unique identifier for the refund allocation.

invoice_id
string

ID of the invoice this allocation is associated with.

amount
integer
required

Amount of the allocation in cents.

account_identifier
AccountIdentifier object

Identifier of the ledger account for the refund allocation to apply to.

invoice_external_id
string

External ID of the invoice this allocation is associated with.

invoice_line_item_id
string

ID of the invoice line item this allocation is associated with. If specified, must not refer to a different invoice than invoice_id or invoice_external_id.

invoice_line_item_external_id
string

The external ID of the invoice line item to refund. If specified alongside invoice_line_item_id, they must refer to the same invoice line item.

invoice_payment_id
string

ID of the invoice payment this allocation is associated with.

invoice_payment_external_id
string

External ID of the invoice payment this allocation is associated with.

customer
Customer object

The customer associated with this refund allocation.

transaction_tags
Array of Tags

Tags associated with the refund allocation.

Refund Payment Object

A Refund Payment represents a money movement by which the refund was disbursed to the customer. A refund with zero payments represents a refund that is owed to a customer but has not yet been sent.

A refund can have many payments so long as the total of their refunded_amounts does not exceed the total amount of the refund.

Refund payments are matchable to bank transactions and are therefore the means by which refunds are reconciled with bank accounts.

id
string
required

Unique identifier for the payment.

external_id
string

Unique ID of the payment in your system for linking purposes. Idempotency key.

refunded_amount
integer
required

Amount refunded to the customer in cents.

fee
integer

Fee paid by the business to make the refund payment (typically a payment processing fee)

completed_at
ISO8601 timestamp
required

Time when the payment was completed.

method
string
required

Method of the payment (e.g., CREDIT_CARD, ACH, etc.).

processor
string

Processor used for the payment (e.g., STRIPE, SHOPIFY, etc.).

refunded_payment_fees
array of RefundedPaymentFee objects

Refunded payment fees associated with the refund payment. See Refunded Payment Fee Object for details.

transaction_tags
Array of Tags

Tags associated with the refund payment.

Refunded Payment Fee Object

A Refunded Payment Fee represents a fee that was refunded as part of a refund payment. This differs from the ‘fee’ field on the refund payment, since that is paid by the business (typically to a payment processor), whereas this is refunded from the payment processor back to the customer.

account
AccountIdentifier object
required

Identifier of the ledger account for the refunded payment fee.

description
string

Description of the fee that the refunded payment fee refunds.

fee_amount
integer
required

Amount of the fee refund in cents.

{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "external_id": "31415926535",
    "refunded_amount": 123,
    "status": "PAID",
    "completed_at": "2023-11-07T05:31:56Z",
    "allocations": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "amount": 123,
        "account_identifier": {
          "type": "AccountId",
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
        },
        "invoice_external_id": "invoice-123",
        "invoice_line_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "invoice_line_item_external_id": "line-item-123",
        "invoice_payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "invoice_payment_external_id": "payment-123",
        "customer": {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "external_id": "31415926535",
          "individual_name": "John Doe",
          "company_name": "Acme Corp",
          "email": "john@example.com",
          "mobile_phone": "555-123-4567",
          "office_phone": "555-987-6543",
          "address_string": "123 Main St, Anytown, CA 90210",
          "notes": "VIP customer",
          "status": "ACTIVE",
          "transaction_tags": [
            {
              "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "key": "CustomerType",
              "value": "Premium",
              "created_at": "2023-11-07T05:31:56Z",
              "updated_at": "2023-11-07T05:31:56Z",
              "deleted_at": null
            }
          ]
        },
        "transaction_tags": [
          {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "key": "RefundReason",
            "value": "CustomerRequest",
            "created_at": "2023-11-07T05:31:56Z",
            "updated_at": "2023-11-07T05:31:56Z",
            "deleted_at": null
          }
        ]
      }
    ],
    "payments": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "external_id": "31415926535",
        "refunded_amount": 123,
        "fee": 15,
        "completed_at": "2023-11-07T05:31:56Z",
        "method": "CREDIT_CARD",
        "processor": "STRIPE",
        "refunded_payment_fees": [
          {
            "account": {
              "type": "AccountId",
              "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
            },
            "description": "Processing fee refund",
            "fee_amount": 10
          }
        ],
        "transaction_tags": [
          {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "key": "ProcessorReference",
            "value": "ref_12345",
            "created_at": "2023-11-07T05:31:56Z",
            "updated_at": "2023-11-07T05:31:56Z",
            "deleted_at": null
          }
        ]
      }
    ],
    "transaction_tags": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "key": "Department",
        "value": "CustomerService",
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "deleted_at": null
      }
    ]
  }
}