Base URL:Documentation Index
Fetch the complete documentation index at: https://docs.chipipay.com/llms.txt
Use this file to discover all available pages before exploring further.
https://api.chipipay.com/v1
POST /gifts
Create a redeemable gift code. Credits are held from your org balance. Auth:Authorization: Bearer sk_... or x-api-key: pk_...
Cost: No per-call fee. Credits held = amount × maxRedeems + gas estimate.
| Field | Type | Default | Description |
|---|---|---|---|
code | string | Required | Unique gift code. Auto-generated if using bulk. |
name | string | Required | Human-readable name. |
amount | number | Required | USDC amount per redemption. |
token | string | "USDC" | Only USDC supported. |
chain | string | "STARKNET" | Source chain for credits. |
type | string | "GIFT_CARD" | GIFT_CARD, PROMOTIONAL, REFERRAL, LOYALTY, COMPENSATION. |
maxRedeems | number | Required | Total redemption limit across all users. |
maxRedeemsPerUser | number | Required | Max redeems per wallet address. |
startsAt | string | Required | ISO 8601 date when the code becomes active. |
expiresAt | string | null | Optional expiration date. |
isActive | boolean | Required | Can be toggled to disable the code. |
cctpFast | boolean | true | Fast CCTP mode (~5 sec, ~$0.01 fee) or standard (free, 4-8h). |
POST /gifts/bulk
Create multiple gift codes + send claim emails. One gift per recipient. Auth:Authorization: Bearer sk_... or x-api-key: pk_...
Max: 500 recipients per batch.
GET /gifts/claim/:code
Validate a gift code. No auth required — the code is the credential. Used by the claim page to show “You received $5 USDC from Org Name” before the user enters their wallet.Response (200)
{ "valid": false, "reason": "Gift has expired" } if the code is invalid.
POST /gifts/claim/:code/redeem
Redeem a gift code — sends USDC to the provided wallet address. No auth required.| Chain | Response | Time |
|---|---|---|
starknet | 201 — instant, tx hash in response | ~3 sec |
solana | 202 — CCTP bridge, poll status | ~24 sec |
GET /gifts/claim/:code/status/:redeemId
Poll cross-chain redeem status. No auth required.PENDING → BRIDGING → ATTESTED → SUCCESS
If FAILED: the Starknet burn tx is in cctpBurnTxHash — the funds may still be recoverable.
GET /gifts
List all gift codes for your org. Auth: Required (sk_/pk_)PATCH /gifts/:id
Update a gift (toggle active, change name, expiry). Auth: Required (sk_/pk_)DELETE /gifts/:id
Delete a gift and release held credits. Auth: Required (sk_/pk_)Error handling
| HTTP Status | Meaning |
|---|---|
| 201 | Gift created / Starknet redeem success |
| 202 | Cross-chain redeem initiated (poll status) |
| 400 | Invalid code, limit reached, insufficient credits |
| 404 | Gift or redeem not found |
| 500 | Server error (check manager wallet balance) |
