Validate Code
Validate a discount code and return what the first payment costs per plan.
Codes apply to card and dashboard crypto checkout only — never to x402 purchases. A bounded code is "percent_off for duration_months months": a monthly plan takes the full percentage on each of those months, and an annual plan takes those months' share of it off the first year.
Public (checkout UIs call it pre-auth). Every anonymous failure mode returns the identical {"valid": false} — unknown, inactive, expired, and exhausted are indistinguishable, and email binding is never revealed here (it surfaces only at pay time) — so codes can't be enumerated or probed.
With an X-API-Key header the answer is for that key's account: prices and duration_months reflect the discounted months it has left, and a code its email or wallet has already used up returns valid: false with reason: "already_used". The dashboard calls this right before an EVM wallet transfer, which is sent before the server ever sees the payment. Rate-limited per IP.
Request
- Base URL: https://cryptodataapi.com
- URL: https://cryptodataapi.com/api/v1/payments/validate-code
- Auth: none declared
Request body
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.