v1.0Last updated: Mar 2026

API Documentation

Complete guide to integrating Thai bank slip verification into your application. Verify transfers instantly with our powerful API.

Dokmai Slip API

Verify Thai bank transfer slips through Dokmai Slip.

Dokmai Slip may use multiple verification providers internally for reliability, but provider identities are not exposed in the public API contract.

Base URL

Canonical production base URL:

https://api.dokmaistore.com/api/dokmaiservice/v1/slip

Compatibility base URL (same contract):

https://www.dokmaistore.com/api/dokmaiservice/v1/slip

Authentication

Use API key authentication:

x-dokmai-api-key: your_api_key_here

API keys are created from the Dokmai Slip dashboard: https://slip.dokmai.app/dashboard/keys

First-party Dokmai flows may also use buyer JWT, but third-party integrations should use x-dokmai-api-key.

Response Format

Success:

{
  "success": true,
  "data": {},
  "meta": {},
  "requestId": "optional_or_present"
}

Error:

{
  "success": false,
  "error": {
    "code": "ERROR_CODE",
    "message": "Human readable message",
    "details": {}
  },
  "requestId": "..."
}

Endpoints

GET /

Returns supported verification methods.

POST /verify

Verifies slip image.

Request:

POST /api/dokmaiservice/v1/slip/verify
Content-Type: multipart/form-data
x-dokmai-api-key: your_api_key_here

slipImage: <file>

Parameters:

ParameterTypeRequiredDescription
slipImageFileYesSlip image file

Optional cache behavior controls:

  • Header: x-dokmai-return-cached: false
  • Query: ?returnCached=false

Default behavior (returnCached=true): if the same slip hash was already verified, Dokmai Slip returns cached verified data and meta.creditsUsed is 0.

Strict one-time behavior (returnCached=false): reused slip returns DUPLICATE_SLIP.

GET /history

Returns verification usage history for the authenticated owner/key.

Query parameters:

ParameterTypeDefaultNotes
limitinteger100min 1, max 1000
offsetinteger0min 0, max 10000
statusstring-success or error
startDateISO date-inclusive
endDateISO date-inclusive
keyIdObjectId-must belong to authenticated owner

GET /me

Returns metadata for the API key in x-dokmai-api-key.

apiKey query parameter is rejected for security reasons.

One Slip, One Use

Dokmai Slip enforces one-time use at verification identity level (for example transaction reference / decode / QR identity), not just by raw image hash. A slip that was already used is rejected as duplicate.

Error Codes

CodeHTTPMeaning
UNAUTHORIZED401Missing/invalid API key or missing verify permission
QUOTA_EXHAUSTED402API key credits/quota are insufficient
RATE_LIMITED429Request rate exceeded for key
INVALID_INPUT400/422Invalid input or query parameters
DUPLICATE_SLIP400Slip was already used
VERIFICATION_PENDING202Verification entry is still pending
NOT_FOUND404Requested key not found (/history?keyId=...)
FORBIDDEN403Requested key does not belong to caller/service
PROVIDER_NOT_CONFIGURED503Verification provider is not configured
NETWORK_ERROR503Provider network failure
ALL_PROVIDERS_FAILED503All provider attempts failed
INTERNAL_ERROR500Unexpected internal error

cURL Example

curl -X POST "https://api.dokmaistore.com/api/dokmaiservice/v1/slip/verify" \
  -H "x-dokmai-api-key: your_api_key_here" \
  -F "slipImage=@/path/to/slip.jpg"

Disable cached return:

curl -X POST "https://api.dokmaistore.com/api/dokmaiservice/v1/slip/verify?returnCached=false" \
  -H "x-dokmai-api-key: your_api_key_here" \
  -H "x-dokmai-return-cached: false" \
  -F "slipImage=@/path/to/slip.jpg"

Node.js Example

const form = new FormData();
form.append('slipImage', slipFile);

const response = await fetch('https://api.dokmaistore.com/api/dokmaiservice/v1/slip/verify', {
  method: 'POST',
  headers: {
    'x-dokmai-api-key': process.env.DOKMAI_SLIP_API_KEY,
  },
  body: form,
});

const result = await response.json();
if (!response.ok || !result.success) {
  throw new Error(result?.error?.message ?? 'Slip verification failed');
}

Key Management API (Owner Session)

These endpoints are session-authenticated (owner JWT/cookie), not API-key authenticated:

  • GET /api/dokmaiservice/v1/keys?service=slip
  • POST /api/dokmaiservice/v1/keys
  • GET /api/dokmaiservice/v1/keys/:keyId
  • PATCH /api/dokmaiservice/v1/keys/:keyId
  • DELETE /api/dokmaiservice/v1/keys/:keyId
  • POST /api/dokmaiservice/v1/keys/:keyId/rotate
  • POST /api/dokmaiservice/v1/keys/:keyId/topup