Create Virtual Account
Create a virtual account with its stablecoin destination.
curl -X POST "https://sandbox.rasto.co/api/customers/example_string/virtual_accounts" \
-H "Content-Type: application/json" \
-H "Api-Key: example_string" \
-H "Api-Version: example_string" \
-H "Idempotency-Key: example_string" \
-H "Api-Key: YOUR_API_KEY" \
-d '{
"currency": "example_string",
"rail": "example_string",
"destination": {
"kind": "address",
"chain": "example_string",
"asset": "example_string",
"address": "123 Main St",
"wallet_id": "example_string",
"memo": "example_string"
},
"partner_fee_bps": 3.14,
"partner_fee_flat": 3.14,
"partner_reference_id": "example_string"
}'
import requests
import json
url = "https://sandbox.rasto.co/api/customers/example_string/virtual_accounts"
headers = {
"Content-Type": "application/json",
"Api-Key": "YOUR_API_KEY",
"Api-Version": "example_string",
"Idempotency-Key": "example_string"
}
data = {
"currency": "example_string",
"rail": "example_string",
"destination": {
"kind": "address",
"chain": "example_string",
"asset": "example_string",
"address": "123 Main St",
"wallet_id": "example_string",
"memo": "example_string"
},
"partner_fee_bps": 3.14,
"partner_fee_flat": 3.14,
"partner_reference_id": "example_string"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://sandbox.rasto.co/api/customers/example_string/virtual_accounts", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Api-Key": "YOUR_API_KEY",
"Api-Version": "example_string",
"Idempotency-Key": "example_string"
},
body: JSON.stringify({
"currency": "example_string",
"rail": "example_string",
"destination": {
"kind": "address",
"chain": "example_string",
"asset": "example_string",
"address": "123 Main St",
"wallet_id": "example_string",
"memo": "example_string"
},
"partner_fee_bps": 3.14,
"partner_fee_flat": 3.14,
"partner_reference_id": "example_string"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"currency": "example_string",
"rail": "example_string",
"destination": {
"kind": "address",
"chain": "example_string",
"asset": "example_string",
"address": "123 Main St",
"wallet_id": "example_string",
"memo": "example_string"
},
"partner_fee_bps": 3.14,
"partner_fee_flat": 3.14,
"partner_reference_id": "example_string"
}`)
req, err := http.NewRequest("POST", "https://sandbox.rasto.co/api/customers/example_string/virtual_accounts", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Api-Key", "example_string")
req.Header.Set("Api-Version", "example_string")
req.Header.Set("Idempotency-Key", "example_string")
req.Header.Set("Api-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://sandbox.rasto.co/api/customers/example_string/virtual_accounts')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Api-Key'] = 'example_string'
request['Api-Version'] = 'example_string'
request['Idempotency-Key'] = 'example_string'
request['Api-Key'] = 'YOUR_API_KEY'
request.body = '{
"currency": "example_string",
"rail": "example_string",
"destination": {
"kind": "address",
"chain": "example_string",
"asset": "example_string",
"address": "123 Main St",
"wallet_id": "example_string",
"memo": "example_string"
},
"partner_fee_bps": 3.14,
"partner_fee_flat": 3.14,
"partner_reference_id": "example_string"
}'
response = http.request(request)
puts response.body
{}
{
"error": "Unprocessable Entity",
"message": "The request was well-formed but contains semantic errors",
"code": 422,
"details": [
{
"field": "password",
"message": "Password must be at least 8 characters long"
}
]
}
/api/customers/{customer_id}/virtual_accountsTarget server for requests. Edit to use your own host.
API key (sent in header)
The media type of the request body
The /api contract to serve this request under, as an ISO date. Omit to use the default (2026-08-01), omitting it always keeps today's behaviour, so a future breaking change cannot move you. Supported: 2026-08-01.
Unique per request; a retry with the same key replays the stored response byte-for-byte.
Where delivered funds go: an external address OR a held wallet. Attributes: kind: "address" (external, the default) | "wallet" (deliver into one of the customer's held wallets, standing VA→wallet routing). chain: Required for kind=address; FORBIDDEN for kind=wallet, the wallet supplies it. asset: What to deliver, always required. address: Same rule as chain. wallet_id: Required for kind=wallet. memo: kind=address only.
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Provide your API key in the header.
Path Parameters
Headers
The /api contract to serve this request under, as an ISO date. Omit to use the default (2026-08-01), omitting it always keeps today's behaviour, so a future breaking change cannot move you. Supported: 2026-08-01.
Unique per request; a retry with the same key replays the stored response byte-for-byte.
Body
Where delivered funds go: an external address OR a held wallet.
Attributes: kind: "address" (external, the default) | "wallet" (deliver into one of the customer's held wallets, standing VA→wallet routing). chain: Required for kind=address; FORBIDDEN for kind=wallet, the wallet supplies it. asset: What to deliver, always required. address: Same rule as chain. wallet_id: Required for kind=wallet. memo: kind=address only.