Skip to content

FlashPay API Documentation ​

This document defines the common communication, identification, key, signature, and callback rules for merchants integrating with the platform APIs. Endpoint URLs, request fields, and business states are defined in the corresponding API documents.

Service base URL: https://pay.flashpay.fit

Quick integration flow ​

  1. Create or obtain an application in Merchant Center, and record the merchant number mchNo and application ID appId.
  2. Generate an RSA key pair on the merchant side: a merchant private key and a merchant public key.
  3. Upload the merchant public key in Merchant Center > Application Management > Modify. Keep the merchant private key only in the merchant's secure environment.
  4. Obtain the platform public key from the application details and configure it in the merchant system to verify platform responses and callbacks.
  5. Build the request according to the API document, sign it with the merchant private key, add sign, and call the platform API.
  6. Verify synchronous responses and asynchronous callbacks with the platform public key. After a callback is verified and processed, return SUCCESS.

PayIn flow ​

Flow details:

  1. The user submits a PayIn request to the merchant.
  2. The merchant calls POST /api/pay/unifiedOrder.
  3. FlashPay returns payOrderId, orderState, payDataType, and payData.
  4. The merchant renders the redirect, virtual account, or QR data according to payDataType.
  5. After payment, FlashPay POSTs a signed form notification to notifyUrl.
  6. The merchant receives all fields dynamically, verifies the signature, processes the order idempotently, and returns plain text SUCCESS.
  7. If no callback arrives, query the original order; use notify=1 only when a callback needs to be retriggered.

PayOut flow ​

Flow details:

  1. For channels requiring bank codes, call POST /api/channel/querybanks and cache the bank list with a low refresh frequency.
  2. The user submits beneficiary and amount details, and the merchant completes its internal review.
  3. The merchant calls POST /api/transferOrder.
  4. FlashPay returns transferId and the current state.
  5. When the order completes, FlashPay POSTs a signed form notification to notifyUrl.
  6. The merchant verifies and processes the callback idempotently, then returns plain text SUCCESS.
  7. If no callback arrives, query the original merchant order instead of creating a duplicate transfer.

Communication protocol ​

ItemRule
TransportHTTP/HTTPS is supported in the test environment; HTTPS is required in production
Request methodAs specified by each API document; transaction APIs use POST
Content typeapplication/json and application/x-www-form-urlencoded are supported; application/json is preferred
Character encodingUTF-8
Signature algorithmRSA 2048 / SHA256withRSA
Signature encodingBase64

Important: Asynchronous callback addresses are protected by a whitelist. Before production integration, contact the platform to bind the PayIn and PayOut callback domain or address.

Core identifiers and keys ​

Identifier and key reference ​

NameGenerated/assigned byWhere the merchant obtains or stores itPurposeDisclosure
Merchant number mchNoPlatformMerchant CenterIdentifies the merchant together with appIdMay be transmitted in requests; it is not a password
Application ID appIdPlatform when the application is createdMerchant Center > Application ManagementIdentifies a merchant application and must be included in every signed request; the field name is case-sensitiveMay be transmitted in requests; it is not a key
Merchant private keyMerchantMerchant-side KMS or secure server configuration onlySigns API requests sent by the merchantNever disclose, upload to the platform, or place in a browser or client application
Merchant public keyMerchantUploaded in Merchant CenterUsed by the platform to verify merchant request signaturesMay be provided to the platform; protect it from tampering
Platform public keyPlatformMerchant Center > Application Management > Modify/DetailsUsed by the merchant to verify synchronous responses, callbacks, and return URL parametersStore on the merchant server and protect it from tampering
Platform private keyPlatformNot available to merchantsSigns platform responses, callbacks, and return URL parametersPlatform secret; merchants neither need nor receive it

appId identifies an application and cannot replace a signing key. If Merchant Center labels the platform public key as Platform Key, use it only for signature verification. It is not the private key used to sign merchant requests.

Key usage directions ​

Data directionSignerPrivate key usedVerifierPublic key used
Merchant request → PlatformMerchantMerchant private keyPlatformMerchant public key
Platform synchronous response → MerchantPlatformPlatform private keyMerchantPlatform public key
Platform asynchronous callback → MerchantPlatformPlatform private keyMerchantPlatform public key

Key acquisition and storage ​

  1. Generate a 2048-bit RSA key pair. Use X.509 encoding for the public key, PKCS#8 for the private key, and Base64 strings for configuration values.
  2. Upload only the Base64 body of the merchant public key. Remove PEM headers and footers such as -----BEGIN PUBLIC KEY----- and -----END PUBLIC KEY-----.
  3. Store the merchant private key in a server-side KMS, encrypted environment configuration, or controlled configuration center. Never commit it to source control or expose it in logs, browsers, mobile apps, or mini programs.
  4. Configure platform public keys separately for test and production. Do not mix environment-specific appId values or keys.
  5. When rotating keys, allow a transition window and immediately test request signing and callback verification after the change.

Common parameter rules ​

  • Amount fields use the smallest currency unit. For example, USD uses cents. Values must not contain decimals unless an API explicitly states otherwise.
  • Time fields use 13-digit Unix timestamps in milliseconds, for example 1756809333043. Keep merchant server time synchronized.
  • Parameter names are case-sensitive. Use appId, not appid or appID.
  • notifyUrl and returnUrl must be complete, publicly reachable HTTP/HTTPS URLs. Production URLs must use HTTPS.
  • Empty strings and null do not participate in signing. Whether a field may be empty is still determined by the corresponding API document.

FlashPay API Documentation