Overview
Bank accounts represent the branch’s bank accounts used for receiving transfer payments in cash adjustments and expenses. Account numbers and CLABE are stored in masked format for security.
Create Bank Account
POST /api/v1/bank-accounts
Request Body
Branch ID that owns the account
Account alias/nickname (max 255 characters, e.g., “Cuenta BBVA Principal”)
Bank name (max 255 characters, e.g., “BBVA”, “Santander”)
Masked account number (max 50 characters, e.g., “****1234”)
Masked CLABE interbancaria (max 22 characters, e.g., “012345************”)
Additional metadata Account currency (e.g., “MXN”, “USD”)
Account type (e.g., “CHECKING”, “SAVINGS”)
Response
curl -X POST https://api.sushigo.local/api/v1/bank-accounts \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"branch_id": 1,
"alias": "Cuenta BBVA Principal",
"bank_name": "BBVA",
"account_number_masked": "****1234",
"clabe_masked": "012345************",
"is_active": true,
"meta": {
"currency": "MXN",
"account_type": "CHECKING"
}
}'
{
"message" : "Bank account created successfully" ,
"data" : {
"id" : 1 ,
"branch_id" : 1 ,
"alias" : "Cuenta BBVA Principal" ,
"bank_name" : "BBVA" ,
"account_number_masked" : "****1234" ,
"clabe_masked" : "012345************" ,
"is_active" : true ,
"meta" : {
"currency" : "MXN" ,
"account_type" : "CHECKING"
},
"created_at" : "2025-12-13T08:00:00+00:00" ,
"updated_at" : "2025-12-13T08:00:00+00:00" ,
"branch" : {
"id" : 1 ,
"name" : "Sucursal Centro"
}
}
}
List Bank Accounts
GET /api/v1/bank-accounts
Query Parameters
Response
Returns paginated list of bank accounts with branch information.
curl https://api.sushigo.local/api/v1/bank-accounts?branch_id= 1 & is_active = true \
-H "Authorization: Bearer YOUR_TOKEN"
{
"current_page" : 1 ,
"data" : [
{
"id" : 1 ,
"branch_id" : 1 ,
"alias" : "Cuenta BBVA Principal" ,
"bank_name" : "BBVA" ,
"account_number_masked" : "****1234" ,
"clabe_masked" : "012345************" ,
"is_active" : true ,
"branch" : {
"id" : 1 ,
"name" : "Sucursal Centro"
}
},
{
"id" : 2 ,
"branch_id" : 1 ,
"alias" : "Cuenta Santander Secundaria" ,
"bank_name" : "Santander" ,
"account_number_masked" : "****5678" ,
"clabe_masked" : null ,
"is_active" : true ,
"branch" : {
"id" : 1 ,
"name" : "Sucursal Centro"
}
}
],
"per_page" : 15 ,
"total" : 2
}
Get Bank Account
GET /api/v1/bank-accounts/{id}
Path Parameters
Response
Bank account details with branch information
curl https://api.sushigo.local/api/v1/bank-accounts/1 \
-H "Authorization: Bearer YOUR_TOKEN"
Update Bank Account
PUT /api/v1/bank-accounts/{id}
Path Parameters
Request Body
Response
Updated bank account object
curl -X PUT https://api.sushigo.local/api/v1/bank-accounts/1 \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"alias": "Cuenta BBVA Principal - Actualizada",
"is_active": true
}'
Delete Bank Account
Cannot delete a bank account with existing transactions (adjustment lines or expenses). Set is_active to false instead.
DELETE /api/v1/bank-accounts/{id}
Path Parameters
Response
curl -X DELETE https://api.sushigo.local/api/v1/bank-accounts/1 \
-H "Authorization: Bearer YOUR_TOKEN"
Success Response
422 Cannot Delete
{
"message" : "Bank account deleted successfully"
}
Security Best Practices
Always mask sensitive account information:
Account Number Masking
Only store last 4 digits visible:
Good : ****1234 or ••••1234
Bad : 1234567890 (full number)
CLABE Masking
Mexico’s 18-digit CLABE interbancaria:
Good : 012345************ (first 6 digits + asterisks)
Bad : 012345678901234567 (full CLABE)
The masked format provides enough information to identify accounts while protecting sensitive data.
Common Mexican Banks
BBVA México Banco Bilbao Vizcaya Argentaria
Santander Banco Santander México
Citibanamex Citibank Banamex
Scotiabank Scotiabank Inverlat
Usage in Transfer Payments
Bank accounts are referenced when recording TRANSFER tender type in:
Cash Adjustments : When customers pay via bank transfer (SPEI, wire transfer)
Cash Expenses : When paying vendors via bank transfer
Example adjustment line with bank account:
{
"tender_type" : "TRANSFER" ,
"amount" : 1000.00 ,
"bank_account_id" : 1 ,
"reference" : "SPEI-1234567890"
}
The reference field typically contains the SPEI tracking number or wire transfer confirmation.