Get a Virtual Account
curl --request GET \
--url https://sandbox-api.polygon.technology/v0.10/virtual-accounts/{virtualAccountId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://sandbox-api.polygon.technology/v0.10/virtual-accounts/{virtualAccountId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox-api.polygon.technology/v0.10/virtual-accounts/{virtualAccountId}', 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://sandbox-api.polygon.technology/v0.10/virtual-accounts/{virtualAccountId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.polygon.technology/v0.10/virtual-accounts/{virtualAccountId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox-api.polygon.technology/v0.10/virtual-accounts/{virtualAccountId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.polygon.technology/v0.10/virtual-accounts/{virtualAccountId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"bankDetails": {
"domestic": {
"accountNumber": "<string>",
"accountType": "<string>",
"bankAddress": "<string>",
"bankName": "<string>",
"beneficiary": {
"address": {
"city": "<string>",
"country": "<string>",
"postalCode": "<string>",
"streetAddress": "<string>",
"countryArea": "<string>"
},
"name": "<string>"
},
"network": [],
"routingNumber": "<string>"
},
"swift": {
"accountNumber": "<string>",
"bankAddress": "<string>",
"bankName": "<string>",
"beneficiary": {
"address": {
"city": "<string>",
"country": "<string>",
"postalCode": "<string>",
"streetAddress": "<string>",
"countryArea": "<string>"
},
"name": "<string>"
},
"bic": "<string>",
"memo": "<string>"
}
},
"bankMemo": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"customerId": "<string>",
"deletionRequestedAt": "2023-11-07T05:31:56Z",
"deletionRequestedBy": "<string>",
"destination": {
"category": "crypto",
"details": {
"asset": "<string>",
"blockchainAddress": "<string>",
"blockchainAsset": {
"chainId": "<string>",
"tokenId": "<string>"
},
"id": "<string>",
"network": "<string>",
"txHash": "<string>"
},
"type": "walletOms",
"party": {
"customerId": "<string>",
"relationship": "customer"
}
},
"finalBalance": {
"currency": "<string>",
"display": "<string>",
"value": "<string>"
},
"id": "<string>",
"label": "<string>",
"metadata": {},
"object": "virtualAccount",
"source": {
"asset": "<string>",
"network": "<string>"
},
"statusReason": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}Virtual Accounts
Get a Virtual Account
Fetch a Virtual Account by ID.
GET
/
virtual-accounts
/
{virtualAccountId}
Get a Virtual Account
curl --request GET \
--url https://sandbox-api.polygon.technology/v0.10/virtual-accounts/{virtualAccountId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://sandbox-api.polygon.technology/v0.10/virtual-accounts/{virtualAccountId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox-api.polygon.technology/v0.10/virtual-accounts/{virtualAccountId}', 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://sandbox-api.polygon.technology/v0.10/virtual-accounts/{virtualAccountId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.polygon.technology/v0.10/virtual-accounts/{virtualAccountId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox-api.polygon.technology/v0.10/virtual-accounts/{virtualAccountId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.polygon.technology/v0.10/virtual-accounts/{virtualAccountId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"bankDetails": {
"domestic": {
"accountNumber": "<string>",
"accountType": "<string>",
"bankAddress": "<string>",
"bankName": "<string>",
"beneficiary": {
"address": {
"city": "<string>",
"country": "<string>",
"postalCode": "<string>",
"streetAddress": "<string>",
"countryArea": "<string>"
},
"name": "<string>"
},
"network": [],
"routingNumber": "<string>"
},
"swift": {
"accountNumber": "<string>",
"bankAddress": "<string>",
"bankName": "<string>",
"beneficiary": {
"address": {
"city": "<string>",
"country": "<string>",
"postalCode": "<string>",
"streetAddress": "<string>",
"countryArea": "<string>"
},
"name": "<string>"
},
"bic": "<string>",
"memo": "<string>"
}
},
"bankMemo": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"customerId": "<string>",
"deletionRequestedAt": "2023-11-07T05:31:56Z",
"deletionRequestedBy": "<string>",
"destination": {
"category": "crypto",
"details": {
"asset": "<string>",
"blockchainAddress": "<string>",
"blockchainAsset": {
"chainId": "<string>",
"tokenId": "<string>"
},
"id": "<string>",
"network": "<string>",
"txHash": "<string>"
},
"type": "walletOms",
"party": {
"customerId": "<string>",
"relationship": "customer"
}
},
"finalBalance": {
"currency": "<string>",
"display": "<string>",
"value": "<string>"
},
"id": "<string>",
"label": "<string>",
"metadata": {},
"object": "virtualAccount",
"source": {
"asset": "<string>",
"network": "<string>"
},
"statusReason": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}Authorizations
Token from POST /auth/token
Path Parameters
Response
200 - application/json
The request has succeeded.
Null until the underlying deposit account is provisioned.
Show child attributes
Show child attributes
Set when DELETE has been requested but the close webhook has not yet finalized.
Identity (JWT subject claim) of the caller who invoked DELETE.
Unified side shape.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
Show child attributes
Show child attributes
Set when status = failed; closed enum identifying the failure category.
Available options:
provisioningTimeout, systemError, ereborRejected, deletePendingTimeout DDA balance snapshot at the moment the VA flipped to deleted.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
virtualAccount Show child attributes
Show child attributes
Available options:
pending, active, frozen, closed, deleted, failed, inactiveActionRequired Was this page helpful?
⌘I