Skip to main content
POST
Refund Payment
Pass amount only when issuing a partial refund. Omit it (or leave it null) when issuing a full refund.

Errors

In addition to standard signature errors, this endpoint can return:
A refund amount of 0 (or negative) is also rejected via FailedToRequestRefund (2042), with the message “Refund amount cannot be 0”.

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

transactionNumber
string | null
required

Unique CommercePay Transaction Number

Maximum string length: 24
reason
string | null
required

A description for refund.

Example:

"Purchase wrong item"

timestamp
integer<int64>
required

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

Example:

1621851652617

amount
integer<int32> | null

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).

Response

Success

tenantId
integer<int64>

Your unique Merchant ID assigned by CommercePay.

transactionNumber
string | null

Unique CommercePay Transaction Number of the original payment being refunded.

Maximum string length: 24
refundTransactionNumber
string | null

Unique CommercePay Transaction Number for the refund transaction itself, distinct from the original payment's transactionNumber.

referenceCode
string | null

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

amount
number<double>

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

currencyCode
string | null

Currency code with a 3-letter ISO 4217 standard code (e.g., MYR).

Maximum string length: 3
Example:

"MYR"

refundStatus
enum<integer>

Status of the refund itself (not the original payment).

Available options:
11,
12,
13,
16,
17,
18
responseMessage
string | null

Human-readable status message for the refund request.

paymentSessionNumber
string | null

Unique CommercePay Session Number

Maximum string length: 24
refundPaymentList
RefundPaymentListDto · object