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

Embedded Integration

How It Works

Backend Integration

Info

Make sure that requests to IOTPay endpoints are performed on the merchant's server (as opposed to the client side browser) to avoid potential CORS errors.

Card Purchase

Make a POST request to the cc_purchase API endpoint on your backend server.

Endpoint

https://ccapi.iotpaycloud.com/v3/cc_purchase

Method

POST

Header

Content-Type: application/json;charset=UTF-8

Request
namerequiredtypesampledescription
mchIdyString(30)10000701assigned by IOTPay
mchOrderNoyString(30)1234567890abcassigned by merchant
amountyInt1500in cents
currencyyString(3)CADfor now only CAD supported
loginNameyString(12)jack123merchant's login name
subjectnString(64)
bodynString(250)
channelyStringPF_CCPF_CC or UPI_EX
notifyUrlyString(200)get notify when success
returnUrlyString(200)https://example.comredirect to this url after payment
signyString(32)C380BEC2BFD727A4B6845133519F3AD6Sign algorithm
Response
namerequiredtypesampledescription
retCodeyStringSUCCESS or FAIL
retMsgyString
retData.redirectUrlyStringFor redirect purchase, please ignore this field for embedded integration
retData.secureIdyStringFor embedded SDK integration only

Info

Make the secureId available to the client.

Card Tokenize

Make a POST request to the cc_addcard API endpoint on your backend server.

Endpoint - Add Card

https://ccapi.iotpaycloud.com/v3/cc_addcard

Method

POST

Header

Content-Type: application/json;charset=UTF-8

Request
NameRequiredTypeSampleDescription
mchIdyString(30)0000701assigned by IOTPay
cardIdyString(30)604567999assigned by merchant, must be unique
loginNameyString(12)jack123merchant's login name
channelyStringPF_CCPF_CC or UPI_EX
returnUrlyString(200)redirect to this url after card is added
signyString(32)C380BEC2BFD727A4B6845133519F3AD6Sign algorithm

Please note

Each cardId can bind only one credit card, if one user need to bind more cards, use different cardId

Response
namerequiredtypesampledescription
retCodeyStringSUCCESS or FAIL
retMsgyString
retData.redirectUrlyStringFor redirect purchase, please ignore this field for embedded integration
retData.secureIdyStringFor embedded SDK integration only
retData.channelyStringPF_CCPF_CC or UPI_EX

Info

Make the secureId available to the client.

Frontend Integration

Info

You will need the secureId from response above to create a IOTPay iframe instance through JS SDK.

Add a placeholder div

<div id="iotpay_normal"></div>

Add a html script tag

Once you received the secureId from the API call, mount the iframe in the place holder div

Warning

To be PCI compliant, you must load IOTPay.js directly from https://ccapi.iotpaycloud.com/cc/iotpaycc.js. You cannot include it in a bundle or host it yourself.

Additional SDK and Documents

For iOS integration: iOS sdk

For Android integration: Android sdk

PHP and JS integration: Php sdk

Last Updated: 5/20/25, 10:11 AM
Prev
Redirected Integration With 3DS and AVS
Next
Direct Method