CrossPayFX API
开发者

在 CrossPayFX 上构建

签名 API、幂等请求和 Webhook,让支付运营可预测。

OpenAPI JSON 13 个接口
接口根地址 https://crosspayfx.com
鉴权方式 商户 RSA 签名 / 收银台 session token / 平台通知签名
响应结构 JSON:{ code, message, data, request_id }
OpenAPI JSON 可导入 Postman、Swagger UI 或任意 OpenAPI 3 工具。

鉴权方式

使用 RSA-SHA256 加签,base64 结果放入 X-Sign。X-Timestamp 允许 5 分钟偏差;X-Nonce 只能使用一次。

商户通知:平台 POST 到你下单时传入的 notify_url,并使用平台私钥对原始 body 签名;商户用平台公钥验签。

收银台接口使用 checkout_url 中的一次性 token,不使用商户 RSA 签名。

签名原文(按行拼接):METHOD、PATH、SORTED_QUERY、SHA256(RAW_BODY)、MERCHANT_NO、TIMESTAMP、NONCE

收单

2
POST /api/v1/payment-orders

Create a payment order or checkout session

Creates a payment order for the authenticated merchant. When method is omitted, a hosted checkout session is created and checkout_url is returned instead of an order. When method is card, qr or subscription, amount, country and currency are required (subscription create mode uses amount 0.00). Subscription orders return a QR code in pay_url; scan it to complete subscription or payment + subscription binding.

商户 RSA 签名 收单
请求头
字段类型必填说明示例
X-Merchant-No string 必填 商户号(merchant_sn) M10001
X-Timestamp integer 必填 Unix 秒级时间戳,允许偏差 5 分钟 1770000000
X-Nonce string 必填 16-64 位随机串,防重放 8f3c2a1b9d4e6f70
X-Sign string 必填 RSA-SHA256 签名(base64) base64-signature
JSON 请求体
字段类型必填说明示例
merchant_order_no string 必填 Merchant-side order number, max 64 chars. Also used as the idempotency key. ORDER-20261114-001
method string 可选 Acquiring method: card, qr or subscription. Omit to create a checkout session. card
amount string 可选 Positive decimal string, max 2 decimal places. Required for card/qr; subscription pay mode requires > 0 and subscription create mode requires 0.00. 100.00
country string 可选 ISO 3166-1 alpha-2 country code. Required when method is present; subscription supports RU only. RU
currency string 可选 ISO 4217 three-letter currency code. Required when method is present; subscription supports RUB only. RUB
subscription_mode string 可选 Subscription mode: create (subscription QR, amount 0) or pay (pay then bind subscription). Inferred from amount when omitted. create
client_login string 可选 Merchant user identifier (email, phone or internal user id). Required when method=subscription. user-10001
account_bank string 可选 Payer bank/operator ID. Required when method=subscription and subscription_mode=pay. 1000000001
description string 可选 Order description, max 32 chars. Required when method=subscription. Monthly subscription
return_url string 可选 HTTPS return URL after payment. https://merchant.example/return
notify_url string 可选 HTTPS server notification URL. https://merchant.example/notify
lang string 可选 Hosted checkout language: en, zh or ru. Defaults to en when method is omitted. en
card object 可选 Card data. Required when method=card. Card data is never stored in logs.
card.card_number string 必填 12-19 digits; spaces and hyphens are removed. 4000000000000000
card.cvv string 必填 3-5 digits. 123
card.expiry_month string 可选 Two-digit month, or use expiry. 11
card.expiry_year string 可选 Two or four digit year, or use expiry. 2026
card.expiry string 可选 Alternative expiry in MM/YY format. 11/26
card.email string 必填 Cardholder email. [email protected]
card.first_name string 必填 Cardholder first name. John
card.last_name string 必填 Cardholder last name. Doe
card.billing_info object 可选 Optional billing address.
card.billing_info.bill_address string 可选 Street address. 155 Osceola Rd
card.billing_info.bill_country string 可选 Numeric country code. 840
card.billing_info.bill_state string 可选 State or region. FL
card.billing_info.bill_city string 可选 City. Belleair
card.billing_info.bill_zip string 可选 Postal code. 33756
card.billing_info.bill_phone string 可选 Phone number. 7275109811
响应
200 Payment order or checkout session created.
{
    "code": 0,
    "message": "OK",
    "data": {
        "order_no": "P20261114120000ABCDEF",
        "merchant_order_no": "ORDER-20261114-001",
        "method_code": "card",
        "country_code": "RU",
        "currency": "RUB",
        "amount": "100.00",
        "status": 3
    },
    "request_id": "8f3c2a1b9d4e6f70"
}
401 Missing or invalid signature.
{
    "code": 1021,
    "message": "Unauthorized",
    "data": null,
    "request_id": "8f3c2a1b9d4e6f70"
}
422 Invalid parameter or unavailable method.
{
    "code": 1001,
    "message": "Invalid parameter: amount",
    "data": null,
    "request_id": "8f3c2a1b9d4e6f70"
}
GET /api/v1/payment-orders/{merchant_order_no}

