Refund a payment transaction
POSThttps://test.hipay.mn/payment/cancel
Allows for refunding a transaction due to system errors or user refund requests. Refunds can only be processed on the same day. Transactions made at 23:59 cannot be refunded at 00:00.
Request
Header Parameters
Authorization stringrequired
Send client_secret as a Bearer token
- application/json
Body
required
The entityId (client_id) and client_secret will be provided when registering as a merchant.
entityId stringrequired
Merchant ID (client_id)
paymentId stringrequired
Transaction ID
Responses
- 200
Request Response
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
code stringrequired
Possible values: [0
, 1
]
Request status
description stringrequired
Possible values: [SUCCESS
, UNSUCCESS
, USER_PAYMENT_VERIFICATION_FAILED
, RISK_REJECT
, REGULATION_RESTRICTION
, PROCESS_FAIL
]
Status information
paymentId string
Possible values: <= 36
Transaction ID
correction_paymentId string
Possible values: <= 36
Refunded transaction ID
message string
Алдааны мэдээлэл
[
{
"code": 1,
"description": "SUCCESS, PROCESS_FAIL,UNSUCCESS etc.",
"paymentId": "26d07423-5733-44b3-9143-2ebb099f5bb5",
"correction_paymentId": "26d07423-5733-44b3-9143-2ebb099f5bb5",
"message": "invalid or missing entityId parameter"
}
]
- python
- curl
- csharp
- go
- nodejs
- ruby
- php
- java
- powershell
- REQUESTS
- HTTP.CLIENT
import requests
import json
url = "https://test.hipay.mn/payment/cancel"
payload = json.dumps({
"entityId": "songo.mn",
"paymentId": "26d07423-5733-44b3-9143-2ebb099f5bb5"
})
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer <TOKEN>'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
ResponseClear