---
title: "Refund a Checkout"
method: POST
path: "/checkouts/{id}/refunds"
tags: ["Checkouts"]
---

# Refund a Checkout

`POST /checkouts/{id}/refunds`

## Request

- Base URL: `https://api.justifi.ai/v1`
- URL: `https://api.justifi.ai/v1/checkouts/{id}/refunds`
- Auth: none declared. Required headers: `Idempotency-Key`, `Authorization`
- TypeScript: <https://skmtc.dev/justifi/apis/justifi-api-documentation/docs/checkouts/:id/refunds/post.ts> (a function with typed inputs; its response is checked against the schema)

Use to refund a checkout. You may refund the full amount or just a portion. When refunding a portion, multiple refunds are supported up until the full payment amount has been refunded.

## Headers

- `Idempotency-Key` string, uuid, required
- `Authorization` string, required

## Request body

- object
  - `amount` integer: Amount to be refunded. If missing, the total amount will be used.
  - `fees` object[]: Fees to return to the merchant as part of this refund. See [Enhanced Fee Management](#section/Enhanced-Fee-Management) for full documentation. Each fee object specifies: - `type`: The fee type to return (`processing_fee` or `platform_fee`) - `amount`: Amount to return in cents If omitted, no fees are returned. Only supported for card/ach and card present payments completed with the `fees` array. > **CAD Payments:** This parameter is not available for CAD payments. See [Canadian Payments](https://docs.justifi.tech/payments/canadianPayments) for details.
    - `type` 'processing_fee' | 'platform_fee', required: The type of fee to return
    - `amount` integer, required: Amount to return in cents

## Response `200`

Refund was created successfully

- object
  - `id` string, uuid: the object id, also found in the data object
  - `type` string: the object type, or array of objects
  - `data` object: the attributes for the object
    - `id` string: unique checkout refund id
    - `checkout_id` string, uuid: id of the checkout for this refund
    - `status` 'succeeded' | 'failed': the status of the refund, only succeeded or failed
    - `refund_response` string: when refund fails, related error description. when refund succeeded additional refund info (or null).
    - `refund_amount` integer: the amount requested to refund (or full checkout amount)
    - `returned_fees` object[]: Fees returned to the merchant as part of this refund. See [Enhanced Fee Management](https://docs.justifi.tech/api-spec#section/Enhanced-Fee-Management) for full documentation.
      - `type` 'processing_fee' | 'platform_fee': The type of fee that was returned
      - `amount` integer: Amount returned in cents
    - `created_at` string, date-time
    - `updated_at` string, date-time
  - `page_info` unknown

---

[API](https://skmtc.dev/justifi/apis/justifi-api-documentation.md) - [All operations](https://skmtc.dev/justifi/apis/justifi-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/justifi/apis/justifi-api-documentation/revisions/dd9f3fed7e46?raw)
