Skip to main content

Quick Start

Your first payment in 5 minutes.

Step 1 - Get API Keys

  1. Register at dashboard.airpay.ru
  2. Go to Settings → API Keys
  3. Copy sk_test_... (Sandbox secret key)
warning

Never expose your secret key (sk_) on the frontend. Use it on the server side only.

Step 2 - Create a Payment

curl -X POST https://sandbox.airpay.ru/v1/payments \
-H "Authorization: Bearer sk_test_YOUR_TEST_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 10000,
"currency": "RUB",
"capture": true,
"description": "Test payment",
"payment_method": {
"type": "token",
"token": "tok_test_visa_success"
}
}'

Step 3 - Check the Response

{
"id": "pay_3Kj8mN2pLq7rT",
"object": "payment",
"status": "SUCCEEDED",
"amount": 10000,
"currency": "RUB",
"created_at": "2024-11-15T10:23:45Z"
}

The SUCCEEDED status means the payment was processed successfully.

Don't rely solely on the API response - configure a Webhook to receive notifications about payment status changes.