Create Checkout Session
Create a checkout session to start the subscription flow.Request Body
The ID of the subscription plan to subscribe to
Customer’s email address
Your internal customer/user ID (for tracking)
URL to redirect to after successful subscription
URL to redirect to if user cancels (defaults to successUrl)
Additional data to attach to the session (max 50 keys)
Response
Unique identifier for the checkout session
Checkout page URL to redirect the user to
ISO 8601 timestamp when the session expires (30 minutes from creation)
Get Checkout Session
Retrieve details of a checkout session.Response
Complete Checkout Session
Mark a checkout session as completed (called by our mobile app).Request Body
The on-chain subscription PDA address
User’s Solana wallet address
Transaction signature from Solana
Response
Cancel Checkout Session
Cancel a pending checkout session.Response
Session Status
| Status | Description |
|---|---|
pending | Session created, awaiting user action |
completed | User successfully subscribed |
expired | Session expired (30 min TTL) |
cancelled | Session was cancelled |
Best Practices
Always Use HTTPS URLs
Always Use HTTPS URLs
Success and cancel URLs must use HTTPS in production.
Include Session ID in Success URL
Include Session ID in Success URL
The session ID is automatically appended as a query parameter:
?session_id=...Use this to verify the subscription was completed.Handle Expired Sessions
Handle Expired Sessions
Sessions expire after 30 minutes. Show an error and let users retry.
Use Metadata for Tracking
Use Metadata for Tracking
Store any data you need to correlate the subscription with your system: