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.

  1. 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.
  2. The sandbox sends Telegram notices from its own bot. Its docs at https://sandbox.gate.solknife.xyz/docs/sandbox name that bot. Send /start to it to get the chat ID for telegramChatId and customerTelegramChatId.
  3. 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 with sk_test_. The sandbox rejects sk_live_ keys, and production rejects sk_test_ keys, with API_KEY_CLUSTER_MISMATCH.
  4. For indexTokenMint, use devnet USDC 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU or another SPL Token mint that exists on devnet. A mint that exists only on mainnet fails with TOKEN_MINT_NOT_FOUND, and a Token-2022 mint fails with UNSUPPORTED_TOKEN_PROGRAM. The same check applies when you index another token or create a subscription plan.
  5. The callbackUrl must be HTTPS on the default port to a public host. Before the first payment, send a gateway.test callback 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.
  6. Create a payment with your sk_test_ key against the sandbox base URL. Leave out merchantTokenMint to 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.
  7. Open checkoutUrl and 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 payment CONFIRMED, and sends the signed payment.confirmed callback.
  8. Subscription plans and customer subscriptions use the same endpoints and the same steps as on production. The plan tokenMint must be a devnet mint, and the hosted subscription checkout asks the customer wallet to sign on devnet.
  9. 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.