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

# Refund a payment

> Refund a payment

### Request body

JSON body of type `RefundPaymentHandlerRequest`.

### Responses

<ResponseField name="201" type="ApiResponse_PaymentResponse">
  Refund processed
</ResponseField>

<ResponseField name="400" type="ErrorResponse">
  Bad request
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.stateset.com/api/v1/payments/refund' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{}'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "data": {
      "amount": "string",
      "created_at": "2026-07-24T12:00:00Z",
      "currency": "string",
      "description": null,
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "order_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "payment_method": "string",
      "payment_method_id": null,
      "processed_at": null,
      "status": "string"
    },
    "errors": null,
    "message": null,
    "meta": null,
    "success": true
  }
  ```
</ResponseExample>
