Skip to content

Bank Account Management

Manage bank accounts that are linked to your branches. Bank accounts determine which payment recipients are verified by the slip verification API.

List Banks

Retrieve a list of all supported banks.

http
GET /b2b/banks

Full URL: https://api-partners.easyslip.com/v2/b2b/banks

Permission: bank-account:read

Examples

bash
curl -X GET https://api-partners.easyslip.com/v2/b2b/banks \
  -H "X-API-Key: ${API_KEY}" \
  -H "X-Timestamp: ${TIMESTAMP}" \
  -H "X-Nonce: ${NONCE}" \
  -H "X-Signature: ${SIGNATURE}"
javascript
const headers = signRequest({
    method: 'GET',
    path: '/b2b/banks',
    body: null,
    apiKey: 'your_api_key',
    secretKey: 'your_secret_key',
})

const response = await fetch('https://api-partners.easyslip.com/v2/b2b/banks', { headers })
const result = await response.json()

Success Response (200)

json
{
    "success": true,
    "data": [
        {
            "code": "002",
            "nameEn": "Bangkok Bank",
            "nameTh": "ธนาคารกรุงเทพ",
            "shortCode": "BBL",
            "swiftCode": "BKKBTHBK",
            "extraVerify": [
                { "value": "NAME", "label": "ตรวจจาก ชื่อบัญชี อย่างเดียว (ไม่แนะนำ)" },
                { "value": "NUMBER", "label": "ตรวจจาก เลขบัญชี อย่างเดียว" },
                { "value": "NAME_NUMBER", "label": "ตรวจจาก เลขบัญชีและชื่อบัญชีธนาคาร" }
            ]
        },
        {
            "code": "PROMPTPAY",
            "nameEn": "PromptPay",
            "nameTh": "พร้อมเพย์",
            "shortCode": "PROMPTPAY",
            "swiftCode": "PROMPTPAY",
            "extraVerify": [
                { "value": "MSISDN", "label": "เบอร์โทรศัพท์" },
                { "value": "NATID", "label": "เลขบัตรประชาชน" },
                { "value": "EWALLETID", "label": "E-Wallet ID" }
            ]
        },
        {
            "code": "KSHOP",
            "nameEn": "KShop",
            "nameTh": "เคช็อป",
            "shortCode": "KSHOP",
            "swiftCode": "KSHOP",
            "extraVerify": null
        }
    ]
}

Response Fields

FieldTypeDescription
codestringBank code
nameEnstringBank name in English
nameThstringBank name in Thai
shortCodestringBank short code
swiftCodestringSWIFT code
extraVerifyarray | nullExtra verification options, null if not required
extraVerify[].valuestringValue to use when creating a bank account
extraVerify[].labelstringDisplay label

List Linked Bank Accounts

http
GET /b2b/branch/bank-accounts

Full URL: https://api-partners.easyslip.com/v2/b2b/branch/bank-accounts

Permission: bank-account:read

Required Header: X-Branch-Key (Branch UUID)

Examples

bash
curl -X GET https://api-partners.easyslip.com/v2/b2b/branch/bank-accounts \
  -H "X-API-Key: ${API_KEY}" \
  -H "X-Branch-Key: ${BRANCH_KEY}" \
  -H "X-Timestamp: ${TIMESTAMP}" \
  -H "X-Nonce: ${NONCE}" \
  -H "X-Signature: ${SIGNATURE}"
javascript
const headers = signRequest({
    method: 'GET',
    path: '/b2b/branch/bank-accounts',
    body: null,
    apiKey: 'your_api_key',
    secretKey: 'your_secret_key',
})
headers['X-Branch-Key'] = 'your_branch_key'

const response = await fetch('https://api-partners.easyslip.com/v2/b2b/branch/bank-accounts', { headers })
const result = await response.json()

Success Response (200)

