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
name | required | type | sample | description |
---|---|---|---|---|
mchId | y | String(30) | 10000701 | assigned by IOTPay |
loginName | y | String(12) | jack123 | merchant's login name |
currency | y | String(3) | CAD | for now only CAD supported |
mchOrderNo | y | String(30) | 1234567890abc | assigned by merchant |
cardId | y | String(30) | 604567999 | assigned by merchant |
amount | y | Int | 1500 | in cents |
subject | n | String(64) | ||
body | n | String(250) | ||
clientIp | n | String(50) | 192.77.33.56 | consumer's ip address, for better transaction trace |
sign | y | String(32) | C380BEC2BFD727A4B6845133519F3AD6 | Sign algorithm |
Response
name | required | type | sample | description |
---|---|---|---|---|
retCode | y | String | SUCCESS or FAIL | |
retMsg | y | String | if failed, message will contain the reason | |
retData | y | JSON | if retCode=SUCCESS, card info returned |
retData contains order information:
name | required | type | sample | description |
---|---|---|---|---|
payOrderId | y | String | PC20240101195511712374441010 | generated by IOTPay |
mchId | y | String | 10000701 | assigned by IOTPay |
mchOrderNo | y | String | 1234567890abc | assigned by merchant |
originalOrderId | y | String | original pay order id if payType=refund | |
amount | y | Int | 1500 | in cents |
currency | y | String | CAD | for now only CAD supported |
payType | y | String | pay or refund | |
refundable | y | Int | 1500 | in cents |
status | y | Int | 2 | 2 or 3 means success |
paySuccTime | y | String | 2021-04-07 19:44:51 | time stamp for the moment when the payment succeeded |
cardNum | y | String | 432567******2266 | card number associated with the token |
expiryDate | y | String | expiry date of the card associated with the token | |
invoiceNum | y | String | ||
authNum | y | String | ||
transNum | y | String | ||
channel | y | String | PF_CC | PF_CC or UPI_EX |