Payments

Subscribe

Subscribe to a pro plan via x402 payment.

Flow:

  1. If active subscription with >7 days remaining → return it (no charge).
  2. If no x-payment header → return 402 with payment options.
  3. If x-payment header → verify, settle, upgrade key, create subscription + invoice.
post/api/v1/payments/subscribe

Request

  • Base URL: https://cryptodataapi.com
  • URL: https://cryptodataapi.com/api/v1/payments/subscribe
  • Auth: API key in header X-API-Key

Request body

plan'monthly' | 'monthly_plus' | 'annual' | 'annual_plus' | 'pass_1h' | 'pass_1d' | 'pass_7d' | 'pass_1h_plus' | 'pass_1d_plus' | 'pass_7d_plus' required
discount_codestring nullable

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 1 revision of this API.