json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "bankCode": "004",
            "bankNumber": "123-4-56789-0",
            "nameTh": "บริษัท อีซี่สลิป จำกัด",
            "nameEn": "EasySlip Co., Ltd.",
            "type": "NATURAL",
            "extraVerify": "NAME_NUMBER",
            "bank": {
                "code": "004",
                "nameTh": "ธนาคารกสิกรไทย",
                "nameEn": "Kasikorn Bank",
                "shortCode": "KBANK"
            }
        },
        {
            "id": 2,
            "bankCode": "PROMPTPAY",
            "bankNumber": "0812345678",
            "nameTh": "บริษัท อีซี่สลิป จำกัด",
            "nameEn": "EasySlip Co., Ltd.",
            "type": "JURISTIC",
            "extraVerify": "MSISDN",
            "bank": {
                "code": "PROMPTPAY",
                "nameTh": "พร้อมเพย์",
                "nameEn": "PromptPay",
                "shortCode": "PROMPTPAY"
            }
        }
    ]
}

Response Fields

FieldTypeDescription
idnumberBank account ID
bankCodestringBank code (see List Banks)
bankNumberstringAccount number
nameThstringAccount holder name in Thai
nameEnstringAccount holder name in English
typestringAccount type (NATURAL, JURISTIC)
extraVerifystring | nullExtra verification value (e.g. MSISDN, NATID), null if not applicable
bankobjectBank details
bank.codestringBank code
bank.nameThstringBank name in Thai
bank.nameEnstringBank name in English
bank.shortCodestringBank short code

Link one or more existing bank accounts to a branch.

http
POST /b2b/branch/bank-accounts

Full URL: https://api-partners.easyslip.com/v2/b2b/branch/bank-accounts

Permission: bank-account:write

Required Header: X-Branch-Key (Branch UUID)

Request Body

FieldTypeRequiredDescription
bankAccountIdsnumber[]YesArray of bank account IDs to link

Examples

bash
curl -X POST https://api-partners.easyslip.com/v2/b2b/branch/bank-accounts \
  -H "Content-Type: application/json" \
  -H "X-API-Key: ${API_KEY}" \
  -H "X-Branch-Key: ${BRANCH_KEY}" \
  -H "X-Timestamp: ${TIMESTAMP}" \
  -H "X-Nonce: ${NONCE}" \
  -H "X-Signature: ${SIGNATURE}" \
  -d '{
    "bankAccountIds": [1, 2]
  }'
javascript
const body = {
    bankAccountIds: [1, 2],
}

const headers = signRequest({
    method: 'POST',
    path: '/b2b/branch/bank-accounts',
    body,
    apiKey: 'your_api_key',
    secretKey: 'your_secret_key',
})
headers['X-Branch-Key'] = 'your_branch_key'

const response = await fetch('https://api-partners.easyslip.com/v2/b2b/branch/bank-accounts', {
    method: 'POST',
    headers,
    body: JSON.stringify(body),
})
const result = await response.json()

Success Response (200)

json
{
    "success": true,
    "data": {
        "linked": 2,
        "bankAccounts": [
            {
                "id": 1,
                "bankCode": "014",
                "bankNumber": "987-6-54321-0",
                "nameTh": "บริษัท อีซี่สลิป จำกัด",
                "nameEn": "EasySlip Co., Ltd."
            },
            {
                "id": 2,
                "bankCode": "025",
                "bankNumber": "456-7-89012-3",
                "nameTh": "บริษัท อีซี่สลิป จำกัด",
                "nameEn": "EasySlip Co., Ltd."
            }
        ]
    }
}

http
DELETE /b2b/branch/bank-accounts/:bankAccountId

Full URL: https://api-partners.easyslip.com/v2/b2b/branch/bank-accounts/:bankAccountId

Permission: bank-account:write

Required Header: X-Branch-Key (Branch UUID)

Examples

bash
curl -X DELETE https://api-partners.easyslip.com/v2/b2b/branch/bank-accounts/1 \
  -H "X-API-Key: ${API_KEY}" \
  -H "X-Branch-Key: ${BRANCH_KEY}" \
  -H "X-Timestamp: ${TIMESTAMP}" \
  -H "X-Nonce: ${NONCE}" \
  -H "X-Signature: ${SIGNATURE}"
javascript
const headers = signRequest({
    method: 'DELETE',
    path: '/b2b/branch/bank-accounts/1',
    body: null,
    apiKey: 'your_api_key',
    secretKey: 'your_secret_key',
})
headers['X-Branch-Key'] = 'your_branch_key'

