Update Virtual Account
Reprice partner fees and/or change the destination.
curl -X PATCH "https://sandbox.rasto.co/api/virtual_accounts/example_string" \
-H "Content-Type: application/json" \
-H "Api-Key: example_string" \
-H "Api-Version: example_string" \
-H "Api-Key: YOUR_API_KEY" \
-d '{
"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
}'
import requests
import json
url = "https://sandbox.rasto.co/api/virtual_accounts/example_string"
headers = {
"Content-Type": "application/json",
"Api-Key": "YOUR_API_KEY",
"Api-Version": "example_string"
}
data = {
"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
}
response = requests.patch(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://sandbox.rasto.co/api/virtual_accounts/example_string", {
method: "PATCH",
headers: {
"Content-Type": "application/json",
"Api-Key": "YOUR_API_KEY",
"Api-Version": "example_string"
},
body: JSON.stringify({
"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
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"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
}`)
req, err := http.NewRequest("PATCH", "https://sandbox.rasto.co/api/virtual_accounts/example_string", 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("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/virtual_accounts/example_string')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(uri)
request['Content-Type'] = 'application/json'
request['Api-Key'] = 'example_string'
request['Api-Version'] = 'example_string'
request['Api-Key'] = 'YOUR_API_KEY'
request.body = '{
"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
}'
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"
}
]
}
PATCH
/api/virtual_accounts/{va_id}PATCH
Base URLstring
Target server for requests. Edit to use your own host.
API Key (header: Api-Key)
Api-Keystring
RequiredAPI key (sent in header)
Content-Typestring
RequiredThe media type of the request body
Options: application/json
header
Api-Versionstring
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.
Request Preview
Response
Response will appear here after sending the request
Authentication
header
Api-Keystring
RequiredAPI Key for authentication. Provide your API key in the header.
Path Parameters
Headers
Api-Versionstring
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.
Responses
Successful Response
Was this page helpful?