-
Notifications
You must be signed in to change notification settings - Fork 1
6) Refund API
Client can request for refund on the transaction
Sandbox Url: https://dev-bs.unopay.in/api/v1/
Production Url: https://bs.unopay.in/api/v1/
Description: This is called from Third Party app server for refund. Expected response contains refund Id , refund status.
Request:
Request Header:
x-checksum: hmac(sha256, (MerchantServerApiKey | {data block in request} | MerchantServerApiKey ))
Request Body:
{ "data": { "transactionId": "327-146899615357-42053108", "partnerId": "585", "amount": "2.0", "reason": "zvcczgzv", "orderId":"sl" } "error":null }
Response:
HTTP Response Codes:
200: success.
400: fail. May be due to checksum issue, Merchant issue (error block should have message).
402: declined. May be due to invalid appKey,invalid orderId.
500: server error.
501: Not implemented.
503: Service unavailable/Server Down.
Response header:
"x-checksum": asfasfwr5235235
{content of data hmac(sha256, (serverApiKey | data | serverApiKey) )}
Response body:
status field can have following values:
REQUESTED ACCEPTED IN_PROGRESS COMPLETED REJECTED
HTTP code 200 success { "data": { "refundId": 10, "status": "REQUESTED", "message": "Your refund support request created successfully. Our customer support will get in touch with you shortly." }, "error": null, } Error: 400 { "error": { type : "request_failed", code : "invalid_request" "message": "Checksum failure" } } 404 { "error": { type : "invalid_data", code : "invalid_orderid" "message": "Order not found" } }