The sandbox at https://sandbox.gate.solknife.xyz runs the same Gateway on Solana devnet. No real funds move there. Sandbox accounts are separate from production accounts, so register your business there first. These steps take you from an empty wallet to a confirmed devnet payment and a verified callback.
- Set the paying wallet to Solana devnet. Get devnet SOL from the Solana faucet and devnet USDC from the Circle faucet. The paying wallet needs SOL for the network fee and the 0.0012 SOL gateway fee.
- This sandbox sends Telegram notices from @solknife_sandbox_bot, not from the production bot. Send /start to it from the Telegram account that should get the notices. It replies with the chat ID to use for
telegramChatIdandcustomerTelegramChatId. - Register on https://sandbox.gate.solknife.xyz/register or with
POST https://sandbox.gate.solknife.xyz/api/merchants/register. The response holds your API key and webhook secret. Sandbox API keys start withsk_test_. The sandbox rejectssk_live_keys, and production rejectssk_test_keys, withAPI_KEY_CLUSTER_MISMATCH. - For
indexTokenMint, use devnet USDC4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDUor another SPL Token mint that exists on devnet. A mint that exists only on mainnet fails withTOKEN_MINT_NOT_FOUND, and a Token-2022 mint fails withUNSUPPORTED_TOKEN_PROGRAM. The same check applies when you index another token or create a subscription plan. - The
callbackUrlmust be HTTPS on the default port to a public host. Before the first payment, send agateway.testcallback to it. Verify its signature as the Callback verification sample describes. The response shows the delivery status and the HTTP code your endpoint returned.Send a test callback POST https://sandbox.gate.solknife.xyz/api/webhooks/test x-gateway-key: sk_test_... Response: { "eventType": "gateway.test", "status": "DELIVERED", "httpStatus": 200, "targetUrl": "https://app.example/callback" } The callback body is {"eventType":"gateway.test","merchantId":"..."}, signed with your sandbox webhook secret. - Create a payment with your
sk_test_key against the sandbox base URL. Leave outmerchantTokenMintto use the token from registration.Create a sandbox payment POST https://sandbox.gate.solknife.xyz/api/payments x-gateway-key: sk_test_... { "checkoutReference": "order-1001", "customerTelegramChatId": "123456789", "merchantAmountRaw": "1000000" } Response: { "merchantAmountRaw": "1000000", "gatewayFeeLamports": "1200000", "checkoutUrl": "https://sandbox.gate.solknife.xyz/checkout/..." } With devnet USDC (6 decimals), 1000000 is 1 USDC. - Open
checkoutUrland pay with a wallet that is set to devnet. On a desktop, scan the Solana Pay QR code on the checkout with a wallet app. On a phone, tap Pay with wallet to open the wallet. Gateway finds the transaction, verifies it at finalized commitment, marks the paymentCONFIRMED, and sends the signedpayment.confirmedcallback. - Subscription plans and customer subscriptions use the same endpoints and the same steps as on production. The plan
tokenMintmust be a devnet mint, and the hosted subscription checkout asks the customer wallet to sign on devnet. - To go live, register again on https://gate.solknife.xyz, then change the base URL and the API key in your backend. Your
sk_live_key and its callback secret replace the sandbox ones.