---
title: "Prove a zap invoice was paid and record the zap"
method: POST
path: "/v1/zaps/redeem"
tags: ["Zaps"]
---

# Prove a zap invoice was paid and record the zap

`POST /v1/zaps/redeem`

## Request

- Base URL: `https://api.memestack.ai`
- URL: `https://api.memestack.ai/v1/zaps/redeem`
- Auth: none declared

Records the zap the ticket describes once its invoice is proven paid: a supplied `preimage` (sha256 must equal the invoice's payment hash) IS the proof; without one the server asks the recipient's provider via LUD-21 verify at the URL the ticket carries (202 while unpaid — poll at ~2.5 s). A provider without verify needs the preimage (PROOF_REQUIRED). Idempotent on the payment hash: a replay answers `recorded: "already"` with the image's live counters. An attested zap bumps the image's `zap_count`/`zap_total_sats` and notifies the recipient; an unattested one is recorded as a receipt only. No authentication — the signed ticket is the credential. Never gated by ZAPS_ENABLED. Rate limited 60/min/IP.

## Request body

- object
  - `ticket` string, required: The ticket from the /v1/images/{id}/zap offer.
  - `preimage` string: Optional payment preimage (64 hex). Required when the recipient's provider has no LUD-21 verify (`verify_supported: false` on the offer).

## Response `200`

Zap recorded (or already was).

- object
  - `ok` true
  - `recorded` union
    - true
    - 'already'
  - `attested` boolean
  - `zap_count` integer
  - `zap_total_sats` integer

## Other responses

- `202`: Invoice not paid yet (AWAITING_PAYMENT) — keep polling.
- `400`: Ticket invalid or expired (TICKET_INVALID), the preimage does not hash to the invoice (PROOF_INVALID), or no preimage was supplied and the provider cannot confirm payments (PROOF_REQUIRED).
- `429`: Rate limit exceeded (60/min/IP).
- `503`: PAYMENT_UNAVAILABLE — the provider's verify call failed or answered a proof that does not match this invoice; retry shortly.

---

[API](https://skmtc.dev/memestack/apis/memestack-api.md) · [All operations](https://skmtc.dev/memestack/apis/memestack-api/llms.txt) · [OpenAPI document](https://skmtc.dev/memestack/apis/memestack-api/revisions/9d3a19565f75?raw)
