curl --request POST \
--url 'https://prod-api.stateset.cloud.stateset.app/api/v1/payments/refund' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"amount": "50.00",
"payment_id": "770e8400-e29b-41d4-a716-446655440001",
"reason": "Customer requested partial refund - item damaged"
}'
{
"data": {
"amount": "49.00",
"created_at": "2026-08-31T14:22:05Z",
"currency": "USD",
"description": "Two-person tent, green — replacement for damaged pole set.",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"order_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"payment_method": "string",
"payment_method_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"processed_at": "2026-08-31T14:22:05Z",
"status": "pending"
},
"errors": [
"string"
],
"message": "Two-person tent, green — replacement for damaged pole set.",
"meta": {
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"timestamp": "2026-08-31T14:22:05Z"
},
"success": true
}
Refund a payment
Refund a payment
POST
/
api
/
v1
/
payments
/
refund
curl --request POST \
--url 'https://prod-api.stateset.cloud.stateset.app/api/v1/payments/refund' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"amount": "50.00",
"payment_id": "770e8400-e29b-41d4-a716-446655440001",
"reason": "Customer requested partial refund - item damaged"
}'
{
"data": {
"amount": "49.00",
"created_at": "2026-08-31T14:22:05Z",
"currency": "USD",
"description": "Two-person tent, green — replacement for damaged pole set.",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"order_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"payment_method": "string",
"payment_method_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"processed_at": "2026-08-31T14:22:05Z",
"status": "pending"
},
"errors": [
"string"
],
"message": "Two-person tent, green — replacement for damaged pole set.",
"meta": {
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"timestamp": "2026-08-31T14:22:05Z"
},
"success": true
}
Request body
RefundPaymentHandlerRequest
string,null
Refund amount (optional, defaults to full payment amount)
string (uuid)
required
Payment to refund
string,null
Reason for refund
Response
ApiResponse_PaymentResponse
object
array,null
string,null
boolean
required
Status codes
| Code | Meaning |
|---|---|
201 | Refund processed |
400 | Bad request |
curl --request POST \
--url 'https://prod-api.stateset.cloud.stateset.app/api/v1/payments/refund' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"amount": "50.00",
"payment_id": "770e8400-e29b-41d4-a716-446655440001",
"reason": "Customer requested partial refund - item damaged"
}'
{
"data": {
"amount": "49.00",
"created_at": "2026-08-31T14:22:05Z",
"currency": "USD",
"description": "Two-person tent, green — replacement for damaged pole set.",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"order_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"payment_method": "string",
"payment_method_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"processed_at": "2026-08-31T14:22:05Z",
"status": "pending"
},
"errors": [
"string"
],
"message": "Two-person tent, green — replacement for damaged pole set.",
"meta": {
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"timestamp": "2026-08-31T14:22:05Z"
},
"success": true
}
Last modified on August 31, 2026