POST
/v1/invoices/{uuid}/network
Set invoice network
Sets or changes the network of a pending invoice and allocates a deposit address (or TON memo).
Body parameters
network
string
required Network code. Only allowed while the invoice is pending and nothing was received.
Response 200
{
"uuid": "9b1f2c3e-5a4d-4e8f-9c21-7d3b8e6a1f00",
"status": "pending",
"order_id": "INV-1001",
"title": "Order #1001",
"amount": "10",
"currency": "USDT",
"platform_fee": "0.08",
"network_fee": "0",
"pay_amount": "10.08",
"merchant_net": "10",
"fee_payer": "buyer",
"network": "TON",
"address": "UQBx…master",
"memo": "ZYVO-7KQ2M9XA",
"checkout_url": "https://zyvopay.com/pay/9b1f2c3e-5a4d-4e8f-9c21-7d3b8e6a1f00",
"qr_svg": "<svg …>",
"received_amount": "0",
"confirmations": 0,
"required_confirmations": 19,
"tx_hash": null,
"metadata": {
"customer_id": 42
},
"expires_at": "2026-10-16T22:00:00Z",
"paid_at": null,
"created_at": "2026-10-16T21:00:00Z"
}
All requests must be signed — see Authentication.
BODY='{"network":"TON"}'
SIG=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$ZYVO_SECRET" | cut -d" " -f2)
curl -X POST https://api.zyvopay.com/v1/invoices/9b1f2c3e-5a4d-4e8f-9c21-7d3b8e6a1f00/network \
-H "X-Zyvo-Key: $ZYVO_KEY" \
-H "X-Zyvo-Signature: $SIG" \
-H "Content-Type: application/json" \
-d "$BODY"<?php
// composer require guzzlehttp/guzzle
$client = new \GuzzleHttp\Client(['base_uri' => 'https://api.zyvopay.com/v1/']);
$body = json_encode([
'network' => 'TON',
]);
$response = $client->request('POST', 'invoices/9b1f2c3e-5a4d-4e8f-9c21-7d3b8e6a1f00/network', [
'headers' => [
'X-Zyvo-Key' => getenv('ZYVO_KEY'),
'X-Zyvo-Signature' => hash_hmac('sha256', $body, getenv('ZYVO_SECRET')),
'Content-Type' => 'application/json',
],
'body' => $body,
]);
$data = json_decode((string) $response->getBody(), true);import crypto from 'node:crypto';
const body = JSON.stringify({
"network": "TON"
});
const signature = crypto.createHmac('sha256', process.env.ZYVO_SECRET).update(body).digest('hex');
const res = await fetch('https://api.zyvopay.com/v1/invoices/9b1f2c3e-5a4d-4e8f-9c21-7d3b8e6a1f00/network', {
method: 'POST',
headers: {
'X-Zyvo-Key': process.env.ZYVO_KEY,
'X-Zyvo-Signature': signature,
'Content-Type': 'application/json',
},
body,
});
console.log(await res.json());import hmac, hashlib, json, os, requests
body = json.dumps({"network":"TON"}, separators=(',', ':'))
signature = hmac.new(os.environ['ZYVO_SECRET'].encode(), body.encode(), hashlib.sha256).hexdigest()
r = requests.request('POST', 'https://api.zyvopay.com/v1/invoices/9b1f2c3e-5a4d-4e8f-9c21-7d3b8e6a1f00/network', data=body, headers={
'X-Zyvo-Key': os.environ['ZYVO_KEY'],
'X-Zyvo-Signature': signature,
'Content-Type': 'application/json',
})
print(r.json())package main
import (
"bytes"
"crypto/hmac"
"crypto/sha256"
"encoding/hex"
"fmt"
"io"
"net/http"
"os"
)
func main() {
body := []byte(`{"network":"TON"}`)
mac := hmac.New(sha256.New, []byte(os.Getenv("ZYVO_SECRET")))
mac.Write(body)
req, _ := http.NewRequest("POST", "https://api.zyvopay.com/v1/invoices/9b1f2c3e-5a4d-4e8f-9c21-7d3b8e6a1f00/network", bytes.NewReader(body))
req.Header.Set("X-Zyvo-Key", os.Getenv("ZYVO_KEY"))
req.Header.Set("X-Zyvo-Signature", hex.EncodeToString(mac.Sum(nil)))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(string(out))
}