# 1. Create Payment

# Request URL

  • {domain}/open-api/taiwan/payment/generate

# Request Method

  • POST

# Request Header

Parameter Name Required Type Description
Content-Type Y string application/json

# Request Body Param

Parameter Name Required Type Description
appId Y string Application Id
param Y string param
sign Y string signature

# param

Parameter Name Required Type Length Example Description
timestamp Y long - 1677495496979 current timestamp
mchOrderId Y string 1-32 CCP20220428011068111 Merchant order id (unique for transactionId) 1-32 characters
amount Y long - - payment amount (unit: cents) USD:500.10, should set 50010 cents
currency Y string - USD currency (Default USD)
customerName Y string 1-128 - payer name
channelCode Y string - Reference List Platform ChannelCode
notifyUrl Y string 1-256 - notify url
redirectUrl Y string 1-512 - redirect url
email Y string 1-128 - payer email
mobile Y string 10 - payer mobile (format: start with 06, 08 or 09)
remark N string 1-256 - payment remark

# Request Example

# Request Body

{
   "appId":"b96f05030ffc411185c06f959e1c9210",
   "sign":"TfpDwYeJvfhO20dETdQJkWAjXmVmlsWZpSWLEQdHLItUk9z6x9+8OPn9bkVVzapvPL6qxghtrZIR8eBl4y/91LTIAg4jhw2l18wFh/SGGyn/iEOVypPwYrxfRUe/Um0D56OhhM3rX1jmrB/OfoZh9WicHd4w+Oo1YekTiGOTObGbKapSJwyhZG97/Q3+/pyRhE1+iGM3z0gC3oPh0YcTdw5Hmb2SOGrMMxXDomOu+UU6JFEUa6rYaKjkdA5xXeQrWx0N87jMSPbArifIHWlCVVwdNmidU4Xjjx5CRSKdtbf0VWQ79P/6gaRSlvBksiS4CO7/m5ZpFnCh+BX3TF5qiw==",
   "param":"{\"mchOrderId\":\"2101962132776649100\",\"amount\":6600,\"customerName\":\"abc2\",\"channelCode\":\"TW_JKOPAY_URL\",\"email\":\"test@gmail.com\",\"mobile\":\"0912345678\",\"currency\":\"USD\",\"notifyUrl\":\"https://google.com\",\"redirectUrl\":\"https://google.com\",\"timestamp\":1711962133}"
}

How to construct request body


# Response Param

Parameter Name Type Description
code integer response code
message string response message
data Object data

# data

Parameter Name Type Description
transactionId string Platform transaction id
payData string payment data(VA,URL or QR Content)
mchOrderId string Merchant order id
channelType string Channel Type("URL","VA","QR")

# Response Example

// URL
{
  "code": 10000,
  "message": "Success",
  "data": {
    "payData": "https://pay-gate-test.ugamedeal.com/pay.php?a=callback&orderId=bmp2bUpUeXFyZjU4NFZqZXd3cHpPRFRRYnVCSGRPK0tvUGhyemxjYWhOaz0=",
    "transactionId": "CU4X4724455881379840",
    "mchOrderId": "2101962248665558100"
  }
}

Code Collection

# Failed Response Example

{
  "code":21016,
  "message":"Merchant ip forbidden"
}