POST /v1/refunds
Service: payments · operationId: (none)
Required scopes
(no scope declared — review service config)
Request body
{
"type": "object",
"properties": {
"payment_id": {
"type": "string",
"minLength": 1
},
"amount_cents": {
"type": "integer",
"exclusiveMinimum": 0
},
"reason": {
"type": [
"string",
"null"
]
}
},
"required": [
"payment_id"
]
}Responses
201 Refund initiated
{
"type": "object",
"properties": {
"refund_id": {
"type": "string"
},
"payment_id": {
"type": "string"
},
"amount_cents": {
"type": "integer"
},
"status": {
"type": "string"
}
},
"required": [
"refund_id",
"payment_id",
"amount_cents",
"status"
]
}404 Payment not found
{
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"error",
"message"
]
}409 Already refunded
{
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"error",
"message"
]
}412 Payment not succeeded
{
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"error",
"message"
]
}Example
curl -X POST https://payments.platform.loop.health/v1/refunds \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'Related
services/payments— service overview- All endpoints — directory across services
- Auth model — how scopes are enforced