Skip to content

Create a refund.

POST
/v1/payments/{reference}/refunds
curl --request POST \
--url https://api.ridleypay.com/v1/payments/WOO-123/refunds \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "amount": 25, "reason": "Customer request" }'

Processes a full or partial refund against a payment. The refund is submitted to the payment provider in real time.

reference
required
string

The payment reference.

Example
WOO-123
Media typeapplication/json
object
amount
required

The refund amount.

number
Example
25
reason

An optional reason for the refund.

string
nullable
Example
Customer request

Refund created

Media typeapplication/json
object
data
object
id
string
type
string
attributes
object
amount
string
reason
string
status
string
created_at
string
meta
object
payment
object
reference
string
status
string
amount
string
total_refunded
string
refundable_amount
string
Example
{
"data": {
"id": "1",
"type": "refunds",
"attributes": {
"amount": "25.00",
"reason": "Customer request",
"status": "completed",
"created_at": "2026-03-05T12:00:00+00:00"
}
},
"meta": {
"payment": {
"reference": "WOO-123",
"status": "PARTIALLY_REFUNDED",
"amount": "99.99",
"total_refunded": "25.00",
"refundable_amount": "74.99"
}
}
}

Payment not found

Media typeapplication/json
object
errors
Array<object>
object
status
string
title
string
detail
string
Example
{
"errors": [
{
"status": "404",
"title": "Not Found",
"detail": "Payment not found."
}
]
}

Cannot refund

Media typeapplication/json
object
errors
Array<object>
object
status
string
title
string
detail
string
Example
{
"errors": [
{
"status": "422",
"title": "Unprocessable Entity",
"detail": "This payment cannot be refunded."
}
]
}