testmode -> livemode
You can test Winter based on your testmode contract and push that to production with your mainnet contract.
Winter allows you to create sandbox checkouts minting on your testnet smart contract to ensure that the integration is working smoothly.
Once that is working, you can create a corresponding livemode checkout for that project.
​
Let's say your test contract is deployed to Mumbai under the address 0xTestContract.
You'll create a sandbox Winter checkout as follows:
/createProject({
sandbox: true, // NOTE! This param tells us this is a sandbox project.
contractAddress: 0xTestContract,
...
// corresponding test contract info
})
Let's say you get back project ID 10 for this sandbox checkout. You can then test the sandbox checkout via the following URL:
​https://sandbox-winter-checkout.onrender.com/?projectId={PROJECT_ID} Let's say that all works (fingers crossed!) and you go ahead and deploy your contract to Polygon Mainnet under the address 0xMainnetContract.
You'll then create a livemode Winter project by calling
/createProject({
projectId: 10 // Send Winter the project ID you got in sandbox
sandbox: false, // NOTE! This param tells us this is a mainnet project.
contractAddress: 0xMainnetContract,
...
// corresponding mainnet contract info
})
Voila! Now you can use that same project ID in livemode as follows: https://checkout.usewinter.com/?projectId={PROJECT_ID}​
Congrats on getting a live, mainnet Winter checkout up and running via API!
​
Copy link