Skip to main content

Update Bank Account

Update an existing bank account's details. Only non-sensitive fields can be modified.

PUThttps://api.zenpayz.com/merchant/api/v1/settlements/bank-accounts/{id}
Bearer · API key

Request

Headers

HeaderDescription
Authorization
REQUIRED
Bearer {api_key}
X-Signature
REQUIRED
HMAC-SHA256 signature
X-Timestamp
REQUIRED
ISO 8601 timestamp
X-Secret-Salt
REQUIRED
Secret salt for HMAC validation
Content-Type
REQUIRED
application/json

Path Parameters

ParameterTypeDescription
id
REQUIRED
stringBank account ID

Body Parameters

All fields are optional. Only provided fields will be updated.

ParameterTypeDescription
accountHolderName
OPTIONAL
stringAccount holder name
branchName
OPTIONAL
stringBank branch name
branchAddress
OPTIONAL
stringBank branch address
isPrimary
OPTIONAL
booleanSet as primary account
swiftCode
OPTIONAL
stringSWIFT/BIC code
note

Sensitive fields like accountNumber, ifscCode, and bankName cannot be modified after creation. To change these, delete and re-add the bank account.

Response

Success (200 OK)

{
"success": true,
"data": {
"id": "ba_xxxxx",
"accountNumber": "****5678",
"accountHolderName": "Acme Inc Updated",
"accountType": "CURRENT",
"bankName": "Bank of America",
"branchName": "New Branch",
"ifscCode": "BOFA0001234",
"isPrimary": true,
"createdAt": "2024-01-15T10:30:00.000Z"
}
}

Error Responses

CodeHTTPMessage
VALIDATION_ERROR400Invalid input data
BANK_ACCOUNT_NOT_FOUND404Bank account does not exist

Examples

curl -X PUT "https://api.zenpayz.com/merchant/api/v1/settlements/bank-accounts/ba_xxxxx" \
-H "Authorization: Bearer zp_test_xxxxx" \
-H "X-Timestamp: 2024-01-15T10:30:00.000Z" \
-H "X-Signature: a1b2c3d4e5f6..." \
-H "X-Secret-Salt: your_secret_salt" \
-H "Content-Type: application/json" \
-d '{
"isPrimary": true,
"branchName": "New Branch"
}'