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 (v1 only)
  • QR Code Generation - Generate PromptPay and merchant QR codes (v1 only)
  • 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: Choose Your API Version

EasySlip offers two API versions:

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

API v1 (Legacy)

  • Base URL: https://developer.easyslip.com/api/v1
  • TrueMoney Wallet verification
  • QR Code generation
  • Stable and well-tested

TIP

For new projects, we recommend API v2 for its improved features and consistency.

Step 4: Make Your First API Call

Using cURL

bash
curl -X POST https://api.easyslip.com/v2/verify/bank \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"payload": "YOUR_QR_PAYLOAD"}'

Using JavaScript

javascript
const response = await fetch('https://api.easyslip.com/v2/verify/bank', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    payload: 'YOUR_QR_PAYLOAD'
  })
});

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
$apiKey = 'YOUR_API_KEY';
$payload = 'YOUR_QR_PAYLOAD';

$ch = curl_init();
curl_setopt_array($ch, [
    CURLOPT_URL => 'https://api.easyslip.com/v2/verify/bank',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json'
    ],
    CURLOPT_POSTFIELDS => json_encode(['payload' => $payload])
]);

$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
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