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.
Create customer subscription
Create customer subscription
POST /api/subscriptions
x-gateway-key: sk_live_...

{
  "planId": "subscription plan id",
  "customerReference": "cus_1001",
  "customerTelegramChatId": "123456789",
  "subscriberWallet": "customer Solana wallet"
}

Requires an ACTIVE subscription plan. Publish and confirm the plan before opening customer subscriptions.
customerReference is idempotent per plan, so the same SaaS customer can hold separate subscriptions for different plans or add-ons.
The customer wallet is required because Gateway derives the on-chain subscription account before activation.
Hosted subscription checkout
Hosted subscription checkout
Response:
{
  "checkoutUrl": "https://sandbox.gate.solknife.xyz/subscription-checkout/..."
}
Hosted wallet setup transaction
Hosted wallet setup transaction
POST /api/subscription-checkout/{subscriptionId}/transactions/init-authority?reference=cus_1001

{
  "account": "customer Solana wallet"
}

Hosted checkout route. Returns an unsigned base64 wallet setup transaction without requiring the merchant Gateway API key.
Hosted subscribe transaction
Hosted subscribe transaction
POST /api/subscription-checkout/{subscriptionId}/transactions/subscribe?reference=cus_1001

{
  "account": "customer Solana wallet",
  "expectedSubscriptionAuthorityInitId": "1"
}

Hosted checkout route. Returns an unsigned base64 subscribe transaction scoped to the customer reference on the checkout URL.
Hosted cancel transaction
Hosted cancel transaction
POST /api/subscription-checkout/{subscriptionId}/transactions/cancel?reference=cus_1001

{
  "account": "customer Solana wallet"
}

Hosted checkout route. Returns an unsigned base64 cancel transaction for the customer wallet without requiring the merchant Gateway API key.
Hosted resume transaction
Hosted resume transaction
POST /api/subscription-checkout/{subscriptionId}/transactions/resume?reference=cus_1001

{
  "account": "customer Solana wallet"
}

Hosted checkout route. Returns an unsigned base64 resume transaction for a canceled subscription before the current billing period ends.
Hosted subscription confirmation
Hosted subscription confirmation
POST /api/subscription-checkout/{subscriptionId}/confirm?reference=cus_1001

{
  "action": "subscribe | cancel | resume",
  "signature": "solana transaction signature"
}

Verifies the customer subscribe, cancel, or resume signature, updates the subscription, sends the signed callback, and notifies the customer chat in Telegram. Gateway reads the transaction at finalized commitment, about 13 seconds after it is sent; before that the request fails with a not-found error and should be retried.