Update Merchant Bank Info
curl --request PUT \
--url https://api.example.com/merchants/{id}/bankInfo \
--header 'Content-Type: application/json' \
--data '
{
"data.type": "<string>",
"data.attributes.group": "<string>",
"data.attributes.bankInfo": {
"bankName": "<string>",
"accountOwnership": "<string>",
"accountType": "<string>",
"accountName": "<string>",
"accountNumber": "<string>",
"routingNumber": "<string>"
}
}
'import requests
url = "https://api.example.com/merchants/{id}/bankInfo"
payload = {
"data.type": "<string>",
"data.attributes.group": "<string>",
"data.attributes.bankInfo": {
"bankName": "<string>",
"accountOwnership": "<string>",
"accountType": "<string>",
"accountName": "<string>",
"accountNumber": "<string>",
"routingNumber": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
'data.type': '<string>',
'data.attributes.group': '<string>',
'data.attributes.bankInfo': {
bankName: '<string>',
accountOwnership: '<string>',
accountType: '<string>',
accountName: '<string>',
accountNumber: '<string>',
routingNumber: '<string>'
}
})
};
fetch('https://api.example.com/merchants/{id}/bankInfo', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/merchants/{id}/bankInfo",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'data.type' => '<string>',
'data.attributes.group' => '<string>',
'data.attributes.bankInfo' => [
'bankName' => '<string>',
'accountOwnership' => '<string>',
'accountType' => '<string>',
'accountName' => '<string>',
'accountNumber' => '<string>',
'routingNumber' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/merchants/{id}/bankInfo"
payload := strings.NewReader("{\n \"data.type\": \"<string>\",\n \"data.attributes.group\": \"<string>\",\n \"data.attributes.bankInfo\": {\n \"bankName\": \"<string>\",\n \"accountOwnership\": \"<string>\",\n \"accountType\": \"<string>\",\n \"accountName\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"routingNumber\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/merchants/{id}/bankInfo")
.header("Content-Type", "application/json")
.body("{\n \"data.type\": \"<string>\",\n \"data.attributes.group\": \"<string>\",\n \"data.attributes.bankInfo\": {\n \"bankName\": \"<string>\",\n \"accountOwnership\": \"<string>\",\n \"accountType\": \"<string>\",\n \"accountName\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"routingNumber\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/merchants/{id}/bankInfo")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"data.type\": \"<string>\",\n \"data.attributes.group\": \"<string>\",\n \"data.attributes.bankInfo\": {\n \"bankName\": \"<string>\",\n \"accountOwnership\": \"<string>\",\n \"accountType\": \"<string>\",\n \"accountName\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"routingNumber\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_bodyMerchants
Update Merchant Bank Info
Update the bank account information for a merchant
PUT
/
merchants
/
{id}
/
bankInfo
Update Merchant Bank Info
curl --request PUT \
--url https://api.example.com/merchants/{id}/bankInfo \
--header 'Content-Type: application/json' \
--data '
{
"data.type": "<string>",
"data.attributes.group": "<string>",
"data.attributes.bankInfo": {
"bankName": "<string>",
"accountOwnership": "<string>",
"accountType": "<string>",
"accountName": "<string>",
"accountNumber": "<string>",
"routingNumber": "<string>"
}
}
'import requests
url = "https://api.example.com/merchants/{id}/bankInfo"
payload = {
"data.type": "<string>",
"data.attributes.group": "<string>",
"data.attributes.bankInfo": {
"bankName": "<string>",
"accountOwnership": "<string>",
"accountType": "<string>",
"accountName": "<string>",
"accountNumber": "<string>",
"routingNumber": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
'data.type': '<string>',
'data.attributes.group': '<string>',
'data.attributes.bankInfo': {
bankName: '<string>',
accountOwnership: '<string>',
accountType: '<string>',
accountName: '<string>',
accountNumber: '<string>',
routingNumber: '<string>'
}
})
};
fetch('https://api.example.com/merchants/{id}/bankInfo', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/merchants/{id}/bankInfo",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'data.type' => '<string>',
'data.attributes.group' => '<string>',
'data.attributes.bankInfo' => [
'bankName' => '<string>',
'accountOwnership' => '<string>',
'accountType' => '<string>',
'accountName' => '<string>',
'accountNumber' => '<string>',
'routingNumber' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/merchants/{id}/bankInfo"
payload := strings.NewReader("{\n \"data.type\": \"<string>\",\n \"data.attributes.group\": \"<string>\",\n \"data.attributes.bankInfo\": {\n \"bankName\": \"<string>\",\n \"accountOwnership\": \"<string>\",\n \"accountType\": \"<string>\",\n \"accountName\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"routingNumber\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/merchants/{id}/bankInfo")
.header("Content-Type", "application/json")
.body("{\n \"data.type\": \"<string>\",\n \"data.attributes.group\": \"<string>\",\n \"data.attributes.bankInfo\": {\n \"bankName\": \"<string>\",\n \"accountOwnership\": \"<string>\",\n \"accountType\": \"<string>\",\n \"accountName\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"routingNumber\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/merchants/{id}/bankInfo")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"data.type\": \"<string>\",\n \"data.attributes.group\": \"<string>\",\n \"data.attributes.bankInfo\": {\n \"bankName\": \"<string>\",\n \"accountOwnership\": \"<string>\",\n \"accountType\": \"<string>\",\n \"accountName\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"routingNumber\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_bodyEndpoint
PUT https://api.digitzs.com/merchants/{id}
Overview
Use this endpoint to update a merchant’s bank account information used for receiving payment deposits.Changing bank information affects where funds are deposited. Verify all details carefully before submitting.
Authentication
| Header | Value | Required |
|---|---|---|
x-api-key | Your API key | Yes |
Authorization | Bearer {appToken} | Yes |
appId | Your application ID | Yes |
Content-Type | application/json | Yes |
Path Parameters
The merchant account ID
Request Body
Must be
"merchants"Must be
"bankInfo"New bank account information
Show Bank info properties
Show Bank info properties
Example Request
{
"data": {
"type": "merchants",
"attributes": {
"group": "bankInfo",
"bankInfo": {
"bankName": "Chase Bank",
"accountOwnership": "business",
"accountType": "checking",
"accountName": "Acme Corporation",
"accountNumber": "9876543210",
"routingNumber": "026009593"
}
}
}
}
Response
Success Response (200 OK)
{
"links": {
"self": "https://api.digitzs.com/merchants/merchant_abc123"
},
"data": {
"type": "merchants",
"id": "merchant_abc123",
"attributes": {
"bankInfo": {
"bankName": "Chase Bank",
"accountType": "checking",
"last4": "3210",
"updatedAt": "2024-01-20T15:30:00Z"
}
}
}
}
Code Examples
curl -X PUT https://api.digitzs.com/merchants/merchant_abc123 \
-H "x-api-key: your-api-key" \
-H "Authorization: Bearer your-app-token" \
-H "appId: your-app-id" \
-H "Content-Type: application/json" \
-d '{
"data": {
"type": "merchants",
"attributes": {
"group": "bankInfo",
"bankInfo": {
"bankName": "Chase Bank",
"accountOwnership": "business",
"accountType": "checking",
"accountName": "Acme Corporation",
"accountNumber": "9876543210",
"routingNumber": "026009593"
}
}
}
}'
const axios = require('axios');
async function updateMerchantBankInfo(merchantId, bankInfo) {
const response = await axios.put(
`https://api.digitzs.com/merchants/${merchantId}`,
{
data: {
type: 'merchants',
attributes: {
group: 'bankInfo',
bankInfo: bankInfo
}
}
},
{
headers: {
'x-api-key': 'your-api-key',
'Authorization': 'Bearer your-app-token',
'appId': 'your-app-id',
'Content-Type': 'application/json'
}
}
);
console.log('Bank info updated successfully');
return response.data;
}
import requests
def update_merchant_bank_info(merchant_id, bank_info):
url = f"https://api.digitzs.com/merchants/{merchant_id}"
headers = {
"x-api-key": "your-api-key",
"Authorization": "Bearer your-app-token",
"appId": "your-app-id",
"Content-Type": "application/json"
}
payload = {
"data": {
"type": "merchants",
"attributes": {
"group": "bankInfo",
"bankInfo": bank_info
}
}
}
response = requests.put(url, headers=headers, json=payload)
response.raise_for_status()
return response.json()
<?php
function updateMerchantBankInfo($merchantId, $bankInfo) {
$url = "https://api.digitzs.com/merchants/" . $merchantId;
$payload = json_encode([
"data" => [
"type" => "merchants",
"attributes" => [
"group" => "bankInfo",
"bankInfo" => $bankInfo
]
]
]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"x-api-key: your-api-key",
"Authorization: Bearer your-app-token",
"appId: your-app-id",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
return json_decode(curl_exec($ch), true);
}
?>
require 'net/http'
require 'json'
def update_merchant_bank_info(merchant_id, bank_info)
uri = URI("https://api.digitzs.com/merchants/#{merchant_id}")
request = Net::HTTP::Put.new(uri)
request['x-api-key'] = 'your-api-key'
request['Authorization'] = 'Bearer your-app-token'
request['appId'] = 'your-app-id'
request['Content-Type'] = 'application/json'
request.body = {
data: {
type: 'merchants',
attributes: {
group: 'bankInfo',
bankInfo: bank_info
}
}
}.to_json
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
JSON.parse(response.body)
end
Important Notes
Verification Required: New bank accounts may require verification before funds can be deposited. Check with Digitzs support for verification procedures.
Pending Deposits: Existing pending deposits will complete to the old account. Only new deposits use the updated account.
Double Check: Verify routing and account numbers carefully. Incorrect information will cause deposit failures.
Best Practices
- Validate Before Update: Verify bank details with merchant before submission
- Notify Merchant: Inform merchant of bank account changes
- Audit Trail: Log all bank account updates for compliance
- Test Deposits: Consider micro-deposit verification for added security
Next Steps
Get Merchant Details
Verify updated bank information
⌘I

