REST API REFERENCE
SF PayGate REST API Reference
Standard JSON request contracts, /api-stripped HMAC-SHA256 signing rules, and sample responses for engineering teams (samples use api.example.com; live hosts are issued at onboarding).
Create Automated Deposit (POST /v2/payins)
/api/v2/payins
POST /api/v2/payins dynamically assigns the healthiest deposit channel and returns a hosted paypage_url. Note that signature middleware strips the leading /api prefix, so sign /v2/payins when calling /api/v2/payins. Code samples use api.example.com — live endpoints are issued at onboarding.
View endpoint specAutomated Managed-Queue Payouts (POST /v1/payouts)
/api/v1/payouts
POST /api/v1/payouts enforces unique merchant_ref_id idempotency keys to stop double disbursements on network retries, executes via a 24-hour managed queue, and remains queryable anytime via GET /api/v1/payouts/{id}.
View endpoint specSubmit Transfer Slip Fallback (POST /v1/payins/:id/slip)
/api/v1/payins/{id}/slip
POST /api/v1/payins/{id}/slip acts as the third independent confirmation layer: it verifies the slip's embedded bank QR payload against bank records and stores its cryptographic hash so the same slip can never be reused — never relying on OCR.
View endpoint specBind Customer Bank Account (Sender Verification)
/api/v1/customers/{id}/accounts
Registering a customer's bank account returns a UUIDv7 customer_account_id referenced in both POST /api/v2/payins and POST /api/v1/payouts — enforcing sender-to-order matching and blocking third-party transfers.
View endpoint specOn-Demand Settlement & Org Transfers (POST /v1/settlements)
/api/v1/settlements
POST /api/v1/settlements moves platform balances to your designated corporate bank account on demand with zero T+1/T+2 batch lockups. Check GET /api/me/balances and GET /api/me/limits before committing, and track anytime by settlement id (Dashboard USDT TRC20 window runs daily 14:00 – 22:00 UTC+7).
View endpoint specBalances, Limits, Order Cancel & Issue Tracking
/api/me/balances · /me/limits · /me/issues
Operational endpoints give finance and backoffice systems programmatic visibility: GET /api/me/balances (balance per currency), GET /api/me/limits (transaction and settlement limits), POST /api/v2/payins/{id}/cancel (cancel a pending payin), and /api/me/issues (raise and track operational issues).
View endpoint specWebhook Signature Verification & Idempotency (HMAC-SHA256)
X-Signature (HMAC-SHA256)
SF PayGate delivers and retries webhooks until your server answers HTTP 200. Because X-Signature is computed over the exact raw request body, re-serialising parsed JSON will not match — always verify raw bytes with timingSafeEqual, check X-Timestamp freshness, and deduplicate by transaction id.
View endpoint spec