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

Purchase With Token

Info

This endpoint allows merchants to process transactions using a tokenized card created with the add card endpoints (direct, redirect). The token represents the securely stored payment information of the associated customer.

Endpoint

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

Method

POST

Header

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

Request
namerequiredtypesampledescription
mchIdyString(30)10000701assigned by IOTPay
loginNameyString(12)jack123merchant's login name
currencyyString(3)CADfor now only CAD supported
mchOrderNoyString(30)1234567890abcassigned by merchant
cardIdyString(30)604567999assigned by merchant
amountyInt1500in cents
subjectnString(64)
bodynString(250)
clientIpnString(50)192.77.33.56consumer's ip address, for better transaction trace
signyString(32)C380BEC2BFD727A4B6845133519F3AD6Sign algorithm
Response
namerequiredtypesampledescription
retCodeyStringSUCCESS or FAIL
retMsgyStringif failed, message will contain the reason
retDatayJSONif retCode=SUCCESS, card info returned
retData contains order information:
namerequiredtypesampledescription
payOrderIdyStringPC20240101195511712374441010generated by IOTPay
mchIdyString10000701assigned by IOTPay
mchOrderNoyString1234567890abcassigned by merchant
originalOrderIdyStringoriginal pay order id if payType=refund
amountyInt1500in cents
currencyyStringCADfor now only CAD supported
payTypeyStringpay or refund
refundableyInt1500in cents
statusyInt22 or 3 means success
paySuccTimeyString2021-04-07 19:44:51time stamp for the moment when the payment succeeded
cardNumyString432567******2266card number associated with the token
expiryDateyStringexpiry date of the card associated with the token
invoiceNumyString
authNumyString
transNumyString
channelyStringPF_CCPF_CC or UPI_EX
Last Updated: 4/1/24, 5:41 PM
Prev
Query Card
Next
Purchase with Wallet