Refunds
Refunds allow you to return funds to customers for completed transactions. This guide covers creating and managing refunds.
Overview
A refund represents a return of funds for a transaction. Refunds can be:
- Full refund: Return the entire transaction amount
- Partial refund: Return a portion of the transaction amount
Create a Refund
POST /api/refund/create
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
transactionId | String | Yes | Transaction ID to refund |
amount | Long | No | Refund amount in cents (omit for full refund) |
reason | String | No | Reason for refund |
refundType | String | Yes | FULL or PARTIAL |
Example
curl -X POST http://localhost:8080/api/refund/create \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <YOUR_TOKEN>" \
-d '{
"transactionId": "TXN2026081800001",
"amount": 50000,
"reason": "Customer request",
"refundType": "PARTIAL"
}'