Skip to main content

Refund a payment transaction

POST 

https://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

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

Request Response

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

    Алдааны мэдээлэл

  • ]

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)
Request Collapse all
Base URL
https://test.hipay.mn
Auth
Parameters
— headerrequired
Body required
{
  "entityId": "songo.mn",
  "paymentId": "26d07423-5733-44b3-9143-2ebb099f5bb5"
}
ResponseClear

Click the Send API Request button above and see the response here!