CrocoPay
RU Log in Sign up

Developers

Host-to-Host integration — direct server-to-server communication. You create an invoice via the API, receive the payment details and show them to the payer on your side, with no redirect to CrocoPay.

3 endpoints 11 currencies Header authentication HMAC-signed callback

You create an invoice via the API, receive the payment details (card, phone number or QR) and show them to the payer on your side — no redirect to CrocoPay.

Authentication

All requests require the headers Client-Id and Client-Secret. You will find the keys under “Shops” → the gear icon next to the merchant.

Client-Id: GnHqauRCUVtB8sECR7m
Client-Secret: vpBpXo7REyApkDnLIOpMR3lk1ndaLmY2qoZptV9cHOtjJLUDsW26GBSe2kda1IVQIMR758Z

1. Create an invoice

POST /api/v2/h2h/invoices

Creates a new payment invoice. Returns the invoice ID and the payment details.

POST /api/v2/h2h/invoices HTTP/1.1
Host: crocopay.tech
Client-Id: GnHqauRCUVtB8sECR7m
Client-Secret: vpBpXo7REyApkDnLIOpMR3lk1ndaLmY2qoZptV9cHOtjJLUDsW26GBSe2kda1IVQIMR758Z
Content-Type: application/json

{
    "amount": 5000,
    "currency": "RUB",
    "payment_option": "TO_CARD",
    "callback_url": "https://example.com/payment?user_id=42"
}
Response — card details (TO_CARD)
HTTP/1.1 200 OK

{
    "id": "911c2823-f55b-43b5-9881-d5653107f7dc",
    "status": "Pending",
    "amount": 5000,
    "currency": "RUB",
    "payment_option": "TO_CARD",
    "card": "4276 1234 5678 9012",
    "bank_receiver": "Sberbank",
    "card_owner": "IVAN PETROV",
    "expires_at": "2026-09-15T12:30:00Z"
}
Response — phone details (SBP / TRANSGRAN_SBER)
HTTP/1.1 200 OK

{
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "status": "Pending",
    "amount": 5000,
    "currency": "RUB",
    "payment_option": "SBP",
    "card": "+79001234567",
    "bank_receiver": "Alfa-Bank",
    "card_owner": "ANNA SIDOROVA",
    "expires_at": "2026-09-15T12:30:00Z"
}
Response — error
HTTP/1.1 422 Unprocessable Entity

{
    "status": "error",
    "message": "payment_option TO_CARD is not enabled for currency UZS"
}

2. Get an invoice

GET /api/v2/h2h/invoices/{id}

Returns the current status and details of an invoice by its UUID — use it to poll until the invoice is paid.

Pending
Awaiting payment
Success
Paid
Expired
Payment window expired
Cancelled
Cancelled
Failed
Payment error

3. Available payment methods

GET /api/v2/h2h/payment-method/available

Returns the payment methods available to your shop — call it before creating an invoice.

HTTP/1.1 200 OK

{
    "methods": [
        { "currency": "RUB", "payment_option": "TO_CARD",       "name": "Card (any Russian bank)" },
        { "currency": "RUB", "payment_option": "SBP",            "name": "SBP (any Russian bank)" },
        { "currency": "RUB", "payment_option": "SBP_ALFA",       "name": "SBP Alfa-Bank" },
        { "currency": "RUB", "payment_option": "QR_NSPK",        "name": "QR NSPK" },
        { "currency": "RUB", "payment_option": "TRANSGRAN_SBER", "name": "Cross-border · SberPay" },
        { "currency": "UAH", "payment_option": "TO_CARD",        "name": "Card (Ukraine)" },
        { "currency": "UZS", "payment_option": "TO_CARD",        "name": "Card (Uzbekistan)" },
        { "currency": "TJS", "payment_option": "TO_CARD",        "name": "Card (Tajikistan)" },
        { "currency": "AZN", "payment_option": "TO_CARD",        "name": "Card (Azerbaijan)" },
        { "currency": "KZT", "payment_option": "TO_CARD",        "name": "Card (Kazakhstan)" },
        { "currency": "KGS", "payment_option": "TO_CARD",        "name": "Card (Kyrgyzstan)" }
    ]
}

payment_option by currency

The value of payment_option depends on the currency. Ask your manager which methods are enabled for your shop.

RUB Russia
TO_CARD Bank card transfer (any Russian bank) Card number
SBP SBP transfer — any Russian bank Phone number
SBP_ALFA SBP transfer — Alfa-Bank Phone number
SBP_TBANK SBP transfer — T-Bank Phone number
QR_NSPK NSPK QR code payment QR code
MOBILE_PHONE Mobile phone top-up Phone number
TO_CARD_TRANSGRAN Cross-border card transfer (any bank) Card number
SBP_TRANSGRAN Cross-border SBP transfer (any bank) Phone number
TRANSGRAN_ALFA Cross-border — Alfa-Bank Card / phone
TRANSGRAN_VTB Cross-border — VTB Card / phone
TRANSGRAN_SBER Cross-border — SberPay Phone number
TRANSGRAN_TPAY Cross-border — T-Pay (T-Bank) Card / phone
UAH Ukraine
TO_CARD Bank card transfer (Ukraine) Card number
UZS Uzbekistan
UZCARD UzCard card transfer Card number
HUMO Humo card transfer Card number
PAYME Payme transfer Card / phone
CLICK Click transfer Card / phone
KZT Kazakhstan
BANK_TRANSFER Bank transfer (Kazakhstan) Card number
AZN Azerbaijan
BANK_TRANSFER Bank transfer (Azerbaijan) Card number
TJS Tajikistan
KORTI_MILLI Transfer — Korti Milli Card number
DUSHANBE_CITY Transfer — Dushanbe City Bank Card number
KGS Kyrgyzstan
TO_CARD Bank card transfer (Kyrgyzstan) Card number

Webhook (Callback)

After a successful payment CrocoPay sends a POST to your callback_url.

POST /payment?user_id=42 HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "timestamp": 1753282096,
    "subtotal": 500000,
    "percentage": 0,
    "charge_percentage": 0,
    "charge_fixed": 0,
    "total": 500000,
    "sign": "ef5954715c663e3f96194a03981a0b04dd0772bfa5164afcdb507470c9c5078d"
}
Signature check (PHP)
$expected = hash_hmac('sha256',
    "{$_POST['timestamp']}|{$_POST['subtotal']}|{$_POST['percentage']}|" .
    "{$_POST['charge_percentage']}|{$_POST['charge_fixed']}|{$_POST['total']}",
    $yourClientSecret
);

if (!hash_equals($expected, $_POST['sign'])) {
    http_response_code(403);
    exit('Invalid signature');
}
// payment confirmed
Need API keys?
Sign up — your Client-Id and Client-Secret are issued under “Shops”.
Sign up