Query a payment order

Returns the latest local state of a payment order by merchant order number. Channel details are not exposed.

商户 RSA 签名 收单
请求头
字段类型必填说明示例
X-Merchant-No string 必填 商户号(merchant_sn) M10001
X-Timestamp integer 必填 Unix 秒级时间戳,允许偏差 5 分钟 1770000000
X-Nonce string 必填 16-64 位随机串,防重放 8f3c2a1b9d4e6f70
X-Sign string 必填 RSA-SHA256 签名(base64) base64-signature
路径参数
字段类型必填说明示例
merchant_order_no string 必填 Merchant order number. ORDER-20261114-001
响应
200 Payment order state.
{
    "code": 0,
    "message": "OK",
    "data": {
        "order_no": "P20261114120000ABCDEF",
        "merchant_order_no": "ORDER-20261114-001",
        "status": 3,
        "pay_url": null,
        "paid_at": null
    },
    "request_id": "8f3c2a1b9d4e6f70"
}
404 Payment order not found.
{
    "code": 1004,
    "message": "Not found",
    "data": null,
    "request_id": "8f3c2a1b9d4e6f70"
}

收款人

4
GET /api/v1/beneficiaries

List beneficiaries

Returns a paginated beneficiary list for the authenticated merchant. Account numbers are masked; ciphertext and hashes are never returned.

商户 RSA 签名 收款人
请求头
字段类型必填说明示例
X-Merchant-No string 必填 商户号(merchant_sn) M10001
X-Timestamp integer 必填 Unix 秒级时间戳,允许偏差 5 分钟 1770000000
X-Nonce string 必填 16-64 位随机串,防重放 8f3c2a1b9d4e6f70
X-Sign string 必填 RSA-SHA256 签名(base64) base64-signature
查询参数
字段类型必填说明示例
page integer 可选 Page number, default 1. 1
page_size integer 可选 Page size, 1-100, default 10. 10
status integer 可选 1 enabled, 2 disabled; 0 means all. 0
kyc_status integer 可选 1 pending, 2 reviewing, 3 approved, 4 rejected; 0 means all. 0
name string 可选 Partial beneficiary name. John
bank_code string 可选 Exact bank code. SBER
响应
200 Beneficiary page.
{
    "code": 0,
    "message": "OK",
    "data": {
        "total": 1,
        "list": [
            {
                "id": 1,
                "name": "John Doe",
                "country_code": "RU",
                "currency": "RUB",
                "account_number_mask": "**** **** 1234",
                "status": 1,
                "kyc_status": 1
            }
        ]
    },
    "request_id": "8f3c2a1b9d4e6f70"
}
POST /api/v1/beneficiaries

Create a beneficiary

Creates a beneficiary for payouts. The account number is encrypted at rest and returned only as a mask. SBP and bank accounts require a bank_code.

