Create Refund Ticket
Request a refund for a payment. The refund goes through a review workflow.
POST /v1/actions/refund-ticket/create-ticket
Authentication: API Key
Request Body
| Field | Type | Required | Description |
|---|
paymentId | string | Yes | UUID of the payment to refund |
reason | string | Yes | Reason for the refund request |
amount | integer | No | Partial refund amount in smallest currency unit (omit for full refund) |
Example Request
curl -X POST https://waffo-pancake-auth-service.vercel.app/v1/actions/refund-ticket/create-ticket \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY_TOKEN" \
-d '{
"paymentId": "payment-uuid",
"reason": "Product did not meet expectations"
}'
Success Response
{
"data": {
"ticketId": "refund-ticket-uuid",
"status": "pending",
"requestedAmount": 2900
}
}
Refund Ticket Status Values
| Status | Description |
|---|
pending | Refund request submitted, awaiting review |
approved | Refund approved, awaiting processing |
rejected | Refund request denied |
processing | Refund is being processed |
succeeded | Refund completed, funds returned |
failed | Refund processing failed |
Business Rules
- One-time product refunds must be requested within 7 days of payment
- Partial refunds cannot exceed the original payment amount
- Each payment can have multiple refund tickets (for partial refunds)
Refund Workflow
Refund request submitted (pending)
|
v
Merchant reviews
|
+-- Approve --> processing --> succeeded (funds returned)
| --> failed (retry needed)
|
+-- Reject --> rejected
Use GraphQL to query refund tickets and their current status. Filter by storeId, paymentId, or status to find specific tickets.