Overview | API Call | API Response

Partial Refund

 

While “Cancel Transaction” cancels a whole transaction, the “Partial Refund” feature lets you define an amount you want to refund (a late discount, because the article is damaged for example).


API Call

 

Send this api call with a POST method to sandbox.hellopay.com.sg/merchant/refund (remember to change the ending ‘com.sg’ to the ending of your country).

The content type should be application/json.

"data={
 "purchaseId": "AAEAAADoKU7eQMDdC6oeMsfGcrBOajgOeyj4vWZgGcgA_KewQCQR31yI",
 "refundAmount": "23000.00",
 "merchantReferenceId": "1130239",
 "refundCurrency": "SGD",
 "description": "[your company name] refund",
 "shopConfig": "AAEAAADoKU7YJh44utJbVDLTqqEEeiaO28_f9LjaYMu1GdoBNT9_IG--/AAEAAAgfi0NkDIDyXMhIaaM-wfYLziibzdgBQIQVoD4hzxDnQt5szEIq/0ce5b60001d7e89c7b50fbe59cfb1bf5"
}"
"data={
 "purchaseId": "",
 "refundAmount": "",
 "merchantReferenceId": "",
 "refundCurrency": "",
 "description": "",
 "shopConfig": ""
}"

Description

Purchase ID

The id helloPay sent you in the “Create a Purchase” response.

Refund Amount

With this value you can decide how big the refund amount should be.

Merchant Reference ID

Your reference Id for this purchase.

Refund Currency

The currency, you’re working with in 3 digits.

Description

A short description about this api call, or course it can be autogenerated or just: [your company name] refund.

ShopConfig

Also called API Key, you can find it in your merchant account of the helloPay sandbox in “Account Settings”.


API Response

This is the response, that you will get! That means you don’t need to provide this data, you’ll receive it.

{
"success":true
}
{
"success":false
}

Description

Success

A boolean so you can check, if it’s a success or failure response.