Skip to main content
POST
Hosted Session Checkout

Headers

Abp-TenantId
string
required

Your unique Merchant ID assigned by CommercePay.

Authorization
string
required

Your API credentials used for authentication (typically a Bearer token).

cap-signature
string
required

A unique security hash used to verify the integrity of the request body. See Generate Signature for how to generate this.

Body

application/json
currencyCode
string
required

Currency code with a 3-letter ISO 4217 standard code

Maximum string length: 3
Example:

"MYR"

amount
integer<int64>
required

Please take note: The Amount parameter only accepts integer units. For example, 1000 is equivalent to 10.00 for the backend.

Invalid Format: 1,000.00

Example:

100

referenceCode
string
required

Merchant Reference Code

Maximum string length: 50
ipAddress
string
required

Customer’s IP address captured by the merchant system

Maximum string length: 50
returnUrl
string
required

Return URL supplied by the merchant server for the payment response and used by CommercePay to redirect the customer's browser back to the desired page on the Merchant’s site

Maximum string length: 500
Example:

"https://returnurl.com/"

timestamp
integer<int64>
required

new Date().getTime()

Example:

1621851652617

description
string | null

Transaction Description

Maximum string length: 100
Example:

"Order details"

userAgent
string | null

[Conditional] Customer’s user agent. It is recommended to input for a better user experience for specific channels due to different platforms such as desktop, mobile, or app view. Example channels impact: ShopeePay

Maximum string length: 200
callbackUrl
string | null

Callback URL is host-to-host communication. CommercePay sends the transaction response to the merchant callback server based on the callback URL given. If the URL is provided, the callback will be triggered; otherwise, it would not trigger. Refer to the Merchant Callback URL to know more

Maximum string length: 500
Example:

"https://callback.com/"

Customer
object
SubMerchant
object
PlatformCharge
object

Optional: Only Authorized Partners by CommercePay are allowed to charge platform fees to the merchant

virtualAccountCode
string | null

Code to identify virtual account to make payment.

Maximum string length: 30
RequestPaymentExtraInfo
object

[Optional]

expiredInMinutes
integer | null

Set the session expired in minutes

Example:

30

tenantId
integer | null

Fill in tenant id

Response

Success

redirectionType
enum<integer>

Notes: 1 = UrlRedirection

Available options:
1,
2
redirectUrl
string | null

URL used for the customer to redirect to the payment page

sessionNumber
string | null

Unique CAP Session Number