Create hosted checkout
POST /api/payments
x-gateway-key: sk_live_...
{
"checkoutReference": "order-1001",
"customerTelegramChatId": "123456789",
"merchantAmountRaw": "250000000",
"merchantTokenMint": "accepted token address"
}
Response:
{
"merchantAmountRaw": "250000000",
"gatewayFeeLamports": "1200000",
"checkoutUrl": "https://gate.solknife.xyz/checkout/..."
}
Send the customer to checkoutUrl. Gateway watches Solana for the transaction that carries the payment reference, verifies it at finalized commitment, marks the payment CONFIRMED, and sends the signed payment.confirmed callback. No confirm call is needed.Checkout status
GET /api/checkout/{paymentId}?reference=...
Public checkout status for the hosted checkout page. Needs no API key; the reference from checkoutUrl is the access key. status moves from PENDING to CONFIRMED once Gateway finds and verifies the payment, usually within 30 seconds of the customer sending it.Confirm payment
POST /api/payments/{paymentId}/confirm
x-gateway-key: sk_live_...
{
"signature": "solana transaction signature"
}
Gateway confirms hosted checkout payments on its own, so this call is only needed when your app sends the customer's transaction itself and wants the result right away. Verifies the transaction at finalized commitment, about 13 seconds after it is sent. Before that the request fails with PAYMENT_NOT_FOUND_ONCHAIN; retry it.