Skip to main content

Do Refund

Refund the order(s).

Request Parametersapplication/json
DoChargeRequestModel
object
orderIds
array[integer]
The order ID(s) for which you want to initiate the refund.
emailAddresses
array[string]
The customer's email address(es) for which you want to initiate the refund.
If no OrderIds is provided, the refund will be initiated for all customer's
order IDs with the specified email address.
refundReason
string
The reason of the refund request.
vendorAccountId
integer
required
The vendor account ID identifies your PayPro Global account.
It can be found in Account settings > Business info.
apiSecretKey
string
required
The vendor account API secret key is a unique key
that was generated specifically for authenticating API requests.
It can be found in Store settings > General settings > Integration tab.
Response Parametersapplication/json
DoChargeResponseModel
object
response
object
orderId
integer
The order ID that needs to be refunded.
customerEmail
string
The customer's email whose order(s) should be refunded.
isRefundSuccessful
boolean
Possible values are true or false.
If true, the refund request is successful.
If false, the refund request failed.
refundNotice
string
The note if the refund request failed.
request
object
orderIds
array[integer]
The order ID(s) for which you want to initiate the refund.
emailAddresses
array[string]
The customer's email address(es) for which you want to initiate the refund.
If no OrderIds is provided, the refund will be initiated for all customer's
order IDs with the specified email address.
refundReason
string
The reason of the refund request.
vendorAccountId
integer
The vendor account ID identifies your PayPro Global account.
It can be found in Account settings > Business info.
apiSecretKey
string
The vendor account API secret key is a unique key
that was generated specifically for authenticating API requests.
It can be found in Store settings > General settings > Integration tab.
errors
array[object]
propertyWithError
string
propertyErrorMessages
array[string]
isSuccess
boolean
Request Sample
{
"orderIds": [
5458995,
5458996
],
"emailAddresses": [
"[email protected]",
"[email protected]"
],
"refundReason": "Product doesn't correspond to customer's expectation.",
"vendorAccountId": 123456,
"apiSecretKey": "your_api_secret_key"
}
Response Sample
{
"response": [
{
"orderId": 5458995,
"customerEmail": "[email protected]",
"isRefundSuccessful": false,
"refundNotice": "Order #5458995 is not in refundable state"
},
{
"orderId": 5458995,
"customerEmail": "[email protected]",
"isRefundSuccessful": false,
"refundNotice": "Order #5458995 is not in refundable state"
}
],
"request": {
"orderIds": [
5458995,
5458996
],
"emailAddresses": [
"[email protected]",
"[email protected]"
],
"refundReason": "Product doesn't correspond to customer's expectation.",
"vendorAccountId": 123456,
"apiSecretKey": "your_api_secret_key"
},
"errors": [
{
"propertyWithError": "orderId",
"propertyErrorMessages": [
"Error message 1",
"Error message 2"
]
},
{
"propertyWithError": "orderId",
"propertyErrorMessages": [
"Error message 1",
"Error message 2"
]
}
],
"isSuccess": false
}