IOTPay DocumentationIOTPay Documentation
  • Introduction
  • Signing
  • General Order API
  • Customer Scan QR Code
  • Merchant Scan Barcode
  • Payment in WeChat Web Browser
  • WeChat Mini Program
  • Online Secure Payment
  • App integrate IOTPay
  • Order Query
  • Asynchronous Notify
  • Get Client IP
  • Refund interface
  • Query Refund
  • POS Semi-Integration
  • Wordpress WooCommerce plugin
  • V3

    • Introduction
    • Redirected Integration
    • Redirected Integration With 3DS and AVS
    • Embedded Integration
    • Direct Method
    • Query Card
    • Purchase With Token
    • Purchase with Wallet
    • Void Transaction
    • Refund Transaction
    • Query Transaction
    • UnionPay ExpressPay API
  • V2

    • Credit Card API V2(Deprecated)
  • Introduction
  • Contract Signing
  • Payment
  • Query Order API
  • Callback
  • English
  • 简体中文
  • Introduction
  • Signing
  • General Order API
  • Customer Scan QR Code
  • Merchant Scan Barcode
  • Payment in WeChat Web Browser
  • WeChat Mini Program
  • Online Secure Payment
  • App integrate IOTPay
  • Order Query
  • Asynchronous Notify
  • Get Client IP
  • Refund interface
  • Query Refund
  • POS Semi-Integration
  • Wordpress WooCommerce plugin
  • V3

    • Introduction
    • Redirected Integration
    • Redirected Integration With 3DS and AVS
    • Embedded Integration
    • Direct Method
    • Query Card
    • Purchase With Token
    • Purchase with Wallet
    • Void Transaction
    • Refund Transaction
    • Query Transaction
    • UnionPay ExpressPay API
  • V2

    • Credit Card API V2(Deprecated)
  • Introduction
  • Contract Signing
  • Payment
  • Query Order API
  • Callback
  • English
  • 简体中文
  • General Order

    • Introduction
    • Signing
    • General Order API
    • Customer Scan QR Code
    • Merchant Scan Barcode
    • Payment in WeChat Web Browser
    • WeChat Mini Program
    • Online Secure Payment
    • App integrate IOTPay
    • Order Query
    • Asynchronous Notify
    • Get Client IP
    • Refund interface
    • Query Refund
    • POS Semi-Integration
    • Wordpress WooCommerce plugin
  • CreditCard

    • V3

      • Introduction
      • Redirected Integration
      • Redirected Integration With 3DS and AVS
      • Embedded Integration
      • Direct Method
      • Query Card
      • Purchase With Token
      • Purchase with Wallet
      • Void Transaction
      • Refund Transaction
      • Query Transaction
      • UnionPay ExpressPay API
    • Credit Card API V2(Deprecated)
  • Autodebit

    • Introduction
    • Contract Signing
    • Payment
    • Query Order API
    • Callback

Callback

Contract Status Callback

Callback Method

POST https://MerchantCallbackURL

  • Both signing and cancellation(from user) will trigger a callback

Callback Example

{
  "iotpayContractId": "CWJ202508182305444",
  "mchContractId": "b208c6dd-4f4e-4745-b17c-8d8a348f7064",
  "status": "2",
  "signedAt": "1755558434000",
  "cancelledAt": "0",
  "contractId": "2025081907667718",
  "openId": "osirq1BQeEVY",
  "sign": "B6A8F46537B4B5C888A95"
}

Callback Parameters

Field NameVariableRequiredTypeExample ValueDescription
Iotpay Contract IDiotpayContractIdYesString10000701Merchant ID assigned by Payment Center
Merchant Contract IDmchContractIdYesString2177aac8-1c3e-4291-97e0-f63f69b34cb6Merchant-generated contract ID, must be unique
Contract StatusstatusYesStringOnly “2” is considered signedContract status: 1: Pending, 2: Signed, 9: Terminated
Signed TimesignedAtYesString1755558434000Signing timestamp in milliseconds
Cancelled TimecancelledAtYesString0Cancellation timestamp in milliseconds
Contract IDcontractIdNoString202508190766771823708667160266Contract ID
OpenIDopenIdNoStringosirq1BQeEV3-User’s OpenID
SignaturesignYesStringB6A8F46537B4B5C888A9Signature, see Signature Algorithm

Payment Callback

Callback Method

POST https://MerchantCallbackURL

The following fields are returned only when both retCode and resCode are SUCCESS

Field NameVariableTypeExample ValueDescription
Payment Order IDpayOrderIdString(30)P20160427210604000490Order ID generated by Payment Center
Merchant IDmchIdString(30)20001222Merchant ID assigned by Payment Center
Merchant Order IDmchOrderNoString(30)20160427210604000490Merchant-generated order ID
Channel IDchannelIdString(24)WX_JSAPISee Payment Channel Parameters
CurrencycurrencyString(3)CAD3-letter currency code, e.g., CAD
Payment Amountamountint100Payment amount in cents
Statusstatusint2Payment status, 2 or 3 indicates success
Client IPclientIpString(32)210.73.10.148Client IP address
DevicedeviceString(64)WEBTerminal device ID, for PC web or WeChat Official Account payments, use "WEB"
Product SubjectsubjectString(64)Test ProductProduct subject
Product DescriptionbodyString(256)Product description testProduct description
Channel Order IDchannelOrderNoString(64)wx2016081611532915ae15b00b0167893571Third-party payment channel order ID
Extra Param 1param1String(64)Returned as-is (for WeChat Official Account, replaced with "mchOrderId")
Extra Param 2param2String(64)Returned as-is
Payment Success TimepaySuccTimelongMillisecond precision
Notification TypebackTypeint1Notification type: 1-Frontend, 2-Backend
SignaturesignString(32)C380BEC2BFD727A4B6845133519F3AD6Signature, see Signature Algorithm
Auto-debitautodebitString(1)1Whether signed contract exists: 1-Signed, 0-Not signed
Merchant Contract IDmchContractIdString(128)b53554e6-edd5-472b-b534-fe137fbbb382Merchant-generated contract ID, must be unique
Iotpay Contract IDiotpayContractIdString(128)CWJ20250819011704375030054146Contract ID assigned by Payment Center
Currency AmountcurrencyAmountString(10)77Currency amount in cents, returned only when currency differs from contract currency

Return Result

After processing, the business system must return string success to Payment Center to indicate success. Returning anything other than success means failure, and the Payment Center will retry up to 4 times.

Active Order Status Polling

For merchants without backend (e.g., POS software integration) who cannot provide notifyUrl, active polling can be used to check if the order was successful.
See the Order Query API

Double Insurance for Order Status

It is strongly recommended that merchants use both notifyUrl and polling (every 30 minutes) to ensure accurate order status retrieval.

Last Updated: 8/20/25, 2:51 PM
Prev
Query Order API