Page cover

⌨️Примеры интеграции

Python

import requests, hashlib

order_id = "abc123"
amount = 10000
secret = "your_secret"
sign = hashlib.md5(f"{order_id}:{amount}:{secret}".encode()).hexdigest()

params = {
    "client_id": 123,
    "order_id": order_id,
    "amount": amount,
    "sign": sign
}

response = requests.get("https://apays.io/backend/create_order", params=params)
print(response.json())

curl

curl -G https://apays.io/backend/create_order \
  -d client_id=123 \
  -d order_id=abc123 \
  -d amount=10000 \
  -d sign=md5hash