ZapAPI Docs
Get StartedConceptsAI GatewayGuidesPayment GatewaySDKAPI ReferenceResources
ApiRefunds

Create a refund for a paid invoice

POST
/api/v1/refunds/invoice/{invoiceId}

Lightning has no chargebacks — refunds are merchant-initiated. type=credit records a note (settle off-band); type=payment sends sats back to the customer bolt11/lightning address. Partial refunds supported while total refunded ≤ invoice amount.

Authorization

bearer

Path Parameters

invoiceId*string

Header Parameters

X-API-Version?string

API version for header-based versioning

Default"1"
Value in"1""2"

Request Body

application/json
  1. body
type*string

Refund type: "credit" (record only, settle off-band) or "payment" (send sats back)

Default"payment"
Value in"credit""payment"
amountSats?number

Amount in sats to refund. Omit for a full refund of the invoice amount. Partial refunds are allowed.

destination?string

Where to send the refund: a BOLT11 invoice or lightning address (name@domain.com). Required for type=payment.

reason?string

Reason for the refund (shown in history)

Response Body

Example Request
curl -X POST 'http://localhost:3001/api/v1/refunds/invoice/string' \  -H 'Content-Type: application/json' \  -d '{  "type": "credit"}'
Example Response201
Empty