> ## Documentation Index
> Fetch the complete documentation index at: https://developers.pcibooking.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Refunds & Voids

> Process refunds and void transactions on payments made through PCI Booking's Universal Payment Gateway.

Refunds and voids reverse previous transactions through PCI Booking's [Universal Payment Gateway (UPG)](/use-tokens/universal-payment-gateway). Neither operation requires card data or a token. They reference the original transaction.

## Void

A void cancels a pre-authorization before it has been captured. No funds were transferred, so the hold is simply released.

* Submit the **original transaction reference**.
* The PSP releases the hold on the cardholder's funds.
* Only works on uncaptured authorizations.

Use a void when a booking is cancelled before fulfillment, or when an authorization is no longer needed.

```bash theme={null}
curl -X POST "https://service.pcibooking.net/api/paymentGateway?credentialsId=my-stored-credentials" \
  -H "Authorization: APIKEY your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "CardToken": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
    "OperationType": "Void",
    "GatewayReference": "txn_abc123"
  }'
```

## Refund

A refund returns funds from a completed transaction, either a charge or a captured authorization. The PSP processes the return using the original transaction details.

* Submit the **original transaction reference** and the **refund amount**.
* Full or partial refunds are supported.
* The PSP credits the cardholder's account.

```bash theme={null}
curl -X POST "https://service.pcibooking.net/api/paymentGateway?credentialsId=my-stored-credentials" \
  -H "Authorization: APIKEY your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "CardToken": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
    "OperationType": "Refund",
    "GatewayReference": "txn_abc123",
    "Amount": 50.00,
    "Currency": "EUR"
  }'
```

## Timing: When to Void vs. When to Refund

The key distinction is whether the transaction has been settled (funds transferred from the cardholder's bank to the merchant's bank).

* **Before settlement:** Use a **void**. The authorization hold is released and no funds move. Settlement timing varies by PSP but typically happens at end of day or within 24 hours.
* **After settlement:** Use a **refund**. The PSP initiates a credit back to the cardholder's account. Refunds may take several business days to appear on the cardholder's statement, depending on the issuing bank.

If you attempt a void after settlement has already occurred, the PSP will reject it. In that case, submit a refund instead. Some PSPs automatically convert a void request into a refund if settlement has passed, but this behavior is not universal.

## Partial Refunds

You can refund less than the full transaction amount by specifying a lower value in the `Amount` field. Partial refunds are useful for scenarios such as:

* A guest shortens their hotel stay and is owed a partial credit
* One item in an order is returned while others are kept
* A service fee is waived after a complaint

Some PSPs support multiple partial refunds against a single transaction, up to the original charge amount. Others allow only one refund per transaction. Check your PSP's documentation for their specific partial refund policy.

## PSP-Specific Considerations

PCI Booking routes void and refund requests to the PSP that processed the original transaction. Each PSP has its own rules and limitations:

* **Void windows.** Some PSPs allow voids only within a few hours of the original authorization, while others allow voids until end-of-day settlement.
* **Refund timeframes.** Most PSPs allow refunds for up to 180 days after the original charge. Some extend this to 365 days.
* **Currency handling.** Refunds are processed in the same currency as the original charge. Cross-currency refund adjustments (due to exchange rate changes) are handled by the issuing bank, not PCI Booking.
* **Transaction references.** The `GatewayReference` you submit must match the reference returned by the PSP in the original charge or capture response.

## Key Points

* **No card data involved.** Both operations reference the original transaction, not the card token.
* **Same UPG endpoint.** Voids and refunds use the same [Universal Payment Gateway](/use-tokens/universal-payment-gateway) as charges and authorizations.
* **PSP handles the reversal.** PCI Booking routes your request to the correct PSP based on the original transaction.
* **Idempotency.** Submitting the same void or refund request twice may result in a duplicate reversal, depending on the PSP. Use unique references and check the transaction status before retrying.

## Next Steps

<CardGroup cols={2}>
  <Card title="Charge" icon="book" href="/use-tokens/charge">
    Process charge transactions.
  </Card>

  <Card title="Authorize & Capture" icon="book" href="/use-tokens/authorize-capture">
    Two-step payment processing.
  </Card>
</CardGroup>
