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 Linked Bank Accounts
http
GET /b2b/branches/:branchId/bank-accountsFull URL: https://api.easyslip.com/b2b/branches/:branchId/bank-accounts
Permission: bank-account:read
Examples
bash
curl -X GET https://api.easyslip.com/b2b/branches/cm1a2b3c4d5e6f7g8h9i0/bank-accounts \
-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/branches/cm1a2b3c4d5e6f7g8h9i0/bank-accounts',
body: null,
apiKey: 'your_api_key',
secretKey: 'your_secret_key',
})
const response = await fetch(
'https://api.easyslip.com/b2b/branches/cm1a2b3c4d5e6f7g8h9i0/bank-accounts',
{ headers }
)
const result = await response.json()Success Response (200)
json
{
"success": true,
"data": [
{
"id": "cm9z8y7x6w5v4u3t2s1r0",
"bankCode": "004",
"bankNumber": "123-4-56789-0",
"nameTh": "บริษัท อีซี่สลิป จำกัด",
"nameEn": "EasySlip Co., Ltd.",
"type": "SAVING",
"extraVerify": false,
"createdAt": "2024-03-01T09:00:00+07:00"
},
{
"id": "cm8a7b6c5d4e3f2g1h0i9",
"bankCode": "014",
"bankNumber": "987-6-54321-0",
"nameTh": "บริษัท อีซี่สลิป จำกัด",
"nameEn": "EasySlip Co., Ltd.",
"type": "CURRENT",
"extraVerify": true,
"createdAt": "2024-05-15T14:30:00+07:00"
}
]
}Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Bank account ID |
bankCode | string | Bank code (see Bank Codes) |
bankNumber | string | Account number |
nameTh | string | Account holder name in Thai |
nameEn | string | Account holder name in English |
type | string | Account type (SAVING, CURRENT) |
extraVerify | boolean | Whether extra verification is enabled |
createdAt | string | Creation timestamp (ISO 8601) |
Link Bank Accounts to Branch
Link one or more existing bank accounts to a branch.
http
POST /b2b/branches/:branchId/bank-accountsFull URL: https://api.easyslip.com/b2b/branches/:branchId/bank-accounts
Permission: bank-account:write
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
bankAccountIds | string[] | Yes | Array of bank account IDs to link |
Examples
bash
curl -X POST https://api.easyslip.com/b2b/branches/cm1a2b3c4d5e6f7g8h9i0/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 '{
"bankAccountIds": ["cm8a7b6c5d4e3f2g1h0i9", "cm7b6c5d4e3f2g1h0i9j8"]
}'javascript
const body = {
bankAccountIds: ['cm8a7b6c5d4e3f2g1h0i9', 'cm7b6c5d4e3f2g1h0i9j8'],
}
const headers = signRequest({
method: 'POST',
path: '/b2b/branches/cm1a2b3c4d5e6f7g8h9i0/bank-accounts',
body,
apiKey: 'your_api_key',
secretKey: 'your_secret_key',
})
const response = await fetch(
'https://api.easyslip.com/b2b/branches/cm1a2b3c4d5e6f7g8h9i0/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": "cm8a7b6c5d4e3f2g1h0i9",
"bankCode": "014",
"bankNumber": "987-6-54321-0",
"nameTh": "บริษัท อีซี่สลิป จำกัด",
"nameEn": "EasySlip Co., Ltd."
},
{
"id": "cm7b6c5d4e3f2g1h0i9j8",
"bankCode": "025",
"bankNumber": "456-7-89012-3",
"nameTh": "บริษัท อีซี่สลิป จำกัด",
"nameEn": "EasySlip Co., Ltd."
}
]
}
}Unlink a Bank Account from Branch
http
DELETE /b2b/branches/:branchId/bank-accounts/:bankAccountIdFull URL: https://api.easyslip.com/b2b/branches/:branchId/bank-accounts/:bankAccountId
Permission: bank-account:write
Examples
bash
curl -X DELETE https://api.easyslip.com/b2b/branches/cm1a2b3c4d5e6f7g8h9i0/bank-accounts/cm8a7b6c5d4e3f2g1h0i9 \
-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/branches/cm1a2b3c4d5e6f7g8h9i0/bank-accounts/cm8a7b6c5d4e3f2g1h0i9',
body: null,
apiKey: 'your_api_key',
secretKey: 'your_secret_key',
})
const response = await fetch(
'https://api.easyslip.com/b2b/branches/cm1a2b3c4d5e6f7g8h9i0/bank-accounts/cm8a7b6c5d4e3f2g1h0i9',
{ method: 'DELETE', headers }
)
const result = await response.json()Success Response (200)
json
{
"success": true,
"data": {
"unlinked": true,
"bankAccountId": "cm8a7b6c5d4e3f2g1h0i9",
"branchId": "cm1a2b3c4d5e6f7g8h9i0"
}
}Create a Bank Account
Create a new bank account that can be linked to branches.
http
POST /b2b/bank-accountsFull URL: https://api.easyslip.com/b2b/bank-accounts
Permission: bank-account:write
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
bankCode | string | Yes | Bank code (see Bank Codes) |
bankNumber | string | Yes | Account number |
nameTh | string | Yes | Account holder name in Thai |
nameEn | string | Yes | Account holder name in English |
type | string | Yes | Account type: SAVING or CURRENT |
extraVerify | boolean | No | Enable extra verification (default: false) |
Examples
bash
curl -X POST https://api.easyslip.com/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": "SAVING",
"extraVerify": false
}'javascript
const body = {
bankCode: '002',
bankNumber: '111-2-33444-5',
nameTh: 'บริษัท ตัวอย่าง จำกัด',
nameEn: 'Example Co., Ltd.',
type: 'SAVING',
extraVerify: false,
}
const headers = signRequest({
method: 'POST',
path: '/b2b/bank-accounts',
body,
apiKey: 'your_api_key',
secretKey: 'your_secret_key',
})
const response = await fetch('https://api.easyslip.com/b2b/bank-accounts', {
method: 'POST',
headers,
body: JSON.stringify(body),
})
const result = await response.json()Success Response (201)
json
{
"success": true,
"data": {
"id": "cm6d5e4f3g2h1i0j9k8l7",
"bankCode": "002",
"bankNumber": "111-2-33444-5",
"nameTh": "บริษัท ตัวอย่าง จำกัด",
"nameEn": "Example Co., Ltd.",
"type": "SAVING",
"extraVerify": false,
"createdAt": "2025-01-10T12:00:00+07:00"
}
}Error Responses
Bank Account Not Found (404)
json
{
"success": false,
"error": {
"code": "BANK_ACCOUNT_NOT_FOUND",
"message": "Bank account not found"
}
}Duplicate Bank Account (409)
json
{
"success": false,
"error": {
"code": "DUPLICATE_BANK_ACCOUNT",
"message": "A bank account with this number already exists"
}
}