---
title: "Process Refund"
method: POST
path: "/core/v1/refund"
tags: ["Refunds"]
---

# Process Refund

`POST /core/v1/refund`

Deletes eligible domains and security products during the Add Grace Period (AGP) and automatically issues refunds for the associated order items.

### Eligibility Requirements

- **Product Types**: Only `registration` and `whois_privacy` product types are eligible for refunds.
- **AGP Timing**: Items must be within the Add Grace Period (typically 5 days from registration, varies by TLD).
- **Order Ownership**: All `orderItemIds` must belong to the specified `orderId`.

### Refund Processing

Refunds are processed in the following order:
1. Domain deletion is attempted for each eligible order item
2. Upon successful deletion, the refund is issued
3. Refunds are sent to the original payment method on file
4. If the original payment method is unavailable, the refund is credited to the account balance

### Idempotency

This endpoint supports idempotent requests via the `X-Idempotency-Key` header. If you retry a request with the same idempotency key, you will receive the same response as the original request. This is useful for safely retrying requests without risk of processing duplicate refunds.

## Headers

- `X-Idempotency-Key` string

## Request body

- RefundRequest — RefundRequest contains the order and order items to be refunded. Only domain registrations and security products purchased within the Add Grace Period (AGP) are eligible for refunds.
  - `orderId` integer, required — The unique identifier of the order containing the item(s) to be refunded. Use the List Orders endpoint to retrieve order IDs.
  - `orderItemIds` integer[], required — An array of order item IDs to be refunded. All items must belong to the specified order. Use the List Orders endpoint to retrieve order item IDs.

## Response `200`

Refund processed successfully. The response includes the detailed results for each refunded item.

- RefundResponse — RefundResponse contains the results of a refund operation, including the individual order item results. Refunds are issued to the original payment method on file. If the original payment method is unavailable, the refund will be credited to the account balance.
  - `results` RefundItemResult[], required — An array of refund results for each order item that was processed.
    - `orderId` integer, required — The unique identifier of the Order that was processed.
    - `orderItemId` integer, required — The unique identifier of the Order Item that was processed.
    - `orderItemStatus` 'refunded' | 'failed' | 'initialized' | 'canceled', required — The status of the refund operation for this item.
    - `refundAmount` number, float, required — The amount refunded for this order item in USD.
    - `message` string, nullable — Additional information about the refund result, especially useful for failed items.
  - `totalRefundAmount` number, float, required — The total amount refunded across all order items in USD.

## Other responses

- `400` — Bad request - Invalid input data or order item has already been refunded.
- `401` — Unauthorized.
- `403` — Forbidden - you do not have permission to perform this action.
- `404` — Not Found - Order ID or order item ID does not exist, or order items do not belong to the specified order.
- `405` — Method not allowed.
- `409` — Conflict - Idempotency key reused for different request, or AGP delete threshold exceeded.
- `415` — Unsupported Media Type - All POST requests must include the `Content-Type: application/json` header.
- `423` — Locked - The deletion timing is outside registry limits. The Add Grace Period (AGP) has expired for one or more items.
- `429` — Rate limit has been exceeded.
- `500` — Internal server error.
- `502` — Bad Gateway - Registry connection unavailable or registry-related problem occurred.
- `504` — Gateway Timeout

---

[API](https://skmtc.dev/name/apis/name-com-core-api.md) · [All operations](https://skmtc.dev/name/apis/name-com-core-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/name/name-com-core-api/revisions/a37d4cbd3991/schema)
