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 (e.g., MYR).

Maximum string length: 3
Example:

"MYR"

amount
integer<int64>
required

The transaction payment value. This field exclusively accepts integer units where the final decimals are represented as whole values (e.g., an amount value of 1000 translates to 10.00 in the system backend).

Example:

100

referenceCode
string
required

The merchant-side unique order reference or invoice tracking sequence code.

Maximum string length: 50
description
string
required

Short free-text summary of the transaction.

Use English letters, numbers, spaces and basic punctuation (. , - _ ( ) @ /). Avoid emojis and non-English characters: some payment providers remove unsupported characters or shorten the text (for example, FPX keeps only the first 30 characters), so the description shown to the customer by the provider may differ from what you sent. The payment is not rejected when characters are removed.

Maximum string length: 100
Example:

"Order details"

ipAddress
string
required

The customer's IP address captured by the merchant server.

Maximum string length: 50
returnUrl
string
required

The synchronous return URL where the customer's browser is automatically redirected after the transaction is completed.

Maximum string length: 500
Example:

"https://returnurl.com/"

timestamp
integer<int64>
required

Numeric timestamp in milliseconds representing request validation freshness, generated via new Date().getTime(). Example: 1621851652617.

Example:

1621851652617

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

Target address utilized for asynchronous host-to-host webhook payment status change push actions. See Callback Notifications for the payload and signature verification steps.

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

Your unique Merchant ID assigned by CommercePay.

Response

Success

redirectionType
enum<integer>

How to present the payment to the customer.

Available options:
1,
2,
4,
5,
6
redirectUrl
string | null

URL used for the customer to redirect to the payment page

sessionNumber
string | null

Unique CommercePay Session Number