Get started with selling subscriptions on Crossmint in 5 minutes
Parameter | Value |
---|---|
BASE URL | https://staging.crossmint.com |
API-VERSION | 2022-06-09 |
X-API-KEY | YOUR_API_KEY |
isSubscription: true
field in the Response (last tab of code group).
Save the id
from the response for later. We will refer to it as collectionId
later (e.g. fdfd902c-e80a-4828-b884-1554bdaeb54d
in the response above)
Check collection through API (Advanced)
Via API (Advanced)
NEXT_PUBLIC_PROJECT_ID
and NEXT_PUBLIC_COLLECTION_ID
in the demo’s .env.local
file to your subscription collection’s projectId and collectionId.
Troubleshooting is covered in the embedded quickstart guide.
If your embedded checkout is configured properly, you should see your subscription NFT loaded, with a “Subscribe” button on the bottom.
Common errors
NEXT_PUBLIC_PROJECT_ID
and NEXT_PUBLIC_COLLECTION_ID
in the .env.local
file to your subscription collection’s projectId and collectionId.X-API-KEY
in the .env.local
file to your server-side API key.emailInputOptions={{show: true,}}
prop. Using recipient
props will not work.expiresAt
date is in the future.
The rules are straightforward:
Crossmint's APIs (recommended)
expiresAt
field.For this quickstart, Crossmint recommends you use the Get All NFTs API, as it gives an overall view of all NFTs in your subscription collection, including their expiration dates.(Alternative) Using the API Playground
YOUR_API_KEY
generated in Step 1.YOUR_COLLECTION_ID
from the console1
Block Explorer