Sandbox on Solana devnet. No real funds move here. Use sk_test_ keys and a wallet set to devnet. Get devnet SOL from the Solana faucet and devnet USDC from the Circle faucet.

The sandbox

The sandbox at https://sandbox.gate.solknife.xyz runs the same Gateway on Solana devnet, with its own database. No real funds move. Accounts are separate from production, so you register there first. Sandbox API keys start with sk_test_. The sandbox rejects sk_live_ keys and production rejects sk_test_ keys, with the error API_KEY_CLUSTER_MISMATCH.

1. Fund a devnet wallet

Set the paying wallet to Solana devnet. Get devnet SOL from https://faucet.solana.com and devnet USDC from https://faucet.circle.com. The paying wallet needs SOL for the network fee and the 0.0012 SOL gateway fee.

2. Register on the sandbox

Use devnet USDC (4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU) or another SPL Token mint that exists on devnet for indexTokenMint. A mint that exists only on mainnet fails with TOKEN_MINT_NOT_FOUND. The sandbox sends Telegram notices from its own bot; the sandbox docs name it.

Register on the sandbox
curl -X POST https://sandbox.gate.solknife.xyz/api/merchants/register \
  -H "content-type: application/json" \
  -d '{
    "displayName": "Acme SaaS (test)",
    "ownerWallet": "your devnet business wallet",
    "indexTokenMint": "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU",
    "callbackUrl": "https://app.example/solknife/callback",
    "telegramChatId": "123456789"
  }'

Response:
{
  "ok": true,
  "data": { "apiKey": "sk_test_...", "webhookSecret": "...", ... }
}

3. Create a payment and pay it

Create the payment with your sk_test_ key against the sandbox URL. Open checkoutUrl and pay with a wallet set to devnet: scan the Solana Pay QR code on a desktop, or open the wallet from the page on a phone.

Create a sandbox payment
const GATE_URL = "https://sandbox.gate.solknife.xyz";

// 1 devnet USDC (6 decimals).
const response = await fetch(`${GATE_URL}/api/payments`, {
  method: "POST",
  headers: {
    "content-type": "application/json",
    "x-gateway-key": process.env.GATE_API_KEY, // sk_test_...
  },
  body: JSON.stringify({
    checkoutReference: "test-order-1",
    customerTelegramChatId: "123456789",
    merchantAmountRaw: "1000000",
  }),
});
const { data } = await response.json();
console.log(data.checkoutUrl); // https://sandbox.gate.solknife.xyz/checkout/...

4. Check the confirmation and the callback

Gateway finds the transaction, verifies it at finalized commitment, marks the payment CONFIRMED, and sends the signed payment.confirmed callback to your callbackUrl, signed with your sandbox webhook secret. The callback history shows whether your endpoint accepted it. The sandbox docs also show how to send a test callback before the first payment.

Check the payment and the callback
const GATE_URL = "https://sandbox.gate.solknife.xyz";

// data is the payment from the create call above.
const checkout = await fetch(
  `${GATE_URL}/api/checkout/${data.id}?reference=${encodeURIComponent(data.reference)}`,
).then((r) => r.json());
// checkout.data.status: "PENDING", then "CONFIRMED" once Gateway verifies the transaction

const callbacks = await fetch(`${GATE_URL}/api/webhooks`, {
  headers: { "x-gateway-key": process.env.GATE_API_KEY },
}).then((r) => r.json());
// callbacks.data[0]: eventType "payment.confirmed", status "DELIVERED", httpStatus 200

5. Go live

Register again on https://sandbox.gate.solknife.xyz, then change the base URL, the API key, and the webhook secret in your backend. Use a mainnet mint such as USDC for the accepted token.

Switch from the sandbox to production
# Sandbox
GATE_URL=https://sandbox.gate.solknife.xyz
GATE_API_KEY=sk_test_...
GATE_WEBHOOK_SECRET=<sandbox webhook secret>

# Production
GATE_URL=https://sandbox.gate.solknife.xyz
GATE_API_KEY=sk_live_...
GATE_WEBHOOK_SECRET=<production webhook secret>

Start accepting payments

Register your business to get a Gateway API key and a webhook secret. Payments go straight to your wallet; Gateway takes a fixed 0.0012 SOL fee per payment.