curl --request GET \
--url https://api.example.com/v1/public/invoices/{token} \
--header 'X-Api-Id: <api-key>' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Signature: <api-key>' \
--header 'X-Timestamp: <api-key>'import requests
url = "https://api.example.com/v1/public/invoices/{token}"
headers = {
"X-Api-Id": "<api-key>",
"X-Api-Key": "<api-key>",
"X-Signature": "<api-key>",
"X-Timestamp": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-Api-Id': '<api-key>',
'X-Api-Key': '<api-key>',
'X-Signature': '<api-key>',
'X-Timestamp': '<api-key>'
}
};
fetch('https://api.example.com/v1/public/invoices/{token}', 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://api.example.com/v1/public/invoices/{token}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Id: <api-key>",
"X-Api-Key: <api-key>",
"X-Signature: <api-key>",
"X-Timestamp: <api-key>"
],
]);
$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://api.example.com/v1/public/invoices/{token}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Id", "<api-key>")
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("X-Signature", "<api-key>")
req.Header.Add("X-Timestamp", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/public/invoices/{token}")
.header("X-Api-Id", "<api-key>")
.header("X-Api-Key", "<api-key>")
.header("X-Signature", "<api-key>")
.header("X-Timestamp", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/public/invoices/{token}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Id"] = '<api-key>'
request["X-Api-Key"] = '<api-key>'
request["X-Signature"] = '<api-key>'
request["X-Timestamp"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"token": "<string>",
"title": "<string>",
"description": "<string>",
"assetCode": "USDT_TRC20",
"assetSymbol": "USDT",
"assetName": "Tether USD (TRC-20)",
"network": "TRON",
"address": "<string>",
"memo": "<string>",
"expectedAmount": "100.50",
"amountUsd": "100.42",
"pegUsdAmount": "<string>",
"pegRate": "<string>",
"decimals": 6,
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"state": "pending",
"paymentStatus": "<string>",
"receivedAmount": "<string>",
"confirmations": 123,
"requiredConfirmations": 19,
"txhash": "<string>",
"explorerTxUrl": "<string>",
"explorerAddressUrl": "<string>",
"paidAt": "2023-11-07T05:31:56Z",
"remainingAmount": "<string>",
"branding": {
"displayName": "WalletCore",
"primaryColor": "#3b82f6",
"logoUrl": "<string>",
"supportUrl": "<string>",
"locale": "ru",
"theme": "light"
},
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderId": "<string>",
"urlReturn": "<string>",
"urlSuccess": "<string>",
"theme": "light",
"locale": "ru"
}Get invoice payment page by public token
Данные платёжной страницы: адрес, актив, сумма, срок (отсчёт), статус оплаты, бренд, редиректы, тема/язык. 410 Gone если ссылка отключена (прошёл срок + 1 день).
curl --request GET \
--url https://api.example.com/v1/public/invoices/{token} \
--header 'X-Api-Id: <api-key>' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Signature: <api-key>' \
--header 'X-Timestamp: <api-key>'import requests
url = "https://api.example.com/v1/public/invoices/{token}"
headers = {
"X-Api-Id": "<api-key>",
"X-Api-Key": "<api-key>",
"X-Signature": "<api-key>",
"X-Timestamp": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-Api-Id': '<api-key>',
'X-Api-Key': '<api-key>',
'X-Signature': '<api-key>',
'X-Timestamp': '<api-key>'
}
};
fetch('https://api.example.com/v1/public/invoices/{token}', 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://api.example.com/v1/public/invoices/{token}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Id: <api-key>",
"X-Api-Key: <api-key>",
"X-Signature: <api-key>",
"X-Timestamp: <api-key>"
],
]);
$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://api.example.com/v1/public/invoices/{token}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Id", "<api-key>")
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("X-Signature", "<api-key>")
req.Header.Add("X-Timestamp", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/public/invoices/{token}")
.header("X-Api-Id", "<api-key>")
.header("X-Api-Key", "<api-key>")
.header("X-Signature", "<api-key>")
.header("X-Timestamp", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/public/invoices/{token}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Id"] = '<api-key>'
request["X-Api-Key"] = '<api-key>'
request["X-Signature"] = '<api-key>'
request["X-Timestamp"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"token": "<string>",
"title": "<string>",
"description": "<string>",
"assetCode": "USDT_TRC20",
"assetSymbol": "USDT",
"assetName": "Tether USD (TRC-20)",
"network": "TRON",
"address": "<string>",
"memo": "<string>",
"expectedAmount": "100.50",
"amountUsd": "100.42",
"pegUsdAmount": "<string>",
"pegRate": "<string>",
"decimals": 6,
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"state": "pending",
"paymentStatus": "<string>",
"receivedAmount": "<string>",
"confirmations": 123,
"requiredConfirmations": 19,
"txhash": "<string>",
"explorerTxUrl": "<string>",
"explorerAddressUrl": "<string>",
"paidAt": "2023-11-07T05:31:56Z",
"remainingAmount": "<string>",
"branding": {
"displayName": "WalletCore",
"primaryColor": "#3b82f6",
"logoUrl": "<string>",
"supportUrl": "<string>",
"locale": "ru",
"theme": "light"
},
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderId": "<string>",
"urlReturn": "<string>",
"urlSuccess": "<string>",
"theme": "light",
"locale": "ru"
}Authorizations
Публичный идентификатор API-ключа
Публичный API-ключ
HMAC-SHA256-Hex(timestamp + "." + raw_body, api_secret)
Unix-секунды, ±300с
Path Parameters
Публичный токен из ссылки счёта.
Response
"USDT_TRC20"
"USDT"
"Tether USD (TRC-20)"
"TRON"
Адрес для оплаты (показывается + QR).
Memo (ОБЯЗАТЕЛЕН для memo-based сетей, иначе null).
"100.50"
USD-эквивалент (best-effort).
"100.42"
USD-пег: сумма счёта в долларах (курс зафиксирован при выставлении).
Курс фиксации (USD за 1 единицу актива), только для пег-счетов.
6
Срок оплаты (для обратного отсчёта).
Состояние оплаты для UI.
pending, detected, paid, overpaid, underpaid, underpaid_waiting, refunded, expired Сырой статус депозита.
19
1.4.0: в состоянии underpaid_waiting — сколько ещё нужно прислать.
Show child attributes
Show child attributes
1.4.0
1.4.0: order_id счёта (для редиректов).
1.4.0: ссылка «Вернуться в магазин».
1.4.0: авто-редирект после оплаты.
light, dark, auto ru, en