Self-service API (/v1/me/*)
Read-only programmatic access to your own reseller info, wallet, ledger, alert config, and webhook subscriptions. All endpoints authenticate with your standard X-API-Key and are scoped to the reseller that owns the key.
Mutations stay portal-only (with 2FA). A leaked key shouldn't be able to silently disable your low-balance alerts.
GET /v1/me/reseller
GET /v1/me/reseller
Your reseller profile: id, name, slug, billingMode (PREPAID/POSTPAID), creditLimitCents, brandConfig, mcpHost.
curl -s https://api.jsys.com/v1/me/reseller \
-H "X-API-Key: res_live_…" | jqGET /v1/me/wallet
GET /v1/me/wallet
Current balance, billing mode, threshold, and a snapshot of the two-tier alert state. Useful as a fallback poll to the webhook channel. This is the route the MCP get_wallet_balance tool reads.
{
"balanceCents": "4231",
"currency": "USD",
"lowBalanceThresholdCents": "5000",
"billingMode": "PREPAID",
"creditLimitCents": "0",
"warningArmed": false,
"criticalArmed": false,
"lastWarningFiredAt": "2026-06-10T14:32:00Z",
"lastCriticalFiredAt": "2026-06-10T18:01:00Z",
"snoozeUntil": null
}GET /v1/me/wallet/transactions
GET /v1/me/wallet/transactions?cursor=&limit=
Paginated ledger. Each row carries type (TOPUP / DEBIT / REFUND / ADJUSTMENT), amountCents, and the linked orderId or topUpRequestId for traceability. Default limit 50, max 100.
GET /v1/me/wallet/alerts
GET /v1/me/wallet/alerts
Full alert config: threshold, channel toggles, extra emails, max-per-day, snooze, and the live tier-arm state.
GET /v1/me/webhooks
GET /v1/me/webhooks
Your webhook endpoints. Secrets are NEVER returned in this response — even with the key — so a leaked key can't forge signatures.
Low-balance alerts
jsys fires alerts when your wallet enters a configurable danger zone. Two tiers — WARNING (early warning at 10% above the threshold) and CRITICAL (below the threshold) — with state-based cooldowns and a per-day quota.
Webhook events
Subscribe one of your webhook endpoints to:
wallet.low_balance.warning— balance dropped into the [threshold, threshold × 110%] band.wallet.low_balance.critical— balance dropped below the threshold.
Webhook payload shape
Same Stripe-style envelope as order events, signed with the HMAC secret you configured on the endpoint.
{
"id": "evt_clxx…",
"event": "wallet.low_balance.critical",
"livemode": true,
"createdAt": "2026-06-10T18:01:00Z",
"data": {
"walletId": "clxx…",
"resellerId": "clxx…",
"tier": "CRITICAL",
"balanceCents": "4231",
"thresholdCents": "5000",
"currency": "USD",
"firedAt": "2026-06-10T18:01:00Z"
}
}The tier field lets a single subscriber endpoint handle both events with one switch.
Configuration
Configure thresholds, recipients, channels, max-per-day, and snooze in the portal at Wallet → Low-balance alerts. Default email recipients are all OWNER and BILLING members of your reseller; you can add extra emails (CFO, finance distro).
Cooldown semantics
- WARNING: time-based, 10 minutes. A wallet oscillating around the band fires once per active 10-minute window.
- CRITICAL: state-based. Fires once on the down-crossing; re-arms only when balance recovers above the threshold (typically after a top-up).
- maxAlertsPerDay (1–10, default 1): hard ceiling per UTC day across both tiers. The hourly sweep re-fires critical reminders while balance stays below, up to this cap.
- snoozeUntil: silences both tiers until the timestamp passes. Use the portal's "Snooze 1h / 1d" buttons or the PATCH endpoint.