商户 RSA 签名 收款人
请求头
字段类型必填说明示例
X-Merchant-No string 必填 商户号(merchant_sn) M10001
X-Timestamp integer 必填 Unix 秒级时间戳,允许偏差 5 分钟 1770000000
X-Nonce string 必填 16-64 位随机串,防重放 8f3c2a1b9d4e6f70
X-Sign string 必填 RSA-SHA256 签名(base64) base64-signature
JSON 请求体
字段类型必填说明示例
beneficiary_type integer 必填 1 person, 2 company, 3 merchant self. 1
name string 必填 Beneficiary name, max 128 chars. John Doe
country_code string 必填 ISO 3166-1 alpha-2 country code. RU
currency string 必填 ISO 4217 three-letter currency code. RUB
account_type integer 必填 1 card, 2 SBP, 3 bank account. 2
account_number string 必填 Account number or card number, max 64 chars. 40817810000000000001
bank_code string 可选 Bank code. Required for SBP and bank account types. SBER
响应
200 Beneficiary created.
{
    "code": 0,
    "message": "OK",
    "data": {
        "id": 1,
        "name": "John Doe",
        "country_code": "RU",
        "currency": "RUB",
        "account_type": 2,
        "account_number_mask": "**** **** 0001",
        "status": 1,
        "kyc_status": 1
    },
    "request_id": "8f3c2a1b9d4e6f70"
}
409 Beneficiary already exists.
{
    "code": 1005,
    "message": "Beneficiary already exists",
    "data": null,
    "request_id": "8f3c2a1b9d4e6f70"
}
422 Invalid parameter or disabled bank.
{
    "code": 1001,
    "message": "Invalid parameter: account_number",
    "data": null,
    "request_id": "8f3c2a1b9d4e6f70"
}
GET /api/v1/beneficiaries/{id}

Get a beneficiary

Returns one beneficiary owned by the authenticated merchant.

商户 RSA 签名 收款人
请求头
字段类型必填说明示例
X-Merchant-No string 必填 商户号(merchant_sn) M10001
X-Timestamp integer 必填 Unix 秒级时间戳,允许偏差 5 分钟 1770000000
X-Nonce string 必填 16-64 位随机串,防重放 8f3c2a1b9d4e6f70
X-Sign string 必填 RSA-SHA256 签名(base64) base64-signature
路径参数
字段类型必填说明示例
id integer 必填 Beneficiary ID. 1
响应
200 Beneficiary detail.
{
    "code": 0,
    "message": "OK",
    "data": {
        "id": 1,
        "name": "John Doe",
        "country_code": "RU",
        "currency": "RUB",
        "account_number_mask": "**** **** 0001",
        "status": 1
    },
    "request_id": "8f3c2a1b9d4e6f70"
}
404 Beneficiary not found.
{
    "code": 1004,
    "message": "Not found",
    "data": null,
    "request_id": "8f3c2a1b9d4e6f70"
}
POST /api/v1/beneficiaries/{id}/disable

Disable a beneficiary

Disables a beneficiary so it can no longer be used for new payouts. Existing payout records are not changed.

商户 RSA 签名 收款人
请求头
字段类型必填说明示例
X-Merchant-No string 必填 商户号(merchant_sn) M10001
X-Timestamp integer 必填 Unix 秒级时间戳,允许偏差 5 分钟 1770000000
X-Nonce string 必填 16-64 位随机串,防重放 8f3c2a1b9d4e6f70
X-Sign string 必填 RSA-SHA256 签名(base64) base64-signature
路径参数
字段类型必填说明示例
id integer 必填 Beneficiary ID. 1
响应
200 Beneficiary disabled.
{
    "code": 0,
    "message": "OK",
    "data": {
        "id": 1,
        "status": 2
    },
    "request_id": "8f3c2a1b9d4e6f70"
}
404 Beneficiary not found.
{
    "code": 1004,
    "message": "Not found",
    "data": null,
    "request_id": "8f3c2a1b9d4e6f70"
}

出款

3
POST /api/v1/payouts

Create a payout

Creates a payout, withdrawal or third-party transfer for the authenticated merchant. Funds are frozen in a database transaction, then submitted upstream. The beneficiary country and currency must match the request.

商户 RSA 签名 出款
请求头
字段类型必填说明示例
X-Merchant-No string 必填 商户号(merchant_sn) M10001
X-Timestamp integer 必填 Unix 秒级时间戳,允许偏差 5 分钟 1770000000
X-Nonce string 必填 16-64 位随机串,防重放 8f3c2a1b9d4e6f70
X-Sign string 必填 RSA-SHA256 签名(base64) base64-signature
JSON 请求体
字段类型必填说明示例
payout_type integer 必填 1 payout, 2 withdrawal, 3 third-party transfer. 1
country_code string 必填 ISO 3166-1 alpha-2 country code; must match the beneficiary. RU
currency string 必填 ISO 4217 currency; must match the beneficiary. RUB
amount string 必填 Positive integer string, no decimal point. 1000
beneficiary_id integer 必填 Enabled beneficiary owned by the merchant. 1
idempotency_key string 必填 Unique merchant idempotency key, max 64 chars. Repeating the same request returns the first result; different parameters conflict. PAYOUT-20261114-001
remarks string 可选 Optional remark, max 256 chars. Supplier invoice 1001
响应
202 Payout accepted and submitted.
{
    "code": 0,
    "message": "Accepted",
    "data": {
        "payout": {
            "payout_no": "P20261114120000ABCDEF",
            "status": 2,
            "amount": "1000",
            "fee_amount": "0",
            "currency": "RUB"
        },
        "upstream_ok": true,
        "idempotent": false
    },
    "request_id": "8f3c2a1b9d4e6f70"
}
409 Idempotency key conflicts with different parameters.
{
    "code": 1005,
    "message": "Idempotency key conflicts with different parameters",
    "data": null,
    "request_id": "8f3c2a1b9d4e6f70"
}
422 Insufficient balance, invalid beneficiary or payout channel unavailable.
{
    "code": 1019,
    "message": "Insufficient available balance",
    "data": null,
    "request_id": "8f3c2a1b9d4e6f70"
}
GET /api/v1/payouts/{payout_no}

Get a payout

Returns the local state of one payout owned by the authenticated merchant. Account data is masked.

商户 RSA 签名 出款
请求头
字段类型必填说明示例
X-Merchant-No string 必填 商户号(merchant_sn) M10001
X-Timestamp integer 必填 Unix 秒级时间戳,允许偏差 5 分钟 1770000000
X-Nonce string 必填 16-64 位随机串,防重放 8f3c2a1b9d4e6f70
X-Sign string 必填 RSA-SHA256 签名(base64) base64-signature
路径参数
字段类型必填说明示例
payout_no string 必填 Platform payout number. P20261114120000ABCDEF
响应
200 Payout detail.
{
    "code": 0,
    "message": "OK",
    "data": {
        "payout_no": "P20261114120000ABCDEF",
        "status": 4,
        "amount": "1000",
        "currency": "RUB",
        "account_number_mask": "**** **** 0001"
    },
    "request_id": "8f3c2a1b9d4e6f70"
}
404 Payout not found.
{
    "code": 1004,
    "message": "Not found",
    "data": null,
    "request_id": "8f3c2a1b9d4e6f70"
}
POST /api/v1/payouts/{payout_no}/query

Query payout status upstream

Queries the payout state from the upstream channel and updates the local record when the upstream response is authoritative. Returns both the local payout and the upstream result.

