# 1. Create Checkout Order

# Request URL

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

# Request Method

  • POST

# Request Headers

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

# Request Body Parameters

Parameter Name Required Type Description
appId Yes string Application APPID
param Yes string Parameter body
sign Yes string Signature

# param

Parameter Name Required Type Length Limit Example Description
timestamp Yes long - 1677495496979 Current timestamp
mchOrderId Yes string 1-32 CCP20220428011068111 Merchant order ID, format: alphanumeric, 1-32 characters
merchantLogo No string - Merchant logo, displayed on checkout page
language No string - - checkout page language (EN, IN, TH), default in country language or english
countryCode Yes string - - Country code (PH, ID, MY, TH)
currency Yes string - - Pricing currency (PHP, IDR, MYR, THB)
settlementCurrency Yes string - - Settlement currency (PHP, IDR, MYR, THB)
channelTypeList No array - - Channel type (QR, ONLINE_BANKING, EWALLET, BANK_TRANSFER, CARD, PAYLATER)
channelCodeList No array - Reference list Channel code
amount Yes long - - Payment amount (Unit is in cents, when the country is Indonesia, the unit is in yuan)
customerName Yes string 1-128 - Payer's name
email Yes string 1-128 - Payer's email
mobile Yes string 10-14 - Payer's phone number
expireSeconds No long - - Expiration time in seconds
notifyUrl Yes string 1-256 - Merchant transaction notification URL
redirectUrl Yes string 1-512 - Redirect URL
remark No string 1-256 - Order remark
virtualAccountName No string - - va name, default use merchant name
goodsDetails No List<goodsDetail> - - Product information
This field is required when using PAYLATER, otherwise not available.
Note: If this object is passed in, the inner required fields must also be provided.
billingAddress No billingAddress - - Billing address information
This is a required field when using PAYLATER. The merchant can pass this value through the interface; if not provided, the system will prompt the user to complete the address on the checkout page.
Note: If this object is passed in, the inner required fields must also be provided.

# goodsDetail param

Parameter Name Required Type Length Limit Example Description
name Yes string 1-128 - Product name
price Yes long - - Product unit price (The total price of the product must match the payment amount)
quantity Yes integer 1-9999 - Product quantity
sku Yes string 1-64 - SKU ID (Unique ID assigned by the merchant to identify the product)
url No string 1-256 - Product URL. This is required when channelCode is ID_INDODANA_URL
category Yes string 1-64 - Product category. Reference values: airlines arts-crafts-and-collectibles automotive baby beauty-and-fragrances biller books-and-magazines business-to-business-including-mlm charity-and-non-profit clothing community digital-content electronics-and-telecom entertainment-and-media financial-services-and-products financial-services-and-technology food-and-beverage food-retail-and-service games-voucher gifts-and-flowers government health-and-personal-care home-and-garden hotel-and-travel insurance marketplace nonprofit offline-store others over-the-air overseas pets-and-animals property public-services religion-and-spirituality retail services sports-and-outdoors telco ticketing toys-and-hobbies transportation travel vehicle-sales vehicles-service-and-accessories fee offline
If no reference value is found, others can be used.

# billingAddress param

Parameter Name Required Type Length Limit Example Description
name Yes string 1-128 - Payer's name
address Yes string 1-512 - Payer's address
city Yes string 1-512 - Payer's city
state No string 1-512 - Payer's province
postalCode Yes string 5-10 - Payer's postal code
mobile Yes string 10-14 - Payer's phone number
countryCode Yes string 1-32 - Country code (Must match the country of the current channel type)

# Request Example

# Request Body

{
   "appId": "733b887a4a784708bb369524db5b6ded",
   "sign": "A5Vd8NcQvU3QT41Yee2jCIK58jDAKZ6kP5gEE4q7Yu92hUCY3k00FKTSlCNU+CcZm0LSrGbEMFMID3p7uvXaqy5khNv3kPndrgp7MIRHUmQnMgRK+g1XG7PzWdnrqlXc3g+L+kqVja+qrFRz+uVS6GLKLR1P4AtgTa9dok6NU7YTWOnG9r/FwIVx/At4czfEpI10pvg2TptVpiANmseGmz4G30hkaYTTNahkcOMQJn6PDFjivHvjNLZNJVOqHQzVUa+kca1yZZMPHtgxR647KjoY2oAjjl0Y45GL6zP9qHD/eVwcPPAPrRZ4K2o05OJnPf67fAcWNVqpnu6ZGQIXhQ==",
   "param": "{\"timestamp\":1715595802,\"mchOrderId\":\"10e5595801938341100\",\"merchantLogo\":\"https://test.img\",\"currency\":\"PH\",\"settlementCurrency\":\"PHP\",\"countryCode\":\"PH\",\"channelTypeList\":null,\"channelCodeList\":null,\"customerName\":\"name\",\"email\":\"test@email.com\",\"mobile\":\"09123456789\",\"amount\":10000,\"expireSeconds\":3600,\"remark\":\"remark\",\"notifyUrl\":\"https://www.test.com\",\"redirectUrl\":\"https://www.test.com\"}"
}

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
checkoutId string checkout id
checkoutUrl string checkout url
status string status
expiresTime string

# Response Example


{
  "code": 10000,
  "message": "Success",
  "data": {
    "checkoutId": "CH1789964654026559488",
    "checkoutUrl": "https://cashier.paycools.com/checkout/NzQxPl1wE-cdtloi1h0pTgc23ZcdGdXiGGZ2YvywJ-o=",
    "status": "PENDING",
    "expiresTime": "2024-05-14 15:27:00"
  }
}

Code Collection

# Failed Response Example

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