Introduction
ArionPay provides a powerful REST API for accepting cryptocurrency payments. Whether you want a hosted checkout page or a completely custom white-label integration, our API handles the complexity.
Base URL:
https://api.arionpay.com/api/v1
Authentication
All API requests must be authenticated using HMAC-SHA256. This guarantees that requests cannot be tampered with during transit.
Required Headers
| Header | Example | Description |
|---|---|---|
x-api-key | pk_test_123... | Your Store's Public Key ID. |
x-signature | a1b2c3d4... | HMAC signature of the request body. |
Content-Type | application/json | Format of the payload. |
Create Invoice
Generate a payment request. By default, this returns a URL to our hosted checkout page.
POST /invoices
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
storeId | String | Yes | Your Store ID (from Dashboard). |
amount | Number | Yes | Fiat amount (e.g. 100.00). |
currency | String | No | Fiat currency (Default: USD). |
orderId | String | No | Your internal Order ID. |
chain | String | No | Pre-select a coin (e.g., LTC). |
Code Examples
const crypto = require('crypto');
const axios = require('axios');
const apiKey = "pk_test_123";
const secret = "sk_live_secret";
const url = "https://api.arionpay.com/api/v1/invoices";
const payload = {
storeId: "651a...",
amount: 100.00,
currency: "USD",
orderId: "ORD-1001"
};
const signature = crypto.createHmac('sha256', secret)
.update(JSON.stringify(payload))
.digest('hex');
axios.post(url, payload, {
headers: {
'x-api-key': apiKey,
'x-signature': signature,
'Content-Type': 'application/json'
}
}).then(res => console.log(res.data));
<?php
$apiKey = "pk_test_123";
$secret = "sk_live_secret";
$url = "https://api.arionpay.com/api/v1/invoices";
$data = [
"storeId" => "651a...",
"amount" => 100.00,
"currency" => "USD",
"orderId" => "ORD-1001"
];
$payload = json_encode($data);
$signature = hash_hmac('sha256', $payload, $secret);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"x-api-key: $apiKey",
"x-signature: $signature",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
print_r(json_decode($response));
?>
import hmac
import hashlib
import json
import requests
api_key = "pk_test_123"
secret = "sk_live_secret"
url = "https://api.arionpay.com/api/v1/invoices"
payload = {
"storeId": "651a...",
"amount": 100.00,
"currency": "USD",
"orderId": "ORD-1001"
}
body = json.dumps(payload)
signature = hmac.new(secret.encode(), body.encode(), hashlib.sha256).hexdigest()
headers = {
"x-api-key": api_key,
"x-signature": signature,
"Content-Type": "application/json"
}
response = requests.post(url, data=body, headers=headers)
print(response.json())
curl -X POST https://api.arionpay.com/api/v1/invoices \
-H "Content-Type: application/json" \
-H "x-api-key: pk_test_123" \
-H "x-signature: SIGNATURE_HERE" \
-d '{
"storeId": "651a...",
"amount": 100.00,
"currency": "USD",
"orderId": "ORD-1001"
}'
Response (Success)
{
"status": "success",
"data": {
"id": "inv_123456",
"invoice_url": "https://checkout.arionpay.com/pay/inv_123456",
"amount_fiat": 100,
"currency": "USD"
}
}
White Label Service
If White Label Mode is enabled, the API returns raw payment data instead of a link.
Response (White Label)
{
"status": "success",
"data": {
"id": "inv_987654",
"address": "ltc1q...",
"amount": "1.50000000",
"currency": "LTC",
"network": "LTC",
"payment_uri": "litecoin:ltc1q...?amount=1.5",
"qr_code": "https://api.qrserver.com/..."
}
}
Webhooks
We send a POST request to your callbackUrl when an invoice is paid.
// Webhook Payload
{
"id": "inv_123",
"status": "paid",
"amountCrypto": "0.50000000",
"txHash": "a1075db...",
"chain": "LTC"
}
Plugins & Integrations
Download our official modules for instant integration.