REFUND Order

To refund an order, POST with the order id, payment method, ids, and refund amounts with your private key from your server.
You have 2 options (listed below) when processing refunds:
- Refund Order - Simply provide the refund amount. If the refund amount is less than the total order amount and there are more than 1 payment method, we'll use the Store Configurations to determine which payment method to refund first
- Refund Order By Individual Payment Methods - Specify the refund amount PER payment method
Refund Order
Simple Refund of Order only specifying the amount to be refunded
POST
https://test-api.featherpay.io/api/v1/orders/{orderId}/refundByOrder
curl
curl -X POST \
--url 'https://test-api.featherpay.io/api/v1/orders/:orderId/refundByOrder' \
--header 'content-type: application/json;charset=UTF-8' \
--header 'accept: application/json' \
--header 'X-Api-Key: {Secret API Key}' \
--header 'X-Store-Id: {Store ULID}' \
--data '{
"refundAmount":1000
}'200
{
"success":true,
"orderId":"01FYXZBEZ19YJVVHKS32HY6A3R",
"paymentRefunds":[
{
"orderPaymentId":"01FYXZRHR78ZARN6NZCZ8M7RE2",
"refundAmount":1000
}
],
"paymentResponses":[
{
"message":"This transaction has been refunded.",
"paymentType":"Manual",
"paymentId":"01FYXZRHR78ZARN6NZCZ8M7RE2",
"statusCode":200,
"success":true
}
]
}Refund Order By Individual Payment Methods
Refund an order by specifying the refund amount per order payment
POST
https://test-api.featherpay.io/api/v1/orders/{orderId}/refund
curl
curl -X POST \
--url 'https://test-api.featherpay.io/api/v1/orders/:orderId/refund' \
--header 'Accept: application/json' \
--header 'X-Api-Key: {Secret API Key}' \
--header 'X-Store-Id: {Store ULID}' \
--data '[
{
"orderPaymentId": "01EY8XRZZZ7JPYQWZFANX0N5CM",
"refundAmount": 100000
},
{
"orderPaymentId": "01EY8ZSZTV1KK7XZBKA2H0TJSN",
"refundAmount": 400000
}
]'200
[
{
"message": "This transaction has been approved.",
"paymentType": "Credit / Debit Card",
"paymentId": "01EY8XRZZZ7JPYQWZFANX0N5CM",
"statusCode": 200
},
{
"message": "This transaction has been approved.",
"paymentType": "Credit / Debit Card",
"paymentId": "01EY8ZSZTV1KK7XZBKA2H0TJSN",
"statusCode": 200
}
]