List due subscriptions
GET /api/subscriptions/due
x-gateway-key: sk_live_...
Returns active or past due customer subscriptions whose active plan is ready for collection. Use each id to build a collect transaction from your backend worker.Collection worker queue
GET /api/subscriptions/due/queue
x-gateway-key: sk_live_...
Returns due collection worker items with subscription, plan, pullerWallet, collectTransactionPath, confirmPath, and pastDuePath. For each item, build the collect transaction with the returned pullerWallet, send it on Solana, then confirm the signature through confirmPath. Use pastDuePath when your worker cannot collect after the billing date.Collect subscription payment transaction
POST /api/subscriptions/{subscriptionId}/transactions/collect
x-gateway-key: sk_live_...
{
"account": "subscription puller wallet"
}
Returns an unsigned base64 transaction that collects the next due subscription payment: the merchant receives the full subscription token amount, and the plan's puller wallet pays SolKnife 1,200,000 lamports. The signer must be the plan's puller wallet, which is the merchant wallet by default. Gateway confirms a collect only when it carries that fee.
Past due customer subscriptions use the same collect action. After the collect signature is confirmed, Gateway marks the customer subscription ACTIVE again and advances the next billing date.Mark subscription past due
POST /api/subscriptions/{subscriptionId}/past-due
x-gateway-key: sk_live_...
Marks an active customer subscription PAST_DUE after the next billing date when your backend worker could not collect the payment. Use this only for subscriptions on active plans. This sends a subscription.past_due callback and Telegram notification, but does not build a Solana transaction or charge a gateway fee. Retries for an already PAST_DUE subscription return the stored subscription without sending another callback or Telegram message.