QR-код адреса оплаты
curl --request GET \
--url https://api.oblodai.com/v1/pay/{id}/qr<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.oblodai.com/v1/pay/{id}/qr",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {method: 'GET'};
fetch('https://api.oblodai.com/v1/pay/{id}/qr', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.oblodai.com/v1/pay/{id}/qr"
response = requests.get(url)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.oblodai.com/v1/pay/{id}/qr"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}QR-код адреса оплаты
PNG-картинка с QR того адреса (и суммы), которые уже вернул GET /v1/pay/{id}. Без ключа — её грузит браузер покупателя.
GET
/
v1
/
pay
/
{id}
/
qr
QR-код адреса оплаты
curl --request GET \
--url https://api.oblodai.com/v1/pay/{id}/qr<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.oblodai.com/v1/pay/{id}/qr",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {method: 'GET'};
fetch('https://api.oblodai.com/v1/pay/{id}/qr', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.oblodai.com/v1/pay/{id}/qr"
response = requests.get(url)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.oblodai.com/v1/pay/{id}/qr"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Ответ
200
Success
⌘I