Host-to-Host 对接 —— 服务器与服务器直接通信。您通过 API 创建订单,获取收款信息并在自己的页面展示给付款人,无需跳转到 CrocoPay。
您通过 API 创建订单,获取收款信息(卡号、手机号或二维码)并在自己的页面展示给付款人 —— 无需跳转到 CrocoPay。
所有请求都需要请求头 Client-Id 和 Client-Secret。密钥位于“商店”→ 商户旁的齿轮图标。
创建新的支付订单,返回订单 ID 和收款信息。
amount
是
付款金额(独联体货币为整数)
currency
是
币种:RUB、UAH、UZS、KZT、TJS、AZN、KGS
payment_option
是
支付方式(TO_CARD、SBP、QR_NSPK…)
callback_url
否
付款 Webhook 通知地址(POST)
success_url
否
付款成功后付款人的跳转地址。不传时付款人将看到 CrocoPay 确认页面
cancel_url
否
付款人取消付款或订单过期时的跳转地址。不传时付款人停留在 CrocoPay 页面
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",
"success_url": "https://example.com/success",
"cancel_url": "https://example.com/cancel"
}
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"
}
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"
}
HTTP/1.1 422 Unprocessable Entity
{
"status": "error",
"message": "payment_option TO_CARD is not enabled for currency UZS"
}
按 UUID 返回订单的当前状态和收款信息 —— 可用于轮询直到付款完成。
返回您商店可用的支付方式 —— 请在创建订单前调用。
HTTP/1.1 200 OK
{
"methods": [
{ "currency": "RUB", "payment_option": "TO_CARD", "name": "银行卡(任意俄罗斯银行)" },
{ "currency": "RUB", "payment_option": "SBP", "name": "SBP(任意俄罗斯银行)" },
{ "currency": "RUB", "payment_option": "SBP_ALFA", "name": "SBP Alfa-Bank" },
{ "currency": "RUB", "payment_option": "QR_NSPK", "name": "NSPK 二维码" },
{ "currency": "RUB", "payment_option": "TRANSGRAN_SBER", "name": "跨境 · SberPay" },
{ "currency": "UAH", "payment_option": "TO_CARD", "name": "银行卡(乌克兰)" },
{ "currency": "UZS", "payment_option": "TO_CARD", "name": "银行卡(乌兹别克斯坦)" },
{ "currency": "TJS", "payment_option": "TO_CARD", "name": "银行卡(塔吉克斯坦)" },
{ "currency": "AZN", "payment_option": "TO_CARD", "name": "银行卡(阿塞拜疆)" },
{ "currency": "KZT", "payment_option": "TO_CARD", "name": "银行卡(哈萨克斯坦)" },
{ "currency": "KGS", "payment_option": "TO_CARD", "name": "银行卡(吉尔吉斯斯坦)" }
]
}
参数 payment_option 的取值取决于币种。请向客户经理确认您的商店已开通哪些方式。
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
TO_CARD
Bank card transfer (Ukraine)
Card number
UZCARD
UzCard card transfer
Card number
HUMO
Humo card transfer
Card number
PAYME
Payme transfer
Card / phone
CLICK
Click transfer
Card / phone
BANK_TRANSFER
Bank transfer (Kazakhstan)
Card number
BANK_TRANSFER
Bank transfer (Azerbaijan)
Card number
KORTI_MILLI
Transfer — Korti Milli
Card number
DUSHANBE_CITY
Transfer — Dushanbe City Bank
Card number
TO_CARD
Bank card transfer (Kyrgyzstan)
Card number
success_urlcancel_url付款成功后,CrocoPay 会向您的以下地址发送 POST: 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"
}
$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');
}
// 付款已确认 Express 对接 —— 只需一个 API 请求即可创建支付链接,付款人进入现成的 CrocoPay 品牌支付页面。一个商店支持多个国家和币种,开箱即用。
一个 POST 请求即可创建支付链接 —— 付款人打开 CrocoPay 品牌页面,选择国家和支付方式并完成付款。
发起支付并返回 redirect_url —— 支付页面链接。
client_id
是
商店 ID
client_secret
是
商店密钥
amount
是
付款金额(独联体货币为整数)
currency
是
币种:RUB、UAH、UZS、KZT、TJS、AZN、KGS
successUrl
否
付款成功后付款人的跳转地址。不传时付款人将看到 CrocoPay 确认页面
cancelUrl
否
取消或订单过期时付款人的跳转地址。不传时付款人停留在 CrocoPay 页面
callbackUrl
否
付款 Webhook 通知地址(POST)。请在其中包含订单 ID
POST /api/v2/initiate-payment HTTP/1.1 Host: crocopay.tech Content-Type: application/x-www-form-urlencoded client_id=GnHAFAZsT1ktFYqauUVtB8sECR7m &client_secret=vpBpXN40yaWQWicAobl...R758Z &amount=5000 ¤cy=RUB &successUrl=https://example.com/success &cancelUrl=https://example.com/cancel &callbackUrl=https://example.com/payment?user_id=42
HTTP/1.1 200 OK
{
"status": "success",
"message": "Initiated payment successfully.",
"redirect_url": "https://crocopay.tech/restapi/payment?grant_id=78784424&token=DuMJThhEimrrdiCKrW2A"
}
// 商户未开通该币种
{ "status": "error", "message": "Currency UAH is not supported by this merchant." }
// 金额为零
{ "status": "error", "message": "Amount cannot be 0 or less than 0." }
// 仅支持整数的币种传入了小数金额(HTTP 422)
{ "message": "The amount for currency RUB must be a whole number, without minor units." }
// client_id / client_secret 无效(HTTP 403)
{ "message": "Can not verify the client. Please check client Id and Client Secret." }
示例: 商店配置了 RUB + UZS,请求金额为 5,000 卢布。来自乌兹别克斯坦的付款人选择 UZ —— 页面按当前汇率换算为 UZS,商户收到 UZS 的通知。
success_urlcancel_url付款成功后,CrocoPay 会向您的以下地址发送 POST: 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"
}
$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');
}
// 付款已确认 通过同一个 H2H API 收取全球客户的美元、欧元、加元和卢比付款。付款人使用普通 Visa/Mastercard 银行卡、Apple Pay、Google Pay、PayPal、Revolut 等 —— 无需独联体银行账户。
amount
是
金额。USD、EUR、INR 支持小数:49.99
currency
是
USD、EUR、CAD 或 INR
provider
否
服务商代码(stripe、paypal、revolut…)。不传时付款人在我们的页面上选择
callback_url
否
支付通知的发送地址。请在其中包含您的订单 ID
success_url
否
付款成功后付款人的跳转地址。不传时付款人将看到 CrocoPay 确认页面
cancel_url
否
取消或订单过期时付款人的跳转地址。不传时付款人停留在 CrocoPay 页面
provider 为可选参数 —— 它决定链接跳转到哪里:
GET /api/v2/h2h/payment-method/available (币种 USD / EUR)—— 列表会变化,请勿写死。如果该服务商未为您开通或暂时不可用,订单不会被拒绝 —— 而是返回选择页链接。未知的服务商代码返回 422 错误。旧参数名 onramp_provider 仍然兼容。stripe
Stripe / Link(银行卡、Apple Pay、Google Pay)coinbase
Coinbasepaypal
PayPal —— 需要 PayPal 账户robinhood
Robinhood —— 需要 Robinhood 账户revolut
Revolut —— 需要 Revolut 账户topper
Topperbanxa
Banxabinance
Binance Connectblockchaincom
Blockchain.comtransak
Transakmeld
Meld(聚合商)particle
Particle Networksardine
Sardineinterac
Interacupi
UPI / IMPS最低金额由服务商设定并会变化。低于最低金额的付款会在服务商页面被拒绝,而不是由 API 拒绝。国家按付款人 IP 判断:不服务该国家的服务商会拒绝付款(例如 PayPal 和 Robinhood 仅限美国)。美国/欧盟以外的客户请使用 stripe、topper、banxa、transak 或 binance —— 或不传 provider,让付款人自行选择。首次付款可能需要快速身份验证(KYC,约 2 分钟);银行卡需支持 3-D Secure。付款不可撤销 —— 没有拒付。
POST /api/v2/h2h/invoices HTTP/1.1
Host: crocopay.tech
Client-Id: GnHqauRCUVtB8sECR7m
Client-Secret: vpBpXo7REyApkDnLIOpMR3lk1ndaLmY2qoZptV9cHOtjJLUDsW26GBSe2kda1IVQIMR758Z
Content-Type: application/json
{
"amount": 49.99,
"currency": "USD",
"callback_url": "https://example.com/webhook?order=1042",
"success_url": "https://example.com/success",
"cancel_url": "https://example.com/cancel"
}
{
"amount": 120,
"currency": "EUR",
"provider": "revolut",
"callback_url": "https://example.com/webhook?order=1043"
}
HTTP/1.1 200 OK
{
"message": "Payment url was successfully generated",
"url": "https://pay.crocopay.tech/...",
"transaction": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "Pending",
"currency": "USD",
"amount": 49.99,
"expiredAt": "2026-10-19T12:30:00.000000Z"
}
}
transaction.id 来自响应 —— 传给 GET /api/v2/h2h/invoices/{id}。callback_url 通知不包含 ID —— 请将您的订单 ID 加入 callback_url(?order=1042).
关于手续费模式和为您的商店开通国际支付,请咨询客户经理。
success_urlcancel_url付款成功后,CrocoPay 会向您的以下地址发送 POST: 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"
}
$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');
}
// 付款已确认 通过 H2H API 接受加密货币:订单可以是任意币种(RUB、UZS、KZT、USD …),付款人用 USDT、USDC、BTC、ETH 等币种付款。以美元入账。
payment_option: "CRYPTO" 以订单币种计价。金额按 CrocoPay 汇率换算为美元,最低 10 USD。crypto_currency —— 将付款人跳转到 url:付款人选择公链和币种,看到地址、二维码和准确金额。crypto_currency (例如 USDT.Tron)—— 响应中已包含用于您页面的地址和准确金额。amount
number · 是
币种金额(独联体货币为整数)
currency
string · 是
已开通加密货币的订单币种
payment_option
string · 是
CRYPTO
crypto_currency
string · 否
币种 currency_id(USDT.Tron、BTC.Bitcoin …)。不传时由付款人选择
callback_url
string · 否
状态变更 Webhook
success_url
string · 否
付款成功后买家的跳转地址。不传时买家将看到 CrocoPay 确认页面
cancel_url
string · 否
取消或订单过期时买家的跳转地址。不传时买家停留在 CrocoPay 页面
POST /api/v2/h2h/invoices HTTP/1.1
Host: crocopay.tech
Client-Id: YOUR_CLIENT_ID
Client-Secret: YOUR_CLIENT_SECRET
Content-Type: application/json
{
"amount": 5000,
"currency": "RUB",
"payment_option": "CRYPTO",
"crypto_currency": "USDT.Tron",
"callback_url": "https://example.com/webhook?order=1042",
"success_url": "https://example.com/success"
}
HTTP/1.1 200 OK
{
"message": "Payment url was successfully generated",
"url": "https://crocopay.tech/restapi/crypto/pay?hash=a1b2c3d4-...",
"transaction": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "Pending",
"currency": "RUB",
"amount": 5000,
"expiredAt": "2026-10-23T14:30:00.000000Z"
},
"crypto": {
"status": "NEW",
"amount_usd": "61.73",
"coin": "USDT.Tron",
"network": "TRON (TRC-20)",
"pay_address": "TRQsqAhU21UH56Q6yr2fdVwLdPysAnkuLo",
"amount_to_pay": "61.74",
"expires_at": "2026-10-23T10:30:00+00:00",
"quote_expires_at": "2026-10-23T10:30:00+00:00"
}
}
不传 crypto_currency 时,coin、network、pay_address 和 amount_to_pay 为 null —— 请将付款人跳转到 url。
加密货币付款计入商户美元余额:订单美元金额减去 1% 手续费(分组费率不适用于加密货币)。付款后订单返回 amount 和 currency: USD,以及 order_amount、order_currency、paid_coin 和 paid_amount。
NEW
→ Pending
等待付款
PAID
→ Success
已付款(±1% 容差)—— 可以发货
OVERPAID
→ Success
多付 —— 可以发货
UNDERPAID
→ Pending
部分付款 —— 人工审核,请联系客服
EXPIRED
→ Cancelled
过期未付
将 currency_id 作为 crypto_currency 传入。订单美元金额不低于该币种最低金额时可用。
USDT.Tron 起 10 USD
USDD.Tron 起 10 USD
USD1.Tron 起 10 USD
TRX.Tron 起 10 USD
USDT.BNBSmartChain 起 10 USD
USDC.BNBSmartChain 起 10 USD
DAI.BNBSmartChain 起 10 USD
USDE.BNBSmartChain 起 10 USD
USDD.BNBSmartChain 起 10 USD
USD1.BNBSmartChain 起 10 USD
CAKE.BNBSmartChain 起 10 USD
SHIB.BNBSmartChain 起 10 USD
WLFI.BNBSmartChain 起 10 USD
BNB.BNBSmartChain 起 10 USD
USDT.Ethereum 起 50 USD
USDC.Ethereum 起 50 USD
DAI.Ethereum 起 50 USD
PYUSD.Ethereum 起 50 USD
USDE.Ethereum 起 50 USD
USDD.Ethereum 起 50 USD
USD1.Ethereum 起 50 USD
XAUT.Ethereum 起 50 USD
ARB.Ethereum 起 50 USD
SHIB.Ethereum 起 50 USD
PEPE.Ethereum 起 50 USD
WLD.Ethereum 起 50 USD
ENA.Ethereum 起 50 USD
SAND.Ethereum 起 50 USD
CAKE.Ethereum 起 50 USD
WLFI.Ethereum 起 50 USD
ETH.Ethereum 起 50 USD
USDT.Polygon 起 10 USD
USDC.Polygon 起 10 USD
POL.Polygon 起 10 USD
DAI.Polygon 起 10 USD
SAND.Polygon 起 10 USD
USDT.Arbitrum 起 10 USD
USDC.Arbitrum 起 10 USD
ETH.Arbitrum 起 10 USD
DAI.Arbitrum 起 10 USD
ARB.Arbitrum 起 10 USD
PYUSD.Arbitrum 起 10 USD
CAKE.Arbitrum 起 10 USD
BTC.Bitcoin 起 20 USD
LTC.Litecoin 起 10 USD
DOGE.Dogecoin 起 10 USD
BCH.Bitcoincash 起 10 USD
400
该金额下币种不可用 —— 响应中包含可选择其他币种的 url
403
该币种未开通加密货币支付 —— 请联系客户经理
422
金额低于 10 USD 或参数校验错误
5xx
临时错误或汇率不可用 —— 请稍后重试
success_urlcancel_url付款成功后,CrocoPay 会向您的以下地址发送 POST: 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"
}
$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');
}
// 付款已确认