Skip to content

Getting Started

The EasySlip Developer API enables developers to verify Thai bank transfer slips programmatically. This guide will help you get started with integrating our API into your application.

Overview

EasySlip API provides:

  • Bank Slip Verification - Verify transfer slips from 18+ Thai banks
  • TrueMoney Wallet Verification - Verify TrueMoney wallet transfers
  • Duplicate Detection - Detect and prevent duplicate slip submissions

Prerequisites

Before you begin, you'll need:

  1. An EasySlip developer account
  2. An API key from the developer portal
  3. Basic knowledge of REST APIs

Step 1: Create an Account

  1. Visit developer.easyslip.com
  2. Click Sign Up and complete the registration
  3. Verify your email address
  4. Complete KYC verification (required for production access)

Step 2: Get Your API Key

  1. Log in to the developer portal
  2. Navigate to Applications > Create New Application
  3. Name your application and select a plan
  4. Copy your API Key from the application dashboard

Keep Your API Key Secure

Never expose your API key in client-side code or public repositories. Always use environment variables or secure key management solutions.

Step 3: API Base URL

  • Base URL: https://api.easyslip.com/v2
  • Modern, consistent response format
  • Account matching & amount validation
  • Multi-branch support
  • HMAC-SHA256 authentication

Step 4: Make Your First API Call

Using cURL

bash
# See Authentication Guide for full HMAC signing setup
curl -X POST https://api.easyslip.com/v2/verify/bank \
  -H "X-API-Key: YOUR_BRANCH_UUID" \
  -H "X-Timestamp: ${TIMESTAMP}" \
  -H "X-Nonce: ${NONCE}" \
  -H "X-Signature: ${SIGNATURE}" \
  -H "Content-Type: application/json" \
  -d '{"payload": "YOUR_QR_PAYLOAD"}'

Using JavaScript

javascript
import crypto from 'crypto'

// See Authentication Guide for signRequest() implementation
const body = { payload: 'YOUR_QR_PAYLOAD' }
const headers = signRequest({
    method: 'POST',
    path: '/verify/bank',
    body,
    apiKey: 'YOUR_BRANCH_UUID',
    secretKey: 'YOUR_SECRET_KEY',
})

const response = await fetch('https://api.easyslip.com/v2/verify/bank', {
    method: 'POST',
    headers,
    body: JSON.stringify(body),
})

const result = await response.json()

if (result.success) {
    console.log('Transaction verified:', result.data)
} else {
    console.error('Verification failed:', result.error)
}

Using PHP

php
<?php
// See Authentication Guide for signRequest() implementation
$body = ['payload' => 'YOUR_QR_PAYLOAD'];
$headers = signRequest('POST', '/verify/bank', $body, 'YOUR_BRANCH_UUID', 'YOUR_SECRET_KEY');

$ch = curl_init();
curl_setopt_array($ch, [
    CURLOPT_URL => 'https://api.easyslip.com/v2/verify/bank',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => array_merge(
        array_map(fn($k, $v) => "$k: $v", array_keys($headers), array_values($headers)),
        ['Content-Type: application/json']
    ),
    CURLOPT_POSTFIELDS => json_encode($body)
]);

$response = curl_exec($ch);
curl_close($ch);

$result = json_decode($response, true);

if ($result['success']) {
    echo "Transaction verified!";
    print_r($result['data']);
} else {
    echo "Error: " . $result['error']['message'];
}

Step 5: Handle Responses

Success Response

json
{
  "success": true,
  "data": {
    "rawSlip": {
      "payload": "00000000...",
      "transRef": "68370160657749I376388B35",
      "date": "2024-01-15T14:30:00+07:00",
      "countryCode": "TH",
      "amount": {
        "amount": 1000,
        "local": {
          "amount": 1000,
          "currency": "THB"
        }
      },
      "sender": {
        "bank": {
          "id": "004",
          "name": "กสิกรไทย",
          "short": "KBANK"
        },
        "account": {
          "name": {
            "th": "นาย ทดสอบ ระบบ",
            "en": "MR. TEST SYSTEM"
          }
        }
      },
      "receiver": {
        "bank": {
          "id": "014",
          "name": "ไทยพาณิชย์",
          "short": "SCB"
        },
        "account": {
          "name": {
            "th": "นาย รับเงิน ทดสอบ"
          }
        }
      }
    }
  },
  "message": "Bank slip verified successfully"
}

Error Response

json
{
  "success": false,
  "error": {
    "code": "SLIP_NOT_FOUND",
    "message": "The slip could not be found or is invalid"
  }
}

Next Steps

Bank Slip Verification API for Thai Banking