Guides
Test, then go live
How to test crypto payments with devnet money, and what to check before you take real payments on Solana mainnet.
Test on devnet
| Test | What should happen |
|---|---|
| Pay with USDC, then with SOL | Each payment is marked as confirmed, and the right order is paid once |
| Buy a download | It has no delivery, the files only open after payment, and the email arrives |
| Cancel it in your wallet | The order stays unpaid |
| Open the success page without paying | The order stays unpaid |
| Change a price in the browser | The order does not cost less |
| Press the pay button twice | The customer is not sent to pay twice |
| Send a webhook with a false signature | Your server refuses it |
| Send the same real webhook again within 5 minutes | The order is delivered only once |
| Stop your webhook, then pay | Your background job finds the payment |
| Open another customer's order | You cannot see it |
| Use a phone, then only a keyboard | You can finish a payment, except for any steps in a wallet app that does not support it |
Move to mainnet
Mainnet uses real money
Payments cannot be reversed. Check every address yourself before you take a payment.
- Choose mainnet in the dashboard. Add your wallet and other settings again, because devnet settings are not copied.
- Compare the whole wallet address with the one in your wallet.
- Choose if SOL payments are turned into USDC. This only works on mainnet, so test it with a small real payment.
- Create your mainnet links and products. Devnet ones are not copied.
- Change the API keys on your server. For API v2, get a new key for mainnet. It starts with
swk_main_. - If you use the checkout sample, set
SWITRO_NETWORK=mainnet. - Use your public
httpsaddress for your website and return pages, notlocalhost. - Set your mainnet webhook address, make a small real payment, then add the new webhook secret to your server.
- Make another small payment. Check that the money arrives in your wallet, and that the order is marked as paid.
Help your customers
- Show your business name, contact details, and delivery and refund policies.
- Explain that payments are made with USDC or SOL on Solana, and cannot be reversed.
- If a result is not clear, say "We're checking your payment. Do not pay again."
- Before you refund someone, confirm their wallet address with them. Do not assume that the address they paid from can receive a refund.
- Keep records. Ask a professional about the tax and legal rules where you sell.
Keep it safe
- Keep API keys and webhook secrets in your host's secret settings.
- Give each app its own key, with only the permissions it needs.
- Check Apps and API keys often, and disconnect anything you don't use.
- Set up alerts for failed webhooks, failed payment checks and orders paid twice.
- Never store or ask for anyone's recovery phrase or private key.