couponsby La Crypta
ApiClaim

Redeem a coupon

Consumes the nonce once. Already-claimed returns `200` with `status: claimed` and the original `claimedAt` (safe to retry).

POST/api/coupons/claim

Consumes the nonce once. Already-claimed returns 200 with status: claimed and the original claimedAt (safe to retry).

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/coupons/claim" \  -H "Content-Type: application/json" \  -d '{    "nonce": "hcLPDzERvvHzS4Vn0OLbAQ"  }'
{  "couponId": "string",  "coupon": {    "type": "percent",    "percent": 0,    "productDs": [      "string"    ],    "cap": {      "amount": 1,      "currency": "ARS"    }  },  "name": "string",  "description": "string",  "npub": "string",  "image": "string",  "nonce": "string",  "expiresAt": 0,  "status": "success",  "claimedAt": 0,  "voucher": {    "id": "string",    "pubkey": "string",    "created_at": 0,    "kind": 0,    "tags": [      [        "string"      ]    ],    "content": "string",    "sig": "string"  }}