Create a virtual account for a wallet
curl --request POST \
--url https://api.anchorage-staging.com/v2/wallets/{walletId}/virtual-accounts \
--header 'Api-Access-Key: <api-key>' \
--header 'Api-Signature: <api-signature>' \
--header 'Api-Timestamp: <api-timestamp>' \
--header 'Content-Type: application/json' \
--data '
{
"customerId": "cust_123",
"idempotentId": "e763a50d-aa82-4ec7-b5a3-89ad0462d248"
}
'import requests
url = "https://api.anchorage-staging.com/v2/wallets/{walletId}/virtual-accounts"
payload = {
"customerId": "cust_123",
"idempotentId": "e763a50d-aa82-4ec7-b5a3-89ad0462d248"
}
headers = {
"Api-Signature": "<api-signature>",
"Api-Timestamp": "<api-timestamp>",
"Api-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Api-Signature': '<api-signature>',
'Api-Timestamp': '<api-timestamp>',
'Api-Access-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({customerId: 'cust_123', idempotentId: 'e763a50d-aa82-4ec7-b5a3-89ad0462d248'})
};
fetch('https://api.anchorage-staging.com/v2/wallets/{walletId}/virtual-accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>"
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}Create a virtual account for a wallet
Permissions required: Virtual accounts
Create a fiat virtual account for the wallet identified by walletId, linked to the customer identified by customerId.
POST
/
wallets
/
{walletId}
/
virtual-accounts
Create a virtual account for a wallet
curl --request POST \
--url https://api.anchorage-staging.com/v2/wallets/{walletId}/virtual-accounts \
--header 'Api-Access-Key: <api-key>' \
--header 'Api-Signature: <api-signature>' \
--header 'Api-Timestamp: <api-timestamp>' \
--header 'Content-Type: application/json' \
--data '
{
"customerId": "cust_123",
"idempotentId": "e763a50d-aa82-4ec7-b5a3-89ad0462d248"
}
'import requests
url = "https://api.anchorage-staging.com/v2/wallets/{walletId}/virtual-accounts"
payload = {
"customerId": "cust_123",
"idempotentId": "e763a50d-aa82-4ec7-b5a3-89ad0462d248"
}
headers = {
"Api-Signature": "<api-signature>",
"Api-Timestamp": "<api-timestamp>",
"Api-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Api-Signature': '<api-signature>',
'Api-Timestamp': '<api-timestamp>',
'Api-Access-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({customerId: 'cust_123', idempotentId: 'e763a50d-aa82-4ec7-b5a3-89ad0462d248'})
};
fetch('https://api.anchorage-staging.com/v2/wallets/{walletId}/virtual-accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>"
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}Authorizations
An API key associated with a security role
Headers
A hex-encoded Ed25519 signature of timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body.
Construction example:
toHex(
ed25519Sign(
signing_key,
'{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
)
)
Pattern:
^[0-9A-Fa-f]{128,160}$Current timestamp, represented as unix epoch seconds
Path Parameters
An ID uniquely identifying an Anchorage Digital wallet
Body
application/json
Response
Successfully created a virtual account
The ID of the newly created virtual account.
Was this page helpful?