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

# Refunds

> Return a successful mobile money payment to the customer.

You can refund a successful M-PESA or Airtel Money deposit. The money goes back to the wallet that paid, and comes out of your KES wallet.

## Create a refund

Call [Refund deposit](https://api.tandapay.io/api-reference/endpoint/refund-deposit.md) with the original `transactionId` in the path and a new `externalReference` for the refund itself.

```bash theme={null}
curl -X POST https://api.tandapay.io/api/b2b/fiat/deposit/aB3dE5fG7hJ9kL1mN2pQ/refund \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "refundReason": "Order cancelled by customer",
    "externalReference": "refund_order_10045"
  }'
```

```json Response theme={null}
{
  "success": true,
  "message": "Transaction refund initiated successfully.",
  "data": {
    "refundTransactionId": "rF4gH6jK8lM0nP2qR4sT",
    "originalTransactionId": "aB3dE5fG7hJ9kL1mN2pQ"
  }
}
```

## Track the refund

A refund is its own transaction. Its outcome arrives as a `transaction_updated` webhook with `type: "refund"` and an `originalTransactionId` linking it to the payment:

```json theme={null}
{
  "event": "transaction_updated",
  "data": {
    "transactionId": "rF4gH6jK8lM0nP2qR4sT",
    "originalTransactionId": "aB3dE5fG7hJ9kL1mN2pQ",
    "status": "successful",
    "type": "refund",
    "externalReference": "refund_order_10045",
    "amount": 1500,
    "currency": "KES",
    "method": "momo"
  },
  "timestamp": "2026-10-28T10:02:11.000Z"
}
```

## Limits

* Only successful mobile money deposits can be refunded through the API. For bank transfer payments, contact [support](mailto:ceo@tandapay.ke).
* Your KES wallet needs enough balance to cover the refund.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.