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

# Refunds

> Refund a completed, settled credit transaction

Full refunds only. The original transaction id is the idempotency key — retrying `POST /refunds` with the same `transaction` returns the existing refund.

## Create a refund

The original transaction must be a settled `credit`, within 48 hours, with enough wallet balance. One refund per transaction.

```bash theme={"theme":{"light":"min-light","dark":"poimandres"}}
curl -X POST https://api.puplar.com/refunds \
  -H "Authorization: Bearer sk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "transaction": "64f1a2b3c4d5e6f7a8b9c0d1",
    "reason": "Customer requested refund"
  }'
```

See [Idempotency](/guides/idempotency).

## Retrieve

```bash theme={"theme":{"light":"min-light","dark":"poimandres"}}
curl https://api.puplar.com/refunds/64f9b3c4d5e6f7a8b9c0d1e2 \
  -H "Authorization: Bearer sk_live_your_key"
```

```bash theme={"theme":{"light":"min-light","dark":"poimandres"}}
curl "https://api.puplar.com/refunds?original_transaction=64f1a2b3c4d5e6f7a8b9c0d1" \
  -H "Authorization: Bearer sk_live_your_key"
```

## Retry a failed refund

```bash theme={"theme":{"light":"min-light","dark":"poimandres"}}
curl -X POST https://api.puplar.com/refunds/64f9b3c4d5e6f7a8b9c0d1e2/resend \
  -H "Authorization: Bearer sk_live_your_key"
```

Listen for `refund.initiated`, `refund.completed`, and `refund.failed`. See [Webhooks](/guides/webhooks).

```json theme={"theme":{"light":"min-light","dark":"poimandres"}}
{
  "id": "64f1a2b3c4d5e6f7a8b9c0d1",
  "type": "refund.completed",
  "timestamp": "2026-07-26T12:00:00.000Z",
  "payload": {
    "id": "64f9b3c4d5e6f7a8b9c0d1e2",
    "amount": 7500,
    "currency": "ngn",
    "method": "bank_transfer",
    "status": "completed",
    "reason": "Customer requested refund",
    "created_at": "2026-07-26T12:00:00.000Z"
  }
}
```
