curl --request POST \
--url https://app.tagadapay.com/api/public/v1/payments/refund \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"paymentId": "pay_123xyz",
"refundAll": true,
"metadata": {
"reason": "Customer request",
"initiatedBy": "merchant"
}
}
'{
"id": "pay_123xyz",
"refundedAmount": 1500,
"status": "partially_refunded",
"refund": {
"id": "ref_456",
"amount": 1500,
"currency": "USD",
"status": "succeeded",
"createdAt": "2024-03-20T10:30:00Z"
}
}Process a full or partial refund for a payment
curl --request POST \
--url https://app.tagadapay.com/api/public/v1/payments/refund \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"paymentId": "pay_123xyz",
"refundAll": true,
"metadata": {
"reason": "Customer request",
"initiatedBy": "merchant"
}
}
'{
"id": "pay_123xyz",
"refundedAmount": 1500,
"status": "partially_refunded",
"refund": {
"id": "ref_456",
"amount": 1500,
"currency": "USD",
"status": "succeeded",
"createdAt": "2024-03-20T10:30:00Z"
}
}