Purchase with Wallet
Endpoint: https://ccapi.iotpaycloud.com/v3/cc_purchasewithwallet
Reqeust method:
- POST
- Content-Type: application/json;charset=UTF-8
This API is for Apple Pay and Google Pay, contact us before integrating this API.
Parameters
name | required | type | sample | description |
---|---|---|---|---|
mchId | y | String(30) | 10000701 | assigned by IOTPay |
mchOrderNo | y | String(30) | 1234567890abc | assigned by merchant |
amount | y | Int | 1500 | in cents |
currency | y | String(3) | CAD | for now only CAD supported |
walletType | n | String(10) | “ApplePay” for ApplePay, “GooglePay” for Google Pay | |
walletData | n | String | The OEM Wallet data is generated by the mobile device authorized wallet | |
loginName | y | String(12) | jack123 | merchant's login name |
subject | n | String(64) | ||
body | n | String(250) | ||
sign | y | String(32) | C380BEC2BFD727A4B6845133519F3AD6 | Sign algorithm |
walletData
must be base64encoded.
For ApplePay, you must send the Apple payment token as received by the passkit.
For Google Pay, you must send the payment token (paymentData.paymentMethodData.tokenizationData.token) as received by Google Pay API.
Response
name | required | type | sample | description |
---|---|---|---|---|
retCode | y | String | SUCCESS or FAIL | |
retMsg | y | String | ||
retData | y | JSON | if retCode=SUCCESS, order detailed info returned |
retData contains order infomation:
name | required | type | sample | description |
---|---|---|---|---|
payOrderId | y | String | SUCCESS or FAIL | |
mchId | y | String | ||
mchOrderNo | n | String | ||
originalOrderId | y | String | original pay order id if payType=refund | |
amount | y | Int | 100 | in cents |
currency | y | String | CAD | |
payType | y | String | pay or refund | |
refundable | y | Int | 100 | in cents |
status | y | Int | 2 | 2 or 3 means success |
invoiceNum | y | String | ||
paySuccTime | y | String | 2021-04-07 19:44:51 | |
cardNum | y | String | 432567******2266 | |
cardType | y | String | V or M | |
expiryDate | y | String | ||
authNum | y | String | ||
transNum | y | String | ||
channel | y | String | CC_CA | ApplePay:CC_CA, GooglePay: CC_CG |
capture | y | String | Y | always Y on SUCCESS |