商户 RSA 签名 出款
请求头
字段类型必填说明示例
X-Merchant-No string 必填 商户号(merchant_sn) M10001
X-Timestamp integer 必填 Unix 秒级时间戳,允许偏差 5 分钟 1770000000
X-Nonce string 必填 16-64 位随机串,防重放 8f3c2a1b9d4e6f70
X-Sign string 必填 RSA-SHA256 签名(base64) base64-signature
路径参数
字段类型必填说明示例
payout_no string 必填 Platform payout number. P20261114120000ABCDEF
响应
200 Local payout plus upstream query result.
{
    "code": 0,
    "message": "OK",
    "data": {
        "payout": {
            "payout_no": "P20261114120000ABCDEF",
            "status": 4
        },
        "upstream_ok": true,
        "upstream": {
            "code": 0,
            "result": {
                "status": "2"
            }
        }
    },
    "request_id": "8f3c2a1b9d4e6f70"
}
404 Payout not found.
{
    "code": 1004,
    "message": "Not found",
    "data": null,
    "request_id": "8f3c2a1b9d4e6f70"
}

收银台

3
GET /api/v1/checkout-sessions/{session_no}

Get checkout options

Returns the payment methods available for a hosted checkout session. The session token is required and is not a merchant RSA signature.

收银台 session token 收银台
路径参数
字段类型必填说明示例
session_no string 必填 Checkout session number. CS0123456789ABCDEF
查询参数
字段类型必填说明示例
token string 必填 Opaque checkout token from checkout_url. 0123456789abcdef0123456789abcdef
响应
200 Available checkout methods.
{
    "code": 0,
    "message": "OK",
    "data": {
        "country_code": "RU",
        "currency": "RUB",
        "amount": "100.00",
        "methods": [
            "card",
            "subscription"
        ],
        "method_meta": [
            {
                "code": "card",
                "name_en": "Card",
                "name_zh": "银行卡",
                "name_ru": "Банковская карта",
                "icon": "fa-credit-card"
            },
            {
                "code": "subscription",
                "name_en": "Subscription",
                "name_zh": "订阅",
                "name_ru": "Подписка",
                "icon": "fa-repeat"
            }
        ],
        "theme": {
            "primary_color": "#2563EB",
            "logo_url": "",
            "title": ""
        }
    },
    "request_id": "8f3c2a1b9d4e6f70"
}
422 Invalid or expired session token.
{
    "code": 1030,
    "message": "Checkout session invalid or expired",
    "data": null,
    "request_id": "8f3c2a1b9d4e6f70"
}
GET /api/v1/checkout-sessions/{session_no}/status

Get checkout payment status

Returns the current payment status for the checkout session and actively queries the upstream channel for QR/card orders still in progress. The session token is required.

收银台 session token 收银台
路径参数
字段类型必填说明示例
session_no string 必填 Checkout session number. CS0123456789ABCDEF
查询参数
字段类型必填说明示例
token string 必填 Opaque checkout token from checkout_url. 0123456789abcdef0123456789abcdef
响应
200 Checkout order status.
{
    "code": 0,
    "message": "OK",
    "data": {
        "order_no": "P20261114120000ABCDEF",
        "status": 3,
        "next_action": {
            "type": "qrcode",
            "url": "https://qr.nspk.ru/AD..."
        },
        "pay_url": "https://qr.nspk.ru/AD...",
        "pay_type": "qrcode",
        "error_code": null,
        "error_msg": null,
        "queried": true
    },
    "request_id": "8f3c2a1b9d4e6f70"
}
422 Invalid or expired session token.
{
    "code": 1030,
    "message": "Checkout session invalid or expired",
    "data": null,
    "request_id": "8f3c2a1b9d4e6f70"
}
POST /api/v1/checkout-sessions/{session_no}/pay

Submit a checkout payment

Submits a payment for a hosted checkout session. The token and method must match the session; card data is required for card payments, subscription fields are required for subscription payments, and card data is never stored in logs.

