Skip to main content
POST

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

channelId
integer<int32> | null

An identifier that represents a CommercePay payments channel. Refer to the id on response endpoints of Get Channel List

Optional: Send without channelId parameter to call Payment web

Example:

2

providerChannelId
string | null

An identifier that represents the payment provider channel. To get providerChannelId, kindly refer to Get Provider Channels for more information

Example:

"TEST0021"

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/"

savePayment
boolean

[Conditional for Tokenize Payment] To save user info for subsequent payment

customer
object
subMerchant
object
localCitizen
boolean

[Conditional for certain channel] Example: If the customer is from Malaysia, kindly set it as True; else, set it as False

recurringPaymentInfo
object

[Conditional for Recurring Payment]

requestPaymentExtraInfo
object

[Optional]

platformCharge
object

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

ChannelDetails
object

[Optional]

BrowserInfo
object

[Optional]

VirtualAccountCode
string | null

Code to identify virtual account to make payment.

Maximum string length: 30
loyaltyPaymentInfoDto
LoyaltyPaymentInfoDto · object

[Conditional for Loyalty payment]

Response

Success

currencyCode
string | null

Currency code with a 3-letter ISO 4217 standard code

Maximum string length: 3
Example:

"MYR"

amount
integer<int64>

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

Example:

100

transactionNumber
string | null

Unique CAP Transaction Number

Maximum string length: 24
channelId
integer<int32> | null

Refer to endpoints in Get Channel List

redirectionType
enum<integer>

Notes: 1 = UrlRedirection

Available options:
1,
2
redirectUrl
string | null

URL used for the customer to redirect to the payment page

clientScript
string | null

Client script used for the customer to redirect to the payment page

transactionExpired
string<date-time>

Transaction Expired Date Time