slip2pay Public API
Version: 0.1.1 (W0-A, 2026-09-28; domain slip2pay.com confirmed)
Thai bank-slip verification API. Customers call these endpoints with an API key created in the
slip2pay dashboard. Implemented by B4 (publicapi/); consumed by customers, F2 (docs page) and D1.
Authentication
Authorization: Bearer sk_live_<40 base62 chars> (48 chars total). The first 12 characters
(sk_live_XXXX) are the visible key prefix shown in the dashboard and logs; the rest is secret and
shown only once at creation. We store only an HMAC-SHA256 of the key. sk_test_ is reserved for a
future sandbox mode and is rejected with INVALID_API_KEY in v0.1.
Envelope
Every response: { "success": bool, "data": object|null, "error": {code, message, details?}|null }.
success is true only for code OK. Branch on error.code (see error-codes.md), never on message.
Header X-Request-Id is on every response.
Money and time
All money is an integer number of satang (1 THB = 100 satang) in fields ending with Satang.
All timestamps are ISO-8601 with offset. Slip transfer times are returned in Asia/Bangkok (+07:00).
Credit charging
Each chargeable verification consumes 1 credit. Charged: OK, RECEIVER_MISMATCH, AMOUNT_MISMATCH,
DATE_MISMATCH, and — by default, configurable — SLIP_NOT_FOUND and SLIP_FRAUD. Never charged:
duplicates of a slip you already verified, input errors, INSUFFICIENT_CREDIT, upstream outages
(UPSTREAM_UNAVAILABLE). data.charged tells you what happened for each call.
Duplicate handling
Every slip (identified by its bank transRef) is verified at the bank only once per customer account.
Repeat submissions are answered from our records for free. With checkDuplicate: true a repeat returns
409 SLIP_DUPLICATE; with checkDuplicate: false (default) it returns 200 OK with data.duplicate: true.
Images
Accepted: JPEG or PNG (checked by magic bytes, not by extension), ≤ 4 MiB after base64 decoding,
≤ 25 megapixels. The slip must contain the bank's QR code; we decode it ourselves and reject images
without a slip QR (QR_NOT_FOUND, free) before contacting any bank provider.
imageUrl rules (SSRF protection)
-
httpsonly, default port 443 only, no userinfo (user:pass@), length ≤ 2048, host must be a DNS name (IP-literal hosts are rejected). - The host is resolved once; every resolved address must be public unicast. Rejected ranges include 0.0.0.0/8, 10.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.0.0.0/24, 192.168.0.0/16, 198.18.0.0/15, 224.0.0.0/4, 240.0.0.0/4, ::/128, ::1/128, fc00::/7, fe80::/10, ::ffff:0:0/96 mapped private addresses, and 64:ff9b::/96 mapped private addresses.
- The connection is made to the validated IP (no second DNS lookup — prevents DNS rebinding), with SNI/Host set to the original host.
- At most 2 redirects, each target re-validated with the same rules.
- Connect timeout 3 s, total download 10 s, body streamed and aborted beyond 4 MiB.
- Response must be HTTP 200 with
Content-Typeimage/jpeg or image/png and matching magic bytes. - No cookies, no auth headers, fixed
User-Agent: slip2pay-fetcher/1. The URL is never sent to upstream providers.
Rate limits
Per member (all keys combined), default 600 requests/minute (admin-configurable). Headers:
X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset (epoch seconds). Exceeding returns
429 RATE_LIMITED with Retry-After.