Примеры запросов к API
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.crystalpay.io/v2/method/list/");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["auth_login" => "example", "auth_secret" => "example"]));
$result = curl_exec($ch);
curl_close($ch);
result = requests.post(
f"https://api.crystalpay.io/v2/method/list/",
json = {"auth_login": "example", "auth_secret": "example"},
headers = {'Content-Type': 'application/json'}
).json()
Last updated