Skip to main content
PUT
/
v3
/
collection_account
/
{id}
Update Collection Account
curl --request PUT \
  --url https://service-sandbox.tazapay.com/v3/collection_account/{id} \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "metadata": {
    "usecase": "This account is used for USD payouts"
  }
}
'
import requests

url = "https://service-sandbox.tazapay.com/v3/collection_account/{id}"

payload = { "metadata": { "usecase": "This account is used for USD payouts" } }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({metadata: {usecase: 'This account is used for USD payouts'}})
};

fetch('https://service-sandbox.tazapay.com/v3/collection_account/{id}', 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://service-sandbox.tazapay.com/v3/collection_account/{id}",
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([
'metadata' => [
'usecase' => 'This account is used for USD payouts'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://service-sandbox.tazapay.com/v3/collection_account/{id}"

payload := strings.NewReader("{\n \"metadata\": {\n \"usecase\": \"This account is used for USD payouts\"\n }\n}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("Authorization", "Basic <encoded-value>")
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://service-sandbox.tazapay.com/v3/collection_account/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {\n \"usecase\": \"This account is used for USD payouts\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://service-sandbox.tazapay.com/v3/collection_account/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metadata\": {\n \"usecase\": \"This account is used for USD payouts\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "id": "cva_crqinja9chqqs7moi8rg",
  "object": "collection_account",
  "type": "virtual_account",
  "payment_method_type": "local_bank_transfer_cad",
  "country": "CA",
  "currencies": [
    "CAD"
  ],
  "status": "enabled",
  "alias": "CAD Collection Account",
  "virtual_account": {
    "account_holder_name": "testacc",
    "account_number": "testacc1234-56-1234",
    "bank_address": {
      "address_line_1": "testAdd",
      "address_line_2": "testAdd1",
      "country": "United States of America"
    },
    "bank_codes": {
      "ach_routing_number": "testRoutingNumber",
      "bank_code": "testBankCode",
      "bsb_code": "testBsbCode",
      "fedwire_routing_number": "TestFedWire",
      "routing_code": "testRoutingCode",
      "sort_code": "testSortCode",
      "swift_code": "testSwift"
    },
    "bank_branch": "testBankBranch",
    "bank_name": "testBank",
    "iban": "testIban",
    "account_reenablement_supported": true
  },
  "requests": [
    {
      "id": "req_cva001enablement",
      "object": "collection_account_request",
      "collection_account_id": "cva_crqinja9chqqs7moi8rg",
      "type": "enablement",
      "status": "succeeded",
      "requested_currencies": [
        "CAD"
      ],
      "created_at": "2024-09-26T09:39:25.03501Z",
      "updated_at": "2024-09-26T09:39:30.03501Z",
      "status_description": "Account enabled successfully."
    }
  ],
  "status_description": "",
  "metadata": {
    "usecase": "This account is used for USD payouts"
  },
  "created_at": "2024-09-26T09:39:25.03501Z",
  "updated_at": "2024-09-26T09:41:43.349835Z"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

id
string
required

Unique ID of the collection account to update.

Body

application/json
metadata
object

Set of key-value pairs to attach to the collection account object.

Response

200 - application/json

Collection account updated successfully.

Represents a collection account (virtual account or stablecoin wallet).

id
string

Unique identifier. Starts with cva_ (virtual account), cwa_ (wallet), or cta_.

object
string

Always "collection_account".

type
enum<string>

Type of collection account.

Available options:
virtual_account,
wallet
description
string

Usecase description for this account.

on_behalf_of
string

ID of the entity this account is configured on behalf of.

country
string

Country in which the account is opened (ISO 3166 alpha-2).

currencies
string[]

List of currencies enabled for this account.

payment_method_type
string

Type of payment method for this account.

virtual_account
object

Virtual account bank details. Present when type is virtual_account.

wallet
object

Wallet details. Present when type is wallet.

status
enum<string>

Current status of the collection account.

Available options:
disabled,
enabled
requests
object[]

Enablement, disablement, or reenablement requests attached to this account.

status_description
string

Description of the current status (e.g. disablement reason).

alias
string

Nickname for the account.

balance_transaction
string

ID of the balance transaction linked to this collection account.

metadata
object

Key-value pairs attached to the collection account.

created_at
string<date-time>

Timestamp when the account was created.

updated_at
string<date-time>

Timestamp when the account was last updated.