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.
GET /b2b/banksFull URL: https://api-partners.easyslip.com/v2/b2b/banks
Permission: bank-account:read
Examples
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}"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)
{
"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
| Field | Type | Description |
|---|---|---|
code | string | Bank code |
nameEn | string | Bank name in English |
nameTh | string | Bank name in Thai |
shortCode | string | Bank short code |
swiftCode | string | SWIFT code |
extraVerify | array | null | Extra verification options, null if not required |
extraVerify[].value | string | Value to use when creating a bank account |
extraVerify[].label | string | Display label |
List Linked Bank Accounts
GET /b2b/branch/bank-accountsFull URL: https://api-partners.easyslip.com/v2/b2b/branch/bank-accounts
Permission: bank-account:read
Required Header: X-Branch-Key (Branch UUID)
Examples
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}"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)
{
"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
| Field | Type | Description |
|---|---|---|
id | number | Bank account ID |
bankCode | string | Bank code (see List Banks) |
bankNumber | string | Account number |
nameTh | string | Account holder name in Thai |
nameEn | string | Account holder name in English |
type | string | Account type (NATURAL, JURISTIC) |
extraVerify | string | null | Extra verification value (e.g. MSISDN, NATID), null if not applicable |
bank | object | Bank details |
bank.code | string | Bank code |
bank.nameTh | string | Bank name in Thai |
bank.nameEn | string | Bank name in English |
bank.shortCode | string | Bank short code |
Link Bank Accounts to Branch
Link one or more existing bank accounts to a branch.
POST /b2b/branch/bank-accountsFull URL: https://api-partners.easyslip.com/v2/b2b/branch/bank-accounts
Permission: bank-account:write
Required Header: X-Branch-Key (Branch UUID)
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
bankAccountIds | number[] | Yes | Array of bank account IDs to link |
Examples
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]
}'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)
{
"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."
}
]
}
}Unlink a Bank Account from Branch
DELETE /b2b/branch/bank-accounts/:bankAccountIdFull URL: https://api-partners.easyslip.com/v2/b2b/branch/bank-accounts/:bankAccountId
Permission: bank-account:write
Required Header: X-Branch-Key (Branch UUID)
Examples
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}"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)
{
"success": true,
"data": {
"unlinked": true,
"bankAccountId": 1,
"branchId": 1
}
}Create a Bank Account
Create a new bank account that can be linked to branches.
POST /b2b/bank-accountsFull 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
| Field | Type | Required | Description |
|---|---|---|---|
bankCode | string | Yes | Bank code (see List Banks) |
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: NATURAL or JURISTIC |
extraVerify | string | Conditional | Required if the bank has extraVerify options. Must match one of the value fields from List Banks |
Examples
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"
}'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)
{
"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
| Field | Type | Description |
|---|---|---|
id | number | Bank account ID |
bankCode | string | Bank code |
bankNumber | string | Account number |
nameTh | string | Account holder name in Thai |
nameEn | string | Account holder name in English |
type | string | Account type (NATURAL, JURISTIC) |
extraVerify | string | null | Extra verification value, null if not applicable |
bank | object | Bank details |
bank.code | string | Bank code |
bank.nameTh | string | Bank name in Thai |
bank.nameEn | string | Bank name in English |
bank.shortCode | string | Bank short code |
Update a Bank Account
Update an existing bank account. Fields that are not sent retain their existing values.
PATCH /b2b/bank-accounts/:bankAccountIdFull 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
| Field | Type | Required | Description |
|---|---|---|---|
bankCode | string | No | New bank code (see List Banks) |
bankNumber | string | No | New account number |
nameTh | string | No | Account holder name in Thai |
nameEn | string | No | Account holder name in English |
type | string | No | Account type: NATURAL or JURISTIC |
extraVerify | string | null | Conditional | Extra verification value. Send null to clear |
At least one field is required.
Examples
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"
}'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)
{
"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)
{
"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.
DELETE /b2b/bank-accounts/:bankAccountIdFull 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
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}"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)
{
"success": true,
"data": null,
"message": "Bank account deleted successfully"
}Error Responses
Bank Not Found (404)
{
"success": false,
"error": {
"code": "BANK_NOT_FOUND",
"message": "Bank not found"
}
}Bank Account Not Found (404)
{
"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.
{
"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.
{
"success": false,
"error": {
"code": "EXTRA_VERIFY_INVALID",
"message": "Invalid extra verification value"
}
}