const response = await fetch(
    'https://api-partners.easyslip.com/v2/b2b/branch/bank-accounts/1',
    { method: 'DELETE', headers }
)
const result = await response.json()

Success Response (200)

json
{
    "success": true,
    "data": {
        "unlinked": true,
        "bankAccountId": 1,
        "branchId": 1
    }
}

Create a Bank Account

Create a new bank account that can be linked to branches.

http
POST /b2b/bank-accounts

Full URL: https://api-partners.easyslip.com/v2/b2b/bank-accounts

Permission: bank-account:write

TIP

Use the List Banks endpoint to check which banks require extraVerify. If a bank has extraVerify options, you must provide one of the valid values when creating the bank account.

Request Body

FieldTypeRequiredDescription
bankCodestringYesBank code (see List Banks)
bankNumberstringYesAccount number
nameThstringYesAccount holder name in Thai
nameEnstringYesAccount holder name in English
typestringYesAccount type: NATURAL or JURISTIC
extraVerifystringConditionalRequired if the bank has extraVerify options. Must match one of the value fields from List Banks

Examples

bash
curl -X POST https://api-partners.easyslip.com/v2/b2b/bank-accounts \
  -H "Content-Type: application/json" \
  -H "X-API-Key: ${API_KEY}" \
  -H "X-Timestamp: ${TIMESTAMP}" \
  -H "X-Nonce: ${NONCE}" \
  -H "X-Signature: ${SIGNATURE}" \
  -d '{
    "bankCode": "002",
    "bankNumber": "111-2-33444-5",
    "nameTh": "บริษัท ตัวอย่าง จำกัด",
    "nameEn": "Example Co., Ltd.",
    "type": "NATURAL",
    "extraVerify": "NAME_NUMBER"
  }'
javascript
const body = {
    bankCode: '002',
    bankNumber: '111-2-33444-5',
    nameTh: 'บริษัท ตัวอย่าง จำกัด',
    nameEn: 'Example Co., Ltd.',
    type: 'NATURAL',
    extraVerify: 'NAME_NUMBER',
}

const headers = signRequest({
    method: 'POST',
    path: '/b2b/bank-accounts',
    body,
    apiKey: 'your_api_key',
    secretKey: 'your_secret_key',
})

const response = await fetch('https://api-partners.easyslip.com/v2/b2b/bank-accounts', {
    method: 'POST',
    headers,
    body: JSON.stringify(body),
})
const result = await response.json()

Success Response (201)

json
{
    "success": true,
    "data": {
        "id": 3,
        "bankCode": "002",
        "bankNumber": "111-2-33444-5",
        "nameTh": "บริษัท ตัวอย่าง จำกัด",
        "nameEn": "Example Co., Ltd.",
        "type": "NATURAL",
        "extraVerify": "NAME_NUMBER",
        "bank": {
            "code": "002",
            "nameTh": "ธนาคารกรุงเทพ",
            "nameEn": "Bangkok Bank",
            "shortCode": "BBL"
        }
    }
}

Response Fields

FieldTypeDescription
idnumberBank account ID
bankCodestringBank code
bankNumberstringAccount number
nameThstringAccount holder name in Thai
nameEnstringAccount holder name in English
typestringAccount type (NATURAL, JURISTIC)
extraVerifystring | nullExtra verification value, null if not applicable
bankobjectBank details
bank.codestringBank code
bank.nameThstringBank name in Thai
bank.nameEnstringBank name in English
bank.shortCodestringBank short code

Update a Bank Account

Update an existing bank account. Fields that are not sent retain their existing values.

http
PATCH /b2b/bank-accounts/:bankAccountId

Full URL: https://api-partners.easyslip.com/v2/b2b/bank-accounts/:bankAccountId

Permission: bank-account:write

TIP

If you change bankCode to a bank that requires extraVerify, you must also provide a valid extraVerify value. If you change to a bank that does not require extraVerify, the field will be cleared automatically.

Request Body

FieldTypeRequiredDescription
bankCodestringNoNew bank code (see List Banks)
bankNumberstringNoNew account number
nameThstringNoAccount holder name in Thai
nameEnstringNoAccount holder name in English
typestringNoAccount type: NATURAL or JURISTIC
extraVerifystring | nullConditionalExtra verification value. Send null to clear

