RefundsInitiate Refunds

Initiate Refunds

This endpoint allows you to initiate a refund for a specific transaction using its reference. Refunds can only be made on successful transactions that meet refund eligibility criteria.

Endpoint

POST https://backendapi.sayswitchgroup.com/api/v1/refund

curl -X POST https://backendapi.sayswitchgroup.com/api/v1/refund \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -d '{
    "reference": "4757846579098876"
  }'

Sample Response

{
"success": true,
"message": "Refund submitted and in progress",
"data": {
  "refund_id": 12,
  "reference": "RF_qquhr0w88zxo7n7",
  "status": "pending"
}
}

Response Fields

FieldTypeDescription
successbooleanIndicates if the refund request was successful.
messagestringDescriptive status message.
data.refund_idintegerUnique identifier of the refund.
data.referencestringUnique reference for the refund transaction.
data.statusstringStatus of the refund (pending, success, etc.).