---
title: "Create a refund"
method: POST
path: "/v1/refunds"
tags: ["Refunds"]
---

# Create a refund

`POST /v1/refunds`

Create a refund for a completed payment. Only one refund can be created per charge.

## Request body

- CreateRefundRequest
  - `charge_id` string, required — The ID of the payment to refund.
  - `reference` string, required — Your unique identifier for this refund. Must be unique per organization and environment.
  - `refund_address` string, nullable — Destination wallet address for crypto refunds. Required when the charge currency is a cryptocurrency.
  - `amount` string, nullable — Optional partial refund amount in the charge settlement currency. Omit to refund the full remaining refundable balance.
  - `fee_bearer` 'org' | 'customer', nullable — Who bears the refund processing fee. `org` (default) charges the fee to your balance; `customer` deducts it from the amount returned to the customer.
  - `reason` string, nullable — Human-readable reason for the refund.
  - `idempotency_key` string, nullable — A key you supply to make this request idempotent. If you send the same idempotency_key twice for the same charge, the second request returns the existing refund.
  - `simulated_outcome` 'success' | 'failed', nullable — Test mode only. Force a specific refund outcome. Omit to use the default sandbox outcome.

## Response `201`

Success - Refund created

- RefundResponse
  - `refund_id` string — Unique identifier for this refund.
  - `charge_id` string — The payment this refund is associated with.
  - `reference` string — The reference you supplied on creation.
  - `status` 'processing' | 'success' | 'failed' — Current refund status. `processing` = awaiting provider (1-5 business days); `success` = funds returned to customer; `failed` = refund rejected.
  - `requested_amount` string — The refund amount you requested, in the charge's settlement currency.
  - `refunded_amount` string, nullable — The amount actually returned to the customer. Null until the refund completes or partially settles.
  - `refund_fee_amount` string — Fee charged for this refund, in the charge's settlement currency. "0" if no fee applies.
  - `fee_bearer` 'org' | 'customer' — Who bears the refund processing fee. `org` means the merchant absorbs the fee; `customer` means it is deducted from the refunded amount.
  - `reason` string, nullable — The reason you provided, or null if none was given.
  - `created_at` string, date-time — ISO 8601 timestamp when the refund was created.
  - `updated_at` string, date-time — ISO 8601 timestamp of the last status update.
  - `completed_at` string, date-time, nullable — ISO 8601 timestamp when the refund reached a terminal status (SUCCESS or FAILED). Null while still processing.

## Other responses

- `400` — Bad Request - Validation errors or invalid request format. Check the `details` object for field-specific validation errors. Common causes: missing required fields, invalid data types, values outside allowed ranges, or invalid formats.
- `401` — Unauthorized - Invalid, missing, or expired API key. Verify your API key is correctly formatted and included in the Authorization header as `Bearer sk_sandbox_...` or `Bearer sk_live_...`. Check that your key hasn't been revoked.
- `403` — Forbidden - API key does not have permission for the requested resource. Verify you're using the correct organization's API key and that you're not trying to access another organization's data.
- `404` — Not Found - The requested resource does not exist. Verify the resource ID is correct and that it belongs to your organization.
- `409` — Conflict - Duplicate request detected (idempotency). This occurs when the same request is made multiple times with the same idempotency key. The original request's response is returned.
- `429` — Too Many Requests - Rate limit exceeded. Standard tier allows 100 requests per minute per API key. Wait a few seconds before retrying. Check X-RateLimit-Reset header for when the window resets.
- `500` — Internal Server Error - An unexpected error occurred while processing the request. Retry with exponential backoff. If the issue persists, contact support with your request context.

---

[API](https://skmtc.net/bachs/apis/bachs-api.md) · [All operations](https://skmtc.net/bachs/apis/bachs-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bachs/bachs-api/versions/f29efa8a22df/schema)