收银台 session token 收银台
路径参数
字段类型必填说明示例
session_no string 必填 Checkout session number. CS0123456789ABCDEF
JSON 请求体
字段类型必填说明示例
token string 必填 Opaque checkout token. 0123456789abcdef0123456789abcdef
method string 必填 Payment method enabled for this session: card, qr or subscription. card
card object 可选 Card data, required when method=card.
card.card_number string 必填 Card number, 12-19 digits. 4000000000000000
card.cvv string 必填 3-5 digits. 123
card.expiry string 可选 MM/YY, or use expiry_month and expiry_year. 11/26
card.email string 必填 Cardholder email. [email protected]
card.first_name string 必填 Cardholder first name. John
card.last_name string 必填 Cardholder last name. Doe
subscription_mode string 可选 create for a zero-amount subscription QR, pay for payment + subscription binding; inferred from amount when omitted. create
client_login string 可选 Merchant user identifier, required when method=subscription. user-10001
description string 可选 Subscription description, max 32 chars, required when method=subscription. Monthly subscription
account_bank string 可选 Bank/operator ID, required when method=subscription and amount > 0. 1000000001
响应
200 Payment created.
{
    "code": 0,
    "message": "OK",
    "data": {
        "order_no": "P20261114120000ABCDEF",
        "merchant_order_no": "ORDER-1001",
        "status": 3,
        "pay_url": "https://example.com/pay"
    },
    "request_id": "8f3c2a1b9d4e6f70"
}
409 Checkout submission already in progress.
{
    "code": 1032,
    "message": "Checkout submit in progress",
    "data": null,
    "request_id": "8f3c2a1b9d4e6f70"
}
422 Token, method or card data invalid.
{
    "code": 1031,
    "message": "Checkout method unavailable",
    "data": null,
    "request_id": "8f3c2a1b9d4e6f70"
}

商户通知

1
POST notify_url

Merchant payment result notification

The platform POSTs this JSON body to the notify_url supplied when the payment order is created. The URL is merchant-defined; notify_url is shown here as the target, not as a platform endpoint.

Signature: X-Platform-Sign = base64(RSA-SHA256(platform private key, raw request body)). Verify it with the platform public key over the exact received bytes; do not re-serialize the JSON before verification.

Retry: return any 2xx within 10 seconds. Non-2xx or timeout is retried about once per 60 seconds, up to 5 deliveries; later deliveries enter a dead-letter stream for manual handling.

Idempotency: the same event may be delivered more than once. Deduplicate by event_id and/or order_no; do not create duplicate business records.

Only status 4 (success) and 5 (failed) trigger notifications. If no notify_url was supplied, no notification is sent; use the payment query API instead.

平台通知签名 商户通知
请求头
字段类型必填说明示例
Content-Type string 必填 Always application/json. application/json
X-Platform-Sign string 必填 base64(RSA-SHA256(platform private key, raw body)); verify with the platform public key. base64-signature
JSON 请求体
字段类型必填说明示例
event_id string 必填 Unique delivery ID. Use it together with order_no to deduplicate repeated notifications. evt_7f3c2a1b9d4e6f70
merchant_order_no string 必填 Merchant order number supplied when creating the payment. M20261114001
order_no string 必填 Platform payment order number. P20261114120000ABCDEF
status integer 必填 4 = success, 5 = failed. Only these final statuses trigger a merchant notification. 4
amount string 必填 Decimal string in the order currency. Do not parse as floating point. 100.00
currency string 必填 ISO 4217 currency code. USD
paid_at integer 可选 Unix timestamp in seconds; null when the payment is not successful. 1794540479
request_id string 可选 Platform request ID for tracing. 8f3c2a1b9d4e6f70
请求体示例
{
    "event_id": "evt_7f3c2a1b9d4e6f70",
    "merchant_order_no": "M20261114001",
    "order_no": "P20261114120000ABCDEF",
    "status": 4,
    "amount": "100.00",
    "currency": "USD",
    "paid_at": 1794540479,
    "request_id": "8f3c2a1b9d4e6f70"
}
响应
200 Any 2xx response is accepted as success. The response body is ignored.
OK
500 Non-2xx, timeout or network error: the notification is retried.

需要接入协助?

联系团队获取 API 凭证、通道可用性与接入评审。

联系开发者支持