ข้ามไปยังเนื้อหาหลัก
v0.1
OpenAPI 3.1.0

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)

  • https only, 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-Type image/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.

Production (placeholder host)

Client Libraries

Verify

​

Verify a Thai bank-transfer slip

​

Provide exactly one input: payload (QR string decoded by you), imageBase64, or imageUrl (JSON body), or an image file (multipart). Optional conditions are evaluated against the verified slip.

Headers

  • Optional client correlation id (≤ 64 chars [A-Za-z0-9_-]). Echoed back; replaced if invalid.

Body·

required
  • Exactly one of payload, imageBase64, imageUrl.

    Exactly one of payload, imageBase64, imageUrl.

      • Raw text of the slip's QR code.

      • If true, a slip you already verified returns 409 SLIP_DUPLICATE instead of 200 with duplicate=true. Either way it is free.

      • All conditions are optional. Result code priority if several fail: RECEIVER_MISMATCH > AMOUNT_MISMATCH > DATE_MISMATCH.

        Properties: 4

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/v1/verify/bank
curl https://api.slip2pay.com/v1/verify/bank \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "payload": "0041000600000101030040220014242082547BPM049885102TH91049A1F",
  "checkDuplicate": true,
  "conditions": {
    "receivers": [
      {
        "accountType": "01004",
        "accountNumber": "1234567890"
      }
    ],
    "amount": {
      "op": "eq",
      "valueSatang": 150000
    },
    "date": {
      "op": "gte",
      "value": "2026-09-28T00:00:00+07:00"
    }
  }
}'
Verified, all conditions pass, charged
{
  "success": true,
  "data": {
    "verificationId": "0192a3c5-1111-7000-8000-00000000a001",
    "resultCode": "OK",
    "charged": true,
    "duplicate": false,
    "slipId": "0192a3c5-2222-7000-8000-00000000b001",
    "slip": {
      "slipType": "BANK",
      "transRef": "014242082547BPM04988",
      "transferredAt": "2026-09-28T14:05:31+07:00",
      "amountSatang": 150000,
      "sender": {
        "bankCode": "014",
        "bankName": "ธนาคารไทยพาณิชย์",
        "name": "นาย สมชาย ใ",
        "accountMasked": "xxx-x-x9866-x",
        "proxyType": null,
        "proxyAccountMasked": null
      },
      "receiver": {
        "bankCode": "004",
        "bankName": "ธนาคารกสิกรไทย",
        "name": "บริษัท ร้านค้า จำกัด",
        "accountMasked": "xxx-x-x5366-x",
        "proxyType": null,
        "proxyAccountMasked": null
      },
      "ref1": null,
      "ref2": null,
      "ref3": null
    },
    "conditions": {
      "receiver": "PASS",
      "amount": "PASS",
      "date": "PASS"
    },
    "credit": {
      "available": 841
    }
  },
  "error": null
}

Verify a TrueMoney Wallet slip image

​

Image input only (imageBase64, imageUrl, or multipart image). Returns 503 FEATURE_UNAVAILABLE while no enabled provider supports TrueWallet (Slip2Go has no TrueWallet endpoint; see Decisions). Receiver conditions for wallets use accountType: "04000" with accountNumber = wallet phone/id.

Headers

  • Optional client correlation id (≤ 64 chars [A-Za-z0-9_-]). Echoed back; replaced if invalid.

Body·

required
  • Exactly one of imageBase64, imageUrl.

    Exactly one of imageBase64, imageUrl.

      • If true, a slip you already verified returns 409 SLIP_DUPLICATE instead of 200 with duplicate=true. Either way it is free.

      • All conditions are optional. Result code priority if several fail: RECEIVER_MISMATCH > AMOUNT_MISMATCH > DATE_MISMATCH.

        Properties: 4

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/v1/verify/truewallet
curl https://api.slip2pay.com/v1/verify/truewallet \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "checkDuplicate": false,
  "conditions": {
    "receivers": [
      {
        "accountType": "01004",
        "accountNumber": "",
        "accountNameTh": "",
        "accountNameEn": ""
      }
    ],
    "useSavedReceivers": false,
    "amount": {
      "op": "eq",
      "valueSatang": 0
    },
    "date": {
      "op": "eq",
      "value": ""
    }
  },
  "imageBase64": ""
}'
Verified, all conditions pass, charged
{
  "success": true,
  "data": {
    "verificationId": "0192a3c5-1111-7000-8000-00000000a001",
    "resultCode": "OK",
    "charged": true,
    "duplicate": false,
    "slipId": "0192a3c5-2222-7000-8000-00000000b001",
    "slip": {
      "slipType": "BANK",
      "transRef": "014242082547BPM04988",
      "transferredAt": "2026-09-28T14:05:31+07:00",
      "amountSatang": 150000,
      "sender": {
        "bankCode": "014",
        "bankName": "ธนาคารไทยพาณิชย์",
        "name": "นาย สมชาย ใ",
        "accountMasked": "xxx-x-x9866-x",
        "proxyType": null,
        "proxyAccountMasked": null
      },
      "receiver": {
        "bankCode": "004",
        "bankName": "ธนาคารกสิกรไทย",
        "name": "บริษัท ร้านค้า จำกัด",
        "accountMasked": "xxx-x-x5366-x",
        "proxyType": null,
        "proxyAccountMasked": null
      },
      "ref1": null,
      "ref2": null,
      "ref3": null
    },
    "conditions": {
      "receiver": "PASS",
      "amount": "PASS",
      "date": "PASS"
    },
    "credit": {
      "available": 841
    }
  },
  "error": null
}

Get a slip you previously verified

​

Free (no credit, no upstream call). Returns 404 RESOURCE_NOT_FOUND for unknown ids and for slips of other members.

Path Parameters

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/v1/slips/{slipId}
curl https://api.slip2pay.com/v1/slips/123e4567-e89b-12d3-a456-426614174000 \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "success": true,
  "data": {
    "slipType": "BANK",
    "transRef": "string",
    "transferredAt": "2026-09-29T13:45:35.035Z",
    "amountSatang": 0,
    "sender": {
      "bankCode": null,
      "bankName": null,
      "name": null,
      "accountMasked": "xxx-x-x5366-x",
      "proxyType": "NATID",
      "proxyAccountMasked": null
    },
    "receiver": {
      "bankCode": null,
      "bankName": null,
      "name": null,
      "accountMasked": "xxx-x-x5366-x",
      "proxyType": "NATID",
      "proxyAccountMasked": null
    },
    "ref1": null,
    "ref2": null,
    "ref3": null,
    "slipId": "123e4567-e89b-12d3-a456-426614174000",
    "firstVerifiedAt": "2026-09-29T13:45:35.035Z",
    "dedupeHits": 1
  },
  "error": {
    "code": "SLIP_NOT_FOUND",
    "message": "string",
    "details": [
      {
        "field": "string",
        "issue": "string"
      }
    ]
  }
}

Account (Collapsed)

​
Account Operations

Models