{"openapi":"3.0.3","info":{"title":"CrossPayFX Open API","version":"1.0.0","description":"CrossPayFX Open API: payments, beneficiaries, payouts, hosted checkout and merchant notifications."},"servers":[{"url":"https://crosspayfx.com"}],"tags":[{"name":"payments"},{"name":"beneficiaries"},{"name":"payouts"},{"name":"checkout"},{"name":"notifications"}],"paths":{"/api/v1/payment-orders":{"post":{"tags":["payments"],"summary":"Create a payment order or checkout session","description":"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.","operationId":"post_api_v1_payment_orders","parameters":[{"name":"X-Merchant-No","in":"header","required":true,"description":"商户号（merchant_sn）","schema":{"type":"string","example":"M10001"}},{"name":"X-Timestamp","in":"header","required":true,"description":"Unix 秒级时间戳，允许偏差 5 分钟","schema":{"type":"integer","example":"1770000000"}},{"name":"X-Nonce","in":"header","required":true,"description":"16-64 位随机串，防重放","schema":{"type":"string","example":"8f3c2a1b9d4e6f70"}},{"name":"X-Sign","in":"header","required":true,"description":"RSA-SHA256 签名（base64）","schema":{"type":"string","example":"base64-signature"}}],"responses":{"200":{"description":"Payment order or checkout session created.","content":{"application/json":{"example":{"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":{"description":"Missing or invalid signature.","content":{"application/json":{"example":{"code":1021,"message":"Unauthorized","data":null,"request_id":"8f3c2a1b9d4e6f70"}}}},"422":{"description":"Invalid parameter or unavailable method.","content":{"application/json":{"example":{"code":1001,"message":"Invalid parameter: amount","data":null,"request_id":"8f3c2a1b9d4e6f70"}}}}},"x-auth":"rsa","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"merchant_order_no":{"type":"string","description":"Merchant-side order number, max 64 chars. Also used as the idempotency key.","example":"ORDER-20261114-001"},"method":{"type":"string","description":"Acquiring method: card, qr or subscription. Omit to create a checkout session.","example":"card"},"amount":{"type":"string","description":"Positive decimal string, max 2 decimal places. Required for card/qr; subscription pay mode requires > 0 and subscription create mode requires 0.00.","example":"100.00"},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code. Required when method is present; subscription supports RU only.","example":"RU"},"currency":{"type":"string","description":"ISO 4217 three-letter currency code. Required when method is present; subscription supports RUB only.","example":"RUB"},"subscription_mode":{"type":"string","description":"Subscription mode: create (subscription QR, amount 0) or pay (pay then bind subscription). Inferred from amount when omitted.","example":"create"},"client_login":{"type":"string","description":"Merchant user identifier (email, phone or internal user id). Required when method=subscription.","example":"user-10001"},"account_bank":{"type":"string","description":"Payer bank/operator ID. Required when method=subscription and subscription_mode=pay.","example":"1000000001"},"description":{"type":"string","description":"Order description, max 32 chars. Required when method=subscription.","example":"Monthly subscription"},"return_url":{"type":"string","description":"HTTPS return URL after payment.","example":"https://merchant.example/return"},"notify_url":{"type":"string","description":"HTTPS server notification URL.","example":"https://merchant.example/notify"},"lang":{"type":"string","description":"Hosted checkout language: en, zh or ru. Defaults to en when method is omitted.","example":"en"},"card":{"type":"object","description":"Card data. Required when method=card. Card data is never stored in logs.","properties":{"card_number":{"type":"string","description":"12-19 digits; spaces and hyphens are removed.","example":"4000000000000000"},"cvv":{"type":"string","description":"3-5 digits.","example":"123"},"expiry_month":{"type":"string","description":"Two-digit month, or use expiry.","example":"11"},"expiry_year":{"type":"string","description":"Two or four digit year, or use expiry.","example":"2026"},"expiry":{"type":"string","description":"Alternative expiry in MM/YY format.","example":"11/26"},"email":{"type":"string","description":"Cardholder email.","example":"buyer@example.com"},"first_name":{"type":"string","description":"Cardholder first name.","example":"John"},"last_name":{"type":"string","description":"Cardholder last name.","example":"Doe"},"billing_info":{"type":"object","description":"Optional billing address.","properties":{"bill_address":{"type":"string","description":"Street address.","example":"155 Osceola Rd"},"bill_country":{"type":"string","description":"Numeric country code.","example":"840"},"bill_state":{"type":"string","description":"State or region.","example":"FL"},"bill_city":{"type":"string","description":"City.","example":"Belleair"},"bill_zip":{"type":"string","description":"Postal code.","example":"33756"},"bill_phone":{"type":"string","description":"Phone number.","example":"7275109811"}}}},"required":["card_number","cvv","email","first_name","last_name"]}},"required":["merchant_order_no"]}}}}}},"/api/v1/payment-orders/{merchant_order_no}":{"get":{"tags":["payments"],"summary":"Query a payment order","description":"Returns the latest local state of a payment order by merchant order number. Channel details are not exposed.","operationId":"get_api_v1_payment_orders_merchant_order_no","parameters":[{"name":"merchant_order_no","in":"path","required":true,"description":"Merchant order number.","schema":{"type":"string","example":"ORDER-20261114-001"}},{"name":"X-Merchant-No","in":"header","required":true,"description":"商户号（merchant_sn）","schema":{"type":"string","example":"M10001"}},{"name":"X-Timestamp","in":"header","required":true,"description":"Unix 秒级时间戳，允许偏差 5 分钟","schema":{"type":"integer","example":"1770000000"}},{"name":"X-Nonce","in":"header","required":true,"description":"16-64 位随机串，防重放","schema":{"type":"string","example":"8f3c2a1b9d4e6f70"}},{"name":"X-Sign","in":"header","required":true,"description":"RSA-SHA256 签名（base64）","schema":{"type":"string","example":"base64-signature"}}],"responses":{"200":{"description":"Payment order state.","content":{"application/json":{"example":{"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":{"description":"Payment order not found.","content":{"application/json":{"example":{"code":1004,"message":"Not found","data":null,"request_id":"8f3c2a1b9d4e6f70"}}}}},"x-auth":"rsa"}},"/api/v1/beneficiaries":{"get":{"tags":["beneficiaries"],"summary":"List beneficiaries","description":"Returns a paginated beneficiary list for the authenticated merchant. Account numbers are masked; ciphertext and hashes are never returned.","operationId":"get_api_v1_beneficiaries","parameters":[{"name":"page","in":"query","required":false,"description":"Page number, default 1.","schema":{"type":"integer","example":"1"}},{"name":"page_size","in":"query","required":false,"description":"Page size, 1-100, default 10.","schema":{"type":"integer","example":"10"}},{"name":"status","in":"query","required":false,"description":"1 enabled, 2 disabled; 0 means all.","schema":{"type":"integer","example":"0"}},{"name":"kyc_status","in":"query","required":false,"description":"1 pending, 2 reviewing, 3 approved, 4 rejected; 0 means all.","schema":{"type":"integer","example":"0"}},{"name":"name","in":"query","required":false,"description":"Partial beneficiary name.","schema":{"type":"string","example":"John"}},{"name":"bank_code","in":"query","required":false,"description":"Exact bank code.","schema":{"type":"string","example":"SBER"}},{"name":"X-Merchant-No","in":"header","required":true,"description":"商户号（merchant_sn）","schema":{"type":"string","example":"M10001"}},{"name":"X-Timestamp","in":"header","required":true,"description":"Unix 秒级时间戳，允许偏差 5 分钟","schema":{"type":"integer","example":"1770000000"}},{"name":"X-Nonce","in":"header","required":true,"description":"16-64 位随机串，防重放","schema":{"type":"string","example":"8f3c2a1b9d4e6f70"}},{"name":"X-Sign","in":"header","required":true,"description":"RSA-SHA256 签名（base64）","schema":{"type":"string","example":"base64-signature"}}],"responses":{"200":{"description":"Beneficiary page.","content":{"application/json":{"example":{"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"}}}}},"x-auth":"rsa"},"post":{"tags":["beneficiaries"],"summary":"Create a beneficiary","description":"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.","operationId":"post_api_v1_beneficiaries","parameters":[{"name":"X-Merchant-No","in":"header","required":true,"description":"商户号（merchant_sn）","schema":{"type":"string","example":"M10001"}},{"name":"X-Timestamp","in":"header","required":true,"description":"Unix 秒级时间戳，允许偏差 5 分钟","schema":{"type":"integer","example":"1770000000"}},{"name":"X-Nonce","in":"header","required":true,"description":"16-64 位随机串，防重放","schema":{"type":"string","example":"8f3c2a1b9d4e6f70"}},{"name":"X-Sign","in":"header","required":true,"description":"RSA-SHA256 签名（base64）","schema":{"type":"string","example":"base64-signature"}}],"responses":{"200":{"description":"Beneficiary created.","content":{"application/json":{"example":{"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":{"description":"Beneficiary already exists.","content":{"application/json":{"example":{"code":1005,"message":"Beneficiary already exists","data":null,"request_id":"8f3c2a1b9d4e6f70"}}}},"422":{"description":"Invalid parameter or disabled bank.","content":{"application/json":{"example":{"code":1001,"message":"Invalid parameter: account_number","data":null,"request_id":"8f3c2a1b9d4e6f70"}}}}},"x-auth":"rsa","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"beneficiary_type":{"type":"integer","description":"1 person, 2 company, 3 merchant self.","example":"1"},"name":{"type":"string","description":"Beneficiary name, max 128 chars.","example":"John Doe"},"country_code":{"type":"string","description":"ISO 3166-1 alpha-2 country code.","example":"RU"},"currency":{"type":"string","description":"ISO 4217 three-letter currency code.","example":"RUB"},"account_type":{"type":"integer","description":"1 card, 2 SBP, 3 bank account.","example":"2"},"account_number":{"type":"string","description":"Account number or card number, max 64 chars.","example":"40817810000000000001"},"bank_code":{"type":"string","description":"Bank code. Required for SBP and bank account types.","example":"SBER"}},"required":["beneficiary_type","name","country_code","currency","account_type","account_number"]}}}}}},"/api/v1/beneficiaries/{id}":{"get":{"tags":["beneficiaries"],"summary":"Get a beneficiary","description":"Returns one beneficiary owned by the authenticated merchant.","operationId":"get_api_v1_beneficiaries_id","parameters":[{"name":"id","in":"path","required":true,"description":"Beneficiary ID.","schema":{"type":"integer","example":"1"}},{"name":"X-Merchant-No","in":"header","required":true,"description":"商户号（merchant_sn）","schema":{"type":"string","example":"M10001"}},{"name":"X-Timestamp","in":"header","required":true,"description":"Unix 秒级时间戳，允许偏差 5 分钟","schema":{"type":"integer","example":"1770000000"}},{"name":"X-Nonce","in":"header","required":true,"description":"16-64 位随机串，防重放","schema":{"type":"string","example":"8f3c2a1b9d4e6f70"}},{"name":"X-Sign","in":"header","required":true,"description":"RSA-SHA256 签名（base64）","schema":{"type":"string","example":"base64-signature"}}],"responses":{"200":{"description":"Beneficiary detail.","content":{"application/json":{"example":{"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":{"description":"Beneficiary not found.","content":{"application/json":{"example":{"code":1004,"message":"Not found","data":null,"request_id":"8f3c2a1b9d4e6f70"}}}}},"x-auth":"rsa"}},"/api/v1/beneficiaries/{id}/disable":{"post":{"tags":["beneficiaries"],"summary":"Disable a beneficiary","description":"Disables a beneficiary so it can no longer be used for new payouts. Existing payout records are not changed.","operationId":"post_api_v1_beneficiaries_id_disable","parameters":[{"name":"id","in":"path","required":true,"description":"Beneficiary ID.","schema":{"type":"integer","example":"1"}},{"name":"X-Merchant-No","in":"header","required":true,"description":"商户号（merchant_sn）","schema":{"type":"string","example":"M10001"}},{"name":"X-Timestamp","in":"header","required":true,"description":"Unix 秒级时间戳，允许偏差 5 分钟","schema":{"type":"integer","example":"1770000000"}},{"name":"X-Nonce","in":"header","required":true,"description":"16-64 位随机串，防重放","schema":{"type":"string","example":"8f3c2a1b9d4e6f70"}},{"name":"X-Sign","in":"header","required":true,"description":"RSA-SHA256 签名（base64）","schema":{"type":"string","example":"base64-signature"}}],"responses":{"200":{"description":"Beneficiary disabled.","content":{"application/json":{"example":{"code":0,"message":"OK","data":{"id":1,"status":2},"request_id":"8f3c2a1b9d4e6f70"}}}},"404":{"description":"Beneficiary not found.","content":{"application/json":{"example":{"code":1004,"message":"Not found","data":null,"request_id":"8f3c2a1b9d4e6f70"}}}}},"x-auth":"rsa"}},"/api/v1/payouts":{"post":{"tags":["payouts"],"summary":"Create a payout","description":"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.","operationId":"post_api_v1_payouts","parameters":[{"name":"X-Merchant-No","in":"header","required":true,"description":"商户号（merchant_sn）","schema":{"type":"string","example":"M10001"}},{"name":"X-Timestamp","in":"header","required":true,"description":"Unix 秒级时间戳，允许偏差 5 分钟","schema":{"type":"integer","example":"1770000000"}},{"name":"X-Nonce","in":"header","required":true,"description":"16-64 位随机串，防重放","schema":{"type":"string","example":"8f3c2a1b9d4e6f70"}},{"name":"X-Sign","in":"header","required":true,"description":"RSA-SHA256 签名（base64）","schema":{"type":"string","example":"base64-signature"}}],"responses":{"202":{"description":"Payout accepted and submitted.","content":{"application/json":{"example":{"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":{"description":"Idempotency key conflicts with different parameters.","content":{"application/json":{"example":{"code":1005,"message":"Idempotency key conflicts with different parameters","data":null,"request_id":"8f3c2a1b9d4e6f70"}}}},"422":{"description":"Insufficient balance, invalid beneficiary or payout channel unavailable.","content":{"application/json":{"example":{"code":1019,"message":"Insufficient available balance","data":null,"request_id":"8f3c2a1b9d4e6f70"}}}}},"x-auth":"rsa","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"payout_type":{"type":"integer","description":"1 payout, 2 withdrawal, 3 third-party transfer.","example":"1"},"country_code":{"type":"string","description":"ISO 3166-1 alpha-2 country code; must match the beneficiary.","example":"RU"},"currency":{"type":"string","description":"ISO 4217 currency; must match the beneficiary.","example":"RUB"},"amount":{"type":"string","description":"Positive integer string, no decimal point.","example":"1000"},"beneficiary_id":{"type":"integer","description":"Enabled beneficiary owned by the merchant.","example":"1"},"idempotency_key":{"type":"string","description":"Unique merchant idempotency key, max 64 chars. Repeating the same request returns the first result; different parameters conflict.","example":"PAYOUT-20261114-001"},"remarks":{"type":"string","description":"Optional remark, max 256 chars.","example":"Supplier invoice 1001"}},"required":["payout_type","country_code","currency","amount","beneficiary_id","idempotency_key"]}}}}}},"/api/v1/payouts/{payout_no}":{"get":{"tags":["payouts"],"summary":"Get a payout","description":"Returns the local state of one payout owned by the authenticated merchant. Account data is masked.","operationId":"get_api_v1_payouts_payout_no","parameters":[{"name":"payout_no","in":"path","required":true,"description":"Platform payout number.","schema":{"type":"string","example":"P20261114120000ABCDEF"}},{"name":"X-Merchant-No","in":"header","required":true,"description":"商户号（merchant_sn）","schema":{"type":"string","example":"M10001"}},{"name":"X-Timestamp","in":"header","required":true,"description":"Unix 秒级时间戳，允许偏差 5 分钟","schema":{"type":"integer","example":"1770000000"}},{"name":"X-Nonce","in":"header","required":true,"description":"16-64 位随机串，防重放","schema":{"type":"string","example":"8f3c2a1b9d4e6f70"}},{"name":"X-Sign","in":"header","required":true,"description":"RSA-SHA256 签名（base64）","schema":{"type":"string","example":"base64-signature"}}],"responses":{"200":{"description":"Payout detail.","content":{"application/json":{"example":{"code":0,"message":"OK","data":{"payout_no":"P20261114120000ABCDEF","status":4,"amount":"1000","currency":"RUB","account_number_mask":"**** **** 0001"},"request_id":"8f3c2a1b9d4e6f70"}}}},"404":{"description":"Payout not found.","content":{"application/json":{"example":{"code":1004,"message":"Not found","data":null,"request_id":"8f3c2a1b9d4e6f70"}}}}},"x-auth":"rsa"}},"/api/v1/payouts/{payout_no}/query":{"post":{"tags":["payouts"],"summary":"Query payout status upstream","description":"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.","operationId":"post_api_v1_payouts_payout_no_query","parameters":[{"name":"payout_no","in":"path","required":true,"description":"Platform payout number.","schema":{"type":"string","example":"P20261114120000ABCDEF"}},{"name":"X-Merchant-No","in":"header","required":true,"description":"商户号（merchant_sn）","schema":{"type":"string","example":"M10001"}},{"name":"X-Timestamp","in":"header","required":true,"description":"Unix 秒级时间戳，允许偏差 5 分钟","schema":{"type":"integer","example":"1770000000"}},{"name":"X-Nonce","in":"header","required":true,"description":"16-64 位随机串，防重放","schema":{"type":"string","example":"8f3c2a1b9d4e6f70"}},{"name":"X-Sign","in":"header","required":true,"description":"RSA-SHA256 签名（base64）","schema":{"type":"string","example":"base64-signature"}}],"responses":{"200":{"description":"Local payout plus upstream query result.","content":{"application/json":{"example":{"code":0,"message":"OK","data":{"payout":{"payout_no":"P20261114120000ABCDEF","status":4},"upstream_ok":true,"upstream":{"code":0,"result":{"status":"2"}}},"request_id":"8f3c2a1b9d4e6f70"}}}},"404":{"description":"Payout not found.","content":{"application/json":{"example":{"code":1004,"message":"Not found","data":null,"request_id":"8f3c2a1b9d4e6f70"}}}}},"x-auth":"rsa"}},"/api/v1/checkout-sessions/{session_no}":{"get":{"tags":["checkout"],"summary":"Get checkout options","description":"Returns the payment methods available for a hosted checkout session. The session token is required and is not a merchant RSA signature.","operationId":"get_api_v1_checkout_sessions_session_no","parameters":[{"name":"token","in":"query","required":true,"description":"Opaque checkout token from checkout_url.","schema":{"type":"string","example":"0123456789abcdef0123456789abcdef"}},{"name":"session_no","in":"path","required":true,"description":"Checkout session number.","schema":{"type":"string","example":"CS0123456789ABCDEF"}}],"responses":{"200":{"description":"Available checkout methods.","content":{"application/json":{"example":{"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":{"description":"Invalid or expired session token.","content":{"application/json":{"example":{"code":1030,"message":"Checkout session invalid or expired","data":null,"request_id":"8f3c2a1b9d4e6f70"}}}}},"x-auth":"session"}},"/api/v1/checkout-sessions/{session_no}/status":{"get":{"tags":["checkout"],"summary":"Get checkout payment status","description":"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.","operationId":"get_api_v1_checkout_sessions_session_no_status","parameters":[{"name":"token","in":"query","required":true,"description":"Opaque checkout token from checkout_url.","schema":{"type":"string","example":"0123456789abcdef0123456789abcdef"}},{"name":"session_no","in":"path","required":true,"description":"Checkout session number.","schema":{"type":"string","example":"CS0123456789ABCDEF"}}],"responses":{"200":{"description":"Checkout order status.","content":{"application/json":{"example":{"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":{"description":"Invalid or expired session token.","content":{"application/json":{"example":{"code":1030,"message":"Checkout session invalid or expired","data":null,"request_id":"8f3c2a1b9d4e6f70"}}}}},"x-auth":"session"}},"/api/v1/checkout-sessions/{session_no}/pay":{"post":{"tags":["checkout"],"summary":"Submit a checkout payment","description":"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.","operationId":"post_api_v1_checkout_sessions_session_no_pay","parameters":[{"name":"session_no","in":"path","required":true,"description":"Checkout session number.","schema":{"type":"string","example":"CS0123456789ABCDEF"}}],"responses":{"200":{"description":"Payment created.","content":{"application/json":{"example":{"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":{"description":"Checkout submission already in progress.","content":{"application/json":{"example":{"code":1032,"message":"Checkout submit in progress","data":null,"request_id":"8f3c2a1b9d4e6f70"}}}},"422":{"description":"Token, method or card data invalid.","content":{"application/json":{"example":{"code":1031,"message":"Checkout method unavailable","data":null,"request_id":"8f3c2a1b9d4e6f70"}}}}},"x-auth":"session","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Opaque checkout token.","example":"0123456789abcdef0123456789abcdef"},"method":{"type":"string","description":"Payment method enabled for this session: card, qr or subscription.","example":"card"},"card":{"type":"object","description":"Card data, required when method=card.","properties":{"card_number":{"type":"string","description":"Card number, 12-19 digits.","example":"4000000000000000"},"cvv":{"type":"string","description":"3-5 digits.","example":"123"},"expiry":{"type":"string","description":"MM/YY, or use expiry_month and expiry_year.","example":"11/26"},"email":{"type":"string","description":"Cardholder email.","example":"buyer@example.com"},"first_name":{"type":"string","description":"Cardholder first name.","example":"John"},"last_name":{"type":"string","description":"Cardholder last name.","example":"Doe"}},"required":["card_number","cvv","email","first_name","last_name"]},"subscription_mode":{"type":"string","description":"create for a zero-amount subscription QR, pay for payment + subscription binding; inferred from amount when omitted.","example":"create"},"client_login":{"type":"string","description":"Merchant user identifier, required when method=subscription.","example":"user-10001"},"description":{"type":"string","description":"Subscription description, max 32 chars, required when method=subscription.","example":"Monthly subscription"},"account_bank":{"type":"string","description":"Bank/operator ID, required when method=subscription and amount > 0.","example":"1000000001"}},"required":["token","method"]}}}}}}},"x-webhooks":{"merchant-notify":{"tags":["notifications"],"summary":"Merchant payment result notification","description":"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.","operationId":"merchant-notify","parameters":[{"name":"Content-Type","in":"header","required":true,"description":"Always application/json.","schema":{"type":"string","example":"application/json"}},{"name":"X-Platform-Sign","in":"header","required":true,"description":"base64(RSA-SHA256(platform private key, raw body)); verify with the platform public key.","schema":{"type":"string","example":"base64-signature"}}],"responses":{"200":{"description":"Any 2xx response is accepted as success. The response body is ignored.","content":{"application/json":{"example":"OK"}}},"500":{"description":"Non-2xx, timeout or network error: the notification is retried.","content":{"application/json":{"example":""}}}},"x-auth":"platform","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"event_id":{"type":"string","description":"Unique delivery ID. Use it together with order_no to deduplicate repeated notifications.","example":"evt_7f3c2a1b9d4e6f70"},"merchant_order_no":{"type":"string","description":"Merchant order number supplied when creating the payment.","example":"M20261114001"},"order_no":{"type":"string","description":"Platform payment order number.","example":"P20261114120000ABCDEF"},"status":{"type":"integer","description":"4 = success, 5 = failed. Only these final statuses trigger a merchant notification.","example":"4"},"amount":{"type":"string","description":"Decimal string in the order currency. Do not parse as floating point.","example":"100.00"},"currency":{"type":"string","description":"ISO 4217 currency code.","example":"USD"},"paid_at":{"type":"integer","description":"Unix timestamp in seconds; null when the payment is not successful.","example":"1794540479"},"request_id":{"type":"string","description":"Platform request ID for tracing.","example":"8f3c2a1b9d4e6f70"}},"required":["event_id","merchant_order_no","order_no","status","amount","currency"]}}}}}}}