Skip to main content
POST
Refund Payment

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 CAP Transaction Number

Maximum string length: 24
reason
string | null
required

A description for refund.

Example:

"Purchase wrong item"

timestamp
integer<int64>
required

new Date().getTime()

Example:

1621851652617

amount
integer<int32> | null

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

Example: 100

[Please pass the required amount if issuing a partial refund; ignore this attribute if issuing a full refund.]

Response

Success

tenantId
integer<int64>

Merchant ID.

transactionNumber
string | null

Unique CAP Transaction Number of the original payment being refunded.

Maximum string length: 24
refundTransactionNumber
string | null

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

referenceCode
string | null

Merchant Reference 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

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 CAP Session Number

Maximum string length: 24
refundPaymentList
RefundPaymentListDto · object