post https://dev-apiv2api.upayments.com/api/v1/create-refund
Single refund from order id
Overview
Overview Description
Request Header
Add "Authorization": "Bearer {Token}" to the request header.
Request Model
Input Parameter | Type | Length | Description |
---|---|---|---|
orderId | string,mandatory | 255 | Pass refund order ID which is received in Get Payment Status API. |
totalPrice | float, mandatory | 10,2 | Enter refund amount |
customerFirstName | string, optional | 255 | Pass customer first name |
customerEmail | string, optional | 250 | Pass customer email |
customerMobileNumber | string, optional | 10 | Pass customer mobile number |
reference | string, optional | 255 | Pass order reference |
notifyUrl | string, optional | 255 | Pass notification URL |
{
"orderId": "mv1GZnrG2l20221010125525514466916867376022022026038648992c2755f2",
"totalPrice": 10,
"customerFirstName": "Jhon",
"customerEmail": "[email protected]",
"customerMobileNumber": "+96512345678",
"reference": "11223344",
"notifyUrl": "https://upayments.com/en"
}
Response Model
{
"status": true,
"message": "Refund invoice generated successfully",
"data": {
"orderId": "k4eJmnNR8pME3OdxVO6m202210101255255144669168674086486939107564899f80070d8HsUDgrRtCbzbuJFTdH9QyMLNkgaFcKMU",
"refundOrderId": "HsUDgrRtCbzbuJFTdH9QyMLNkgaFcKMU",
"refundArn": "202311074314067023726014116806"
}
}
If you pass extraMerchant data in charge API then you will get the below response
{
"status": true,
"message": "success",
"data": {
"orderId": "x9qgyobGKN2022101012552551446691695107275189570586650948cbbbbb0",
"isMultivendorRefund": true,
"refundPayload": [
{
"refundRequestId": "cDg2RTY1Yjc5aw==",
"ibanNumber": "KW91KFHO0000000000051010173254",
"totalPaid": "50.000",
"refundedAmount": 0,
"remainingLimit": 50,
"amountToRefund": 0,
"merchantType": "vendor"
},
{
"refundRequestId": "bExqUVk2T1Y4Tg==",
"ibanNumber": "KW31NBOK0000000000002010177457",
"totalPaid": "50.000",
"refundedAmount": 0,
"remainingLimit": 50,
"amountToRefund": 0,
"merchantType": "vendor"
}
],
"multivendor_refund_end_point": "https://dev-apiv2api.upayments.com/api/v1/create-multivendor-refund"
}
}