Direct Method
Direct method allows you to make a purchase or tokenize a card without any UI involved with just one API call.
Prerequisite
In order to make requests to this API, it is required that you must demonstrate compliance to the Payment Card Industry Data Security Standard (PCI DSS)
Direct Card Purchase
Endpoint
https://ccapi.iotpaycloud.com/v3/cc_directpurchase
Method
POST
Header
Content-Type: application/json;charset=UTF-8
! Tip
After you receive access credentials (merchant ID, login name, merchant key). You can step through the demo Direct Purchase which may help you when going through the documentation.
Request
name | required | type | sample | description |
---|---|---|---|---|
mchId | y | String(30) | 10000701 | assigned by IOTPay |
loginName | y | String(12) | jack123 | merchant's login name |
channel | y | String | PF_CC | PF_CC or UPI_EX |
currency | y | String | CAD | only 'CAD' supported |
mchOrderNo | y | String(30) | 604567999 | assigned by merchant |
amount | y | Int | 1500 | in cents |
cardNum | y | String | 432567******2266 | card number |
expiryDate | y | String | 0725 | |
holder | y | String | test | cardholder's name |
cvv | y | String | 786 | |
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 | ||
retData | y | JSON | if retCode=SUCCESS, all fields returned in retData |
retData
contains order information:
name | required | type | sample | description |
---|---|---|---|---|
payOrderId | y | String | PC20240101231256043886634219 | generated by IOTPay |
mchId | y | String | 10000701 | assigned by IOTPay |
mchOrderNo | y | String | 604567999 | assigned by merchant |
originalOrderId | n | String | original pay order ID for refund | |
currency | y | String | CAD | only 'CAD' supported |
amount | y | Int | 1500 | in cents |
payType | y | String | pay or refund | |
refundable | y | Int | 1500 | amount that can be refunded from this order in cents |
status | y | Int | 0,1,2,9 | 0 = pending order, 1 = unknown, 2 = success, 9 = fail |
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 of the card used for the purchase |
expiryDate | y | String | 0725 | expiry date of the card used for the purchase |
invoiceNum | y | String | ||
authNum | y | String | ||
transNum | y | String | ||
channel | y | String | PF_CC | PF_CC or UPI_EX |
Direct Card Tokenize
Endpoint
https://ccapi.iotpaycloud.com/v3/cc_directaddcard
Method
POST
Header
Content-Type: application/json;charset=UTF-8
Prerequisite
In order to make requests to this API, it is required that you must demonstrate compliance to the Payment Card Industry Data Security Standard (PCI DSS)
! Tip
After you receive access credentials (merchant ID, login name, merchant key). You can step through the demo Direct Tokenize which may help you when going through the documentation.
Request
name | required | type | sample | description |
---|---|---|---|---|
mchId | y | String(30) | 10000701 | assigned by IOTPay |
loginName | y | String(12) | jack123 | merchant's login name |
channel | y | String | PF_CC | PF_CC or UPI_EX |
cardId | y | String(30) | 604567999 | assigned by merchant |
cardNum | y | String | 432567******2266 | card number |
expiryDate | y | String | 0725 | format: MMYY |
holder | y | String | test | cardholder's name |
cvv | y | String | 786 | card cvv |
sign | y | String(32) | C380BEC2BFD727A4B6845133519F3AD6 | Sign algorithm |
Response
name | required | type | sample | description |
---|---|---|---|---|
retCode | y | String | SUCCESS or FAIL | |
retMsg | y | String | ||
retData | y | JSON | if retCode=SUCCESS, card detailed info returned along with token |
retData
contains card information:
name | required | type | sample | description |
---|---|---|---|---|
cardId | y | String | 604567999 | assigned by merchant |
cardNum | y | String | 432567******2266 | cardNum of the card added |
expiryDate | y | String | 0725 | expiryDate of the card added |
holder | y | String | test | holder of the card added |
cvv | y | String | 786 | cvv of the card added |
You can now use the cardId
for future purchases
If you need to review the card information, you can call the Query Card endpoint.
To purchase with the tokenized card, please use the Purchase With Token endpoint.