Subscription

Subscription status and activation. Require Privy JWT.

Get subscription status

get

Returns the current user's subscription tier, expiry date, current price, and the treasury address to send payment to.

Use the treasury address and price to construct the usdSend EIP-712 payload for activating a subscription.

Authorizations
AuthorizationstringRequired

Privy-issued JWT. Obtain by connecting your wallet at https://app.zirodelta.com.

Responses
chevron-right
200

Subscription status.

application/json
get
/api/subscription

Activate Pro subscription

post

Activates or extends a Pro subscription by submitting an on-chain payment.

Flow:

  1. Call GET /api/subscription to get price and treasury address.

  2. Sign a usdSend EIP-712 typed data message in the user's wallet:

    • destination: treasury address from step 1

    • amount: price string from step 1 (e.g. "10.0")

    • time: current Unix timestamp in milliseconds (serves as nonce)

  3. POST the signature, amount, and time to this endpoint.

  4. The backend submits the usdSend to Hyperliquid and grants 30 days of Pro.

If the user already has an active Pro subscription, the 30 days are added to the existing expiry date.

Authorizations
AuthorizationstringRequired

Privy-issued JWT. Obtain by connecting your wallet at https://app.zirodelta.com.

Body
signaturestringRequired

65-byte EIP-712 signature hex string (from eth_signTypedData_v4), including the 0x prefix.

Example: 0xabc123...def456
amountstringRequired

USDC amount as a string. Must match the current subscription price.

Example: 10.0
timeinteger · int64Required

Unix timestamp in milliseconds used as the usdSend nonce when signing.

Example: 1736553612345
Responses
chevron-right
200

Subscription activated. Returns updated subscription status.

application/json
post
/api/subscription/activate

Last updated

Was this helpful?