E-Money
E-Money Refund
Refund E-Money transactions via Paylabs API.
Request URL
URL: ${ROOT_URL}/payment/v2.3/ewallet/refund
HTTPMethod: POST
EndpointUrl: /payment/v2.3/ewallet/refund
Refund Supported Channel
| Channel | Support |
|---|---|
| DANA | Y |
| Shopee | Y |
| Linkaja | Y |
| OVO | N |
| Gopay | Y |
E-Money Refund Request Parameters
Header
| Field Name | Type | Value | Required |
|---|---|---|---|
| Content-Type | String(30) | Fixed value "application/json;charset=utf-8" | Yes |
| X-TIMESTAMP | String(29) | Current time, format 2022-09-16T16:58:47.964+07:00 | Yes |
| X-SIGNATURE | String(64) | Signature. For details please check Data Signing Rules | Yes |
| X-PARTNER-ID | String(20) | Merchant ID | Yes |
| X-REQUEST-ID | String(64) | Unique ID for each request | Yes |
Body
| Parameter | Type | Required | Remarks |
|---|---|---|---|
| requestId | String(64) | Yes | Unique identifier on every request |
| merchantId | String(20) | Yes | Unique identifier provided by payment gateway to the merchant |
| storeId | String(30) | No | Only if merchant has branches and wish to create order using its branch ID |
| merchantTradeNo | String(32) | Yes | Merchant order number |
| paymentType | String(20) | Yes | Payment type |
| amount | Decimal(12,2) | Yes | Amount in IDR, two decimals |
| refundAmount | Decimal(12,2) | Yes | Refund amount in IDR, two decimals. Fee auto calculated when request amount and fee type OUR |
| platformRefundNo | String(32) | Yes | Paylabs order number to refund |
| merchantRefundNo | String(32) | Yes | Merchant refund order number |
| notifyUrl | String(200) | No | Notification URL after refund done; parameters same as E-Money Inquiry Status |
| reason | String(200) | No | Reason for refund |
| transFeeRate | Decimal(6,6) | No | Transaction Rate, six decimals |
| transFeeAmount | Decimal(12,2) | No | Fees, two decimals |
| totalTransFee | Decimal(12,2) | No | Total transaction fee rate (excluding vatFee), two decimals |
| vatFee | Decimal(12,2) | No | Taxes, two decimals |
E-Money Refund Response Parameters
Header
| Field Name | Type | Value | Required |
|---|---|---|---|
| Content-Type | String(30) | Fixed value "application/json;charset=utf-8" | Yes |
| X-TIMESTAMP | String(29) | Current time, format 2022-09-16T16:58:47.964+07:00 | Yes |
| X-SIGNATURE | String(64) | Signature. For details please check Data Signing Rules | Yes |
| X-PARTNER-ID | String(20) | Merchant ID | Yes |
| X-REQUEST-ID | String(64) | Unique ID for each request | Yes |
Body
| Parameter | Type | Required | Remarks |
|---|---|---|---|
| requestId | String(64) | Yes | Unique identifier on every request |
| errCode | String(32) | Yes | 0 means success, otherwise see Error Code |
| errCodeDes | String(128) | No | Error description |
| merchantId | String(20) | Yes | Merchant ID |
| storeId | String(30) | No | Only if using branch ID channel account |
| paymentType | String(20) | Yes | Payment type |
| amount | Decimal(12,2) | Yes | Amount in IDR, two decimals |
| requestAmount | decimal(12,2) | No | |
| merchantRefundNo | String(32) | Yes | Refund number |
| merchantTradeNo | String(32) | Yes | Merchant order number |
| platformTradeNo | String(32) | No | Paylabs Platform Transaction Number |
| createTime | String(16) | No | yyyyMMddHHmmss |
| successTime | String(16) | No | yyyyMMddHHmmss |
| status | String(2) | No | 02: Refund success, 03: Refund in progress, 05: Refund failed |
Example
Request
POST /payment/v2.3/ewallet/query
# HTTP Header
Content-Type: application/json;charset=utf-8
X-TIMESTAMP: 2022-09-16T16:58:47.964+07:00
X-SIGNATURE: xxxxxxxxx
X-PARTNER-ID: 010001
X-REQUEST-ID: xxxxxxxxxxxxxxxxxxxxxxxx
# HTTP Body
{
"merchantId":"0010001",
"merchantTradeNo":"100100011650869509422",
"requestId":"200100011650869509422",
"paymentType":"DANABALANCE",
"amount":"10000.00",
"refundAmount":"10000.00",
"merchantRefundNo":"100100011650869509423",
"platformRefundNo":"100100011650869509423",
"reason":"test",
"transFeeRate":"0",
"transFeeAmount":"0",
"totalTransFee":"0",
"vatFee":"0"
}Response
POST /payment/v2.3/ewallet/query
# HTTP Header
Content-Type: application/json;charset=utf-8
X-TIMESTAMP: 2022-09-16T16:58:47.964+07:00
X-SIGNATURE: xxxxxxxxx
X-PARTNER-ID: 010001
X-REQUEST-ID: xxxxxxxxxxxxxxxxxxxxxxxx
# HTTP Body
{
"errCode":0,
"merchantId":"0010001",
"merchantTradeNo":"100100011650869509422",
"requestId":"200100011650869509422",
"paymentType":"DANABALANCE",
"amount":"10000.00",
"merchantRefundNo":"100100011650869509423",
"status":"05"
}