curl --request POST \
--url 'https://api.stateset.com/api/v1/payments/{id}/refund' \
--header "Authorization: Bearer $STATESET_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"amount": "49.00",
"notes": "Two-person tent, green — replacement for damaged pole set.",
"reason": "Two-person tent, green — replacement for damaged pole set."
}'
{
"amount": "49.00",
"amount_refunded": "string",
"created_at": "2026-08-31T14:22:05Z",
"currency": "USD",
"customer_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"external_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"order_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"payment_method": "card",
"payment_number": "string",
"processor": "stripe",
"status": "pending",
"updated_at": "2026-08-31T14:22:05Z"
}
Refund a create
Refund a create
POST
/
api
/
v1
/
payments
/
{id}
/
refund
curl --request POST \
--url 'https://api.stateset.com/api/v1/payments/{id}/refund' \
--header "Authorization: Bearer $STATESET_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"amount": "49.00",
"notes": "Two-person tent, green — replacement for damaged pole set.",
"reason": "Two-person tent, green — replacement for damaged pole set."
}'
{
"amount": "49.00",
"amount_refunded": "string",
"created_at": "2026-08-31T14:22:05Z",
"currency": "USD",
"customer_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"external_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"order_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"payment_method": "card",
"payment_number": "string",
"processor": "stripe",
"status": "pending",
"updated_at": "2026-08-31T14:22:05Z"
}
Path parameters
string
required
Payment ID (UUID)
Request body
CreateRefundRequest
string
required
string,null
string,null
Response
PaymentResponse
string
required
string
required
string (date-time)
required
string
required
string,null
string,null
string (uuid)
required
string,null (uuid)
string
required
string
required
string,null
string
required
string (date-time)
required
Status codes
| Code | Meaning |
|---|---|
201 | Refund created |
400 | Invalid request |
404 | Payment not found |
422 | Idempotency-Key reused with a different body |
428 | Idempotency-Key header required on this endpoint (configurable) |
curl --request POST \
--url 'https://api.stateset.com/api/v1/payments/{id}/refund' \
--header "Authorization: Bearer $STATESET_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"amount": "49.00",
"notes": "Two-person tent, green — replacement for damaged pole set.",
"reason": "Two-person tent, green — replacement for damaged pole set."
}'
{
"amount": "49.00",
"amount_refunded": "string",
"created_at": "2026-08-31T14:22:05Z",
"currency": "USD",
"customer_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"external_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"order_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"payment_method": "card",
"payment_number": "string",
"processor": "stripe",
"status": "pending",
"updated_at": "2026-08-31T14:22:05Z"
}
Last modified on August 31, 2026