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)open in new window

Direct Card Purchase

Endpoint

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

Method

POST

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 Purchaseopen in new window which may help you when going through the documentation.

Request
namerequiredtypesampledescription
mchIdyString(30)10000701assigned by IOTPay
loginNameyString(12)jack123merchant's login name
channelyStringPF_CCPF_CC or UPI_EX
currencyyStringCADonly 'CAD' supported
mchOrderNoyString(30)604567999assigned by merchant
amountyInt1500in cents
cardNumyString432567******2266card number
expiryDateyString0725
holderyStringtestcardholder's name
cvvyString786
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
retMsgyString
retDatayJSONif retCode=SUCCESS, all fields returned in retData
retData contains order information:
namerequiredtypesampledescription
payOrderIdyStringPC20240101231256043886634219generated by IOTPay
mchIdyString10000701assigned by IOTPay
mchOrderNoyString604567999assigned by merchant
originalOrderIdnStringoriginal pay order ID for refund
currencyyStringCADonly 'CAD' supported
amountyInt1500in cents
payTypeyStringpay or refund
refundableyInt1500amount that can be refunded from this order in cents
statusyInt0,1,2,90 = pending order, 1 = unknown, 2 = success, 9 = fail
paySuccTimeyString2021-04-07 19:44:51time stamp for the moment when the payment succeeded
cardNumyString432567******2266card number of the card used for the purchase
expiryDateyString0725expiry date of the card used for the purchase
invoiceNumyString
authNumyString
transNumyString
channelyStringPF_CCPF_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)open in new window

! Tip

After you receive access credentials (merchant ID, login name, merchant key). You can step through the demo Direct Tokenizeopen in new window which may help you when going through the documentation.

Request
namerequiredtypesampledescription
mchIdyString(30)10000701assigned by IOTPay
loginNameyString(12)jack123merchant's login name
channelyStringPF_CCPF_CC or UPI_EX
cardIdyString(30)604567999assigned by merchant
cardNumyString432567******2266card number
expiryDateyString0725format: MMYY
holderyStringtestcardholder's name
cvvyString786card cvv
signyString(32)C380BEC2BFD727A4B6845133519F3AD6Sign algorithm
Response
namerequiredtypesampledescription
retCodeyStringSUCCESS or FAIL
retMsgyString
retDatayJSONif retCode=SUCCESS, card detailed info returned along with token
retData contains card information:
namerequiredtypesampledescription
cardIdyString604567999assigned by merchant
cardNumyString432567******2266cardNum of the card added
expiryDateyString0725expiryDate of the card added
holderyStringtestholder of the card added
cvvyString786cvv 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.

Last Updated: