Skip to main content

Overview

Waffo Pancake uses a refund ticket system. Buyers request refunds through the API or Customer Portal, and each request creates a ticket that moves through a defined lifecycle. Merchants review and resolve tickets from the dashboard.

Business Rules

These rules are enforced by the API and cannot be overridden.
  • One-time products are eligible for refund within 7 days of payment.
  • Subscriptions do not use the refund ticket system. Cancellation takes effect at the end of the current billing period.
  • Partial refunds are supported by providing a custom amount (in smallest currency units) when creating a ticket.

Refund Ticket Statuses

Every refund ticket moves through the following lifecycle:

pending

Refund requested, awaiting review.

approved

Refund approved by the merchant.

rejected

Refund request denied.

processing

Refund is being processed by the payment provider.

succeeded

Refund completed successfully.

failed

Refund processing failed.

Creating a Refund Ticket

Refund tickets are created by calling the API with API Key authentication.

Endpoint

POST /v1/actions/refund-ticket/create-ticket
Authentication: API Key

Request Body

paymentId
string
required
The ID of the payment to refund (UUID v4).
reason
string
required
A description of why the refund is being requested.
amount
integer
Amount to refund in smallest currency units (e.g., cents). Omit for a full refund.

Response

ticketId
string
The unique ID of the created refund ticket.
status
string
Initial status of the ticket. Always pending on creation.
requestedAmount
integer
The refund amount in smallest currency units.

Example

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": "550e8400-e29b-41d4-a716-446655440000",
    "reason": "Product not as described",
    "amount": 1500
  }'

Querying Refund Tickets

Use GraphQL to retrieve refund ticket data.
query {
  refundTickets(storeId: "STORE_ID") {
    id
    paymentId
    storeId
    customerId
    reason
    status
    requestedAmount
    approvedAmount
    currency
    createdAt
    updatedAt
    resolvedAt
  }
}
FieldTypeDescription
idstringRefund ticket ID
paymentIdstringAssociated payment ID
storeIdstringStore that owns the payment
customerIdstringBuyer who requested the refund
reasonstringReason provided by the buyer
statusstringCurrent ticket status
requestedAmountintegerAmount the buyer requested
approvedAmountintegerAmount approved (may differ from requested)
currencystringISO 4217 currency code
createdAtstringISO 8601 timestamp
updatedAtstringISO 8601 timestamp
resolvedAtstringISO 8601 timestamp (null if unresolved)

Webhook Notifications

You can configure webhooks to receive notifications when refund ticket events occur. See the Webhooks guide for setup instructions.

Reducing Refund Requests

Accurate descriptions reduce “not as expected” refund requests.
Let customers try before buying to reduce post-purchase regret.
Address issues quickly before they become refund requests.
Use a clear billing descriptor so customers recognize charges.