# 2.1 Create Web Payment

# Request URL
  • /api/v1/payment
# Request Method
  • POST
# Request Header
parameter name Is it mandatory type of data description
Content-Type mandatory string application/json
# Request Body
parameter name Is it mandatory type of data length example description
appId mandatory string - - application APPID
appName mandatory string 1-100 - Merchant application name, format: letter + space, 1-100 characters
mchOrderId mandatory string 1-32 CCP20220428011068111 Merchant order id (unique for transactionId) 1-32 characters
amount mandatory int 100-5000000 50000 payment amount (unit: cents) PHP:500.10, should set 50010 cents
customerName optional string 1-100 - payer name
channelCode mandatory string - - PayCools ChannelCode
email mandatory string - - The email address of customer, which may be used for receiving the payment notification or be displayed in the payment confirmation page, if it is not available, please submit the merchant's email address for this parameter.
mobile mandatory string 11 - The mobile number of customer, which may be used for receiving the payment notification or be displayed in the payment confirmation page, if it is not available, please submit the merchant's mobile number for this parameter.
remark optional string - - payment remark
sign mandatory string - 45eebd745dcf0b5f6d6f9fcde28cd9fe8116a892 sign
callbackUrl mandatory string 1-100 - callback address, used to send transaction notifications
redirectUrl mandatory string 1-100 - redirect to this URL when the transaction is completed
# successful response example
{
    "code": 1000,
    "message": "success",
    "data": {
        "redirectUrl": "https://a.api-uat.paycools.com/1L9zPnp",
        "transactionStatus": "PENDING",
        "transactionId": "C1175676368800878371"
    }
}
# description: The redirectUrl will be expired at 1 hour from the order was created.
# failed response example. code see reference
{
    "code":1002,
    "message":"merchant white ip forbidden"
}