At least one field is required.

Examples

bash
curl -X PATCH https://api-partners.easyslip.com/v2/b2b/bank-accounts/3 \
  -H "Content-Type: application/json" \
  -H "X-API-Key: ${API_KEY}" \
  -H "X-Timestamp: ${TIMESTAMP}" \
  -H "X-Nonce: ${NONCE}" \
  -H "X-Signature: ${SIGNATURE}" \
  -d '{
    "nameTh": "บริษัท ตัวอย่างใหม่ จำกัด",
    "nameEn": "New Example Co., Ltd.",
    "extraVerify": "NAME_NUMBER"
  }'
javascript
const body = {
    nameTh: 'บริษัท ตัวอย่างใหม่ จำกัด',
    nameEn: 'New Example Co., Ltd.',
    extraVerify: 'NAME_NUMBER',
}

const headers = signRequest({
    method: 'PATCH',
    path: '/b2b/bank-accounts/3',
    body,
    apiKey: 'your_api_key',
    secretKey: 'your_secret_key',
})

const response = await fetch('https://api-partners.easyslip.com/v2/b2b/bank-accounts/3', {
    method: 'PATCH',
    headers,
    body: JSON.stringify(body),
})
const result = await response.json()

Success Response (200)

json
{
    "success": true,
    "data": {
        "id": 3,
        "bankCode": "002",
        "bankNumber": "111-2-33444-5",
        "nameTh": "บริษัท ตัวอย่างใหม่ จำกัด",
        "nameEn": "New Example Co., Ltd.",
        "type": "NATURAL",
        "extraVerify": "NAME_NUMBER",
        "bank": {
            "code": "002",
            "nameTh": "ธนาคารกรุงเทพ",
            "nameEn": "Bangkok Bank",
            "shortCode": "BBL"
        }
    },
    "message": "Bank account updated successfully"
}

Additional Errors

No Update Data (400)

json
{
    "success": false,
    "error": {
        "code": "NO_UPDATE_DATA",
        "message": "At least one field is required to update"
    }
}

Delete a Bank Account

Permanently delete a bank account. This will also automatically unlink it from all branches.

http
DELETE /b2b/bank-accounts/:bankAccountId

Full URL: https://api-partners.easyslip.com/v2/b2b/bank-accounts/:bankAccountId

Permission: bank-account:write

WARNING

Deleting a bank account will automatically remove all branch links associated with it. This action cannot be undone.

Examples

bash
curl -X DELETE https://api-partners.easyslip.com/v2/b2b/bank-accounts/3 \
  -H "X-API-Key: ${API_KEY}" \
  -H "X-Timestamp: ${TIMESTAMP}" \
  -H "X-Nonce: ${NONCE}" \
  -H "X-Signature: ${SIGNATURE}"
javascript
const headers = signRequest({
    method: 'DELETE',
    path: '/b2b/bank-accounts/3',
    body: null,
    apiKey: 'your_api_key',
    secretKey: 'your_secret_key',
})

const response = await fetch(
    'https://api-partners.easyslip.com/v2/b2b/bank-accounts/3',
    { method: 'DELETE', headers }
)
const result = await response.json()

Success Response (200)

json
{
    "success": true,
    "data": null,
    "message": "Bank account deleted successfully"
}

Error Responses

Bank Not Found (404)

json
{
    "success": false,
    "error": {
        "code": "BANK_NOT_FOUND",
        "message": "Bank not found"
    }
}

Bank Account Not Found (404)

json
{
    "success": false,
    "error": {
        "code": "BANK_ACCOUNT_NOT_FOUND",
        "message": "Bank account not found"
    }
}

Extra Verify Required (400)

Returned when the bank requires extraVerify but it was not provided.

json
{
    "success": false,
    "error": {
        "code": "EXTRA_VERIFY_REQUIRED",
        "message": "Extra verification is required for this bank"
    }
}

Extra Verify Invalid (400)

Returned when the extraVerify value does not match any of the bank's options.

json
{
    "success": false,
    "error": {
        "code": "EXTRA_VERIFY_INVALID",
        "message": "Invalid extra verification value"
    }
}

Bank Slip Verification API for Thai Banking