Skip to main content
Use this endpoint to refund an amount back to a voucher (e.g., when a booking is cancelled).
Authorization
string
required
Bearer token with marketing:write scope
id
string
required
The voucher ID

Request body

amount_minor
integer
required
Amount to add in minor units
booking_id
string
The booking ID being refunded
customer_id
string
The customer ID receiving the refund
original_transaction_id
string
ID of the original redemption transaction being reversed
description
string
Description for the transaction record

Response

Returns the transaction record and updated voucher details.
Request
curl -X POST "https://api.voyantcloud.com/v1/vouchers/voucher_abc123/refund" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount_minor": 5000,
    "booking_id": "booking_789",
    "customer_id": "cust_456",
    "original_transaction_id": "txn_xyz",
    "description": "Refund for cancelled Booking #789"
  }'
Response
{
  "data": {
    "transaction": {
      "id": "txn_abc",
      "workspaceId": "ws_xyz",
      "voucherId": "voucher_abc123",
      "type": "refund",
      "amountMinor": 5000,
      "balanceAfterMinor": 7500,
      "currency": "EUR",
      "bookingId": "booking_789",
      "customerId": "cust_456",
      "relatedTransactionId": "txn_xyz",
      "description": "Refund for cancelled Booking #789",
      "createdAt": "2024-07-21T09:00:00Z"
    },
    "voucher": {
      "id": "voucher_abc123",
      "code": "GC1A2B3C4D",
      "previous_balance_minor": 2500,
      "new_balance_minor": 7500,
      "status": "active"
    }
  }
}

Errors

StatusErrorDescription
404Voucher not foundNo voucher exists with the given ID
If the voucher was depleted and a refund is issued, the status automatically changes back to active.