Skip to main content

Create Transaction

This API registers order information to invoke the payment screen and receives the Payment Page URL in the response.

Trade Type Behavior
  • QR Payment (native): The returned paymentPageUrl is a code URL. You must generate a QR code image using this URL for the user to scan.
  • Web Payment (mweb): The returned paymentPageUrl is a redirect URL. You must redirect the user's mobile browser to this URL.

Request​

Request URL
POST https://{API Domain}/api/trades/wechatpay
Content-type: application/json; charset=utf-8
Note

Supports API Idempotency (See API Idempotency)

Parameters​

Field NameTypeLengthRequiredDescription
mallIdString8Byte✅Merchant ID assigned by KICC
shopTransactionIdString60Byte✅Merchant Transaction ID (API Idempotency Key)
shopOrderNoString40Byte✅Merchant Order No. Must be Unique.
goodsNameString100Byte✅Product Name (English Only)
returnUrlString256Byte✅URL to redirect to after authentication completes
tradeTypeString3Byte✅Payment Type
QR Payment: "native"
Web Payment: "mweb"
notifyUrlString256Byte✅Webhook URL for Payment Completion
Must whitelist KICC IPs (Inbound)
amountInfoObject✅Payment Amount Info (See amountInfo below)
customerInfoObjectCustomer Info (See customerInfo below)

amountInfo (Payment Amount Info)​

Field NameTypeLengthRequiredDescription
currencyString3Byte✅Currency Code (KRW: "KRW", USD: "USD")
totalAmountNumber✅Total Payment Amount
For USD: Amount * 100 (e.g., $12.03 -> 1203)

customerInfo (Customer Information)​

Field NameTypeLengthRequiredDescription
customerIdString20ByteCustomer ID
customerNameString20ByteCustomer Name
customerMailString50ByteCustomer Email
customerContactNoString11ByteCustomer Contact No. (Numbers only)
customerAddrString200ByteCustomer Address
Request Example
{
"mallId": "{Merchant ID}",
"shopTransactionId": "{API Idempotency Key}",
"shopOrderNo": "{Merchant Order No}",
"goodsName": "Sample Product",
"returnUrl": "{Merchant Return URL}",
"tradeType": "native",
"notifyUrl": "{Webhook URL}",
"amountInfo": {
"currency": "KRW",
"totalAmount": 1000
},
"customerInfo": {
"customerId": "User123",
"customerName": "John Doe",
"customerMail": "test@email.com",
"customerContactNo": "01012345678",
"customerAddr": "Seoul, Korea"
}
}

Response​

Parameters​

Field NameTypeLengthRequiredDescription
resCdString4Byte✅Response Code (Success: “0000”)
resMsgString1000Byte✅Response Message
shopTransactionIdString60Byte✅Returns the value sent in the request
mallIdString8ByteMerchant ID assigned by KICC
pgCnoString20ByteKICC Payment Transaction ID
paymentPageUrlString2048BytePayment Page URL
For QR (native): Use this to generate a QR code.
For Web (mweb): Redirect to this URL.
resDetailMsgString1024ByteDetailed error message from WeChat (URL encoded)
Response Example
{
"resCd": "0000",
"resMsg": "Success",
"mallId": "{Merchant ID}",
"shopTransactionId": "{API Idempotency Key}",
"pgCno": "KICC Payment Transaction ID",
"paymentPageUrl": "weixin://wxpay/bizpayurl?pr=..."
}