Refund Application
- Endpoint:
POST /v1.0/debit/refund - Tags: Indonesia SNAP/Collection
Parameters
| Field | In | Type | Required | Constraints | Description |
|---|
Content-Type | header | string | Yes | | Content type, value always application/json |
X-TIMESTAMP | header | string | Yes | | Transaction date time, in format yyyy-MM-dd'T'HH:mm:ss.SSSXXX |
X-SIGNATURE | header | string | Yes | | Signature need to be generated with symmetricSignature or asymmetricSignature method |
ORIGIN | header | string | No | | Origin domain |
X-PARTNER-ID | header | string | Yes | | Unique identifier for partner was generated by Payermax, or known as clientId |
X-EXTERNAL-ID | header | string | Yes | | Unique messaging reference identifier generated by merchant and should be unique within the same day |
CHANNEL-ID | header | string | Yes | | Device identification on which the API services is currently being accessed by the end user (customer) |
Authorization | header | string | Yes | | Represents access_token of a request; string starts with keyword “Bearer ” followed by access_token |
Parameter Examples
Content-Type: "application/json"X-TIMESTAMP: ""X-SIGNATURE: ""ORIGIN: ""X-PARTNER-ID: ""X-EXTERNAL-ID: ""CHANNEL-ID: ""Authorization: ""
Request Body
Content-Type: application/json
| Field | Type | Required | Constraints | Description | Enum |
|---|
originalPartnerReferenceNo | string | Yes | maxLength: 64 | Original transaction identifier on partner system | |
refundAmount | object | Yes | | Net amount of the refund | |
refundAmount.value | string | Yes | | Refund amount | |
refundAmount.currency | string | Yes | maxLength: 3 | Refund currency | |
partnerRefundNo | string | Yes | maxLength: 64 | Reference number from merchant for the refund | |
merchantId | string | No | maxLength: 32 | Merchant identifier that is unique per each merchant | |
externalStoreId | string | No | maxLength: 64 | Store identifier to indicate to which store this payment belongs to | |
reason | string | No | maxLength: 512 | Refund reason | |
additionalInfo | object | Yes | | Additional information | |
additionalInfo.version | string | Yes | maxLength: 8 | API version. Current value: 1.4 | |
additionalInfo.keyVersion | string | Yes | maxLength: 8 | Signature Algorithm Version, Current value: 1 | |
additionalInfo.refundNotifyUrl | string | No | maxLength: 256 | Refund callback link, which can be configured in the background of the system | |
Example
json{
"merchantId": "P05010114269706",
"partnerRefundNo": "{{orderNumber}}",
"originalPartnerReferenceNo": "20240302141539079100054",
"refundAmount": {
"value": "1",
"currency": "IDR"
},
"additionalInfo": {
"version": "1.4",
"keyVersion": "1",
"refundNotifyUrl": "http:xx"
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Responses
200
ErrorCode
| code | message |
|---|
| 2005800 | Successful |
| 5005801 | Internal Server Error |
| 4005801 | Invalid Field Format [field name/msg] |
| 4295800 | Too Many Requests |
| 4015800 | Unauthorized. [reason] |
| 4045808 | Invalid Merchant |
| 4055801 | Requested Opearation Is Not Allowed [reason] |
| 4045813 | Invalid Amount [reason] |
| 4035815 | Transaction Not Permitted.[reason] |
| 4035814 | Insufficient Funds |
| 4045801 | Transaction Not Found [reason] |
| 5005800 | General Error [msg] |
| Field | Type | Required | Constraints | Description | Enum |
|---|
responseCode | string | Yes | maxLength: 7 | response code | |
responseMessage | string | Yes | maxLength: 256 | response msg | |
refundNo | string | Yes | maxLength: 64 | Refund number identifier on Payermax system | |
partnerRefundNo | string | Yes | maxLength: 64 | Reference number from merchant for the refund | |
originalReferenceNo | string | Yes | maxLength: 64 | Original transaction identifier on Payermax system | |
additionalInfo | object | Yes | | Additional information | |
additionalInfo.refundStatus | string | Yes | maxLength: 2 | 00 - Success 03 - Pending 06 - Failed | |
Response Example
json{
"responseCode": "2005800",
"responseMessage": "Request has been processed successfully",
"originalReferenceNo": "2020102977770000000009",
"refundNo": "REF993883",
"partnerRefundNo": "239850918204981205970",
"additionalInfo": {
"refundStatus": "00"
}
}
1
2
3
4
5
6
7
8
9
10