Skip to main content

Refund via Seller-API

Refund

During this process, refunds are transferred to Channel Pilot Pro.

$refunds= array();
$refunded= new CPRefund("TEST_ORDER_531_1", "2014-05-28T11:25:57", "100", "delayed shipment");
$refunds[] = $refunded;

$refunded = new CPRefund("TEST_ORDER_531_2", "2014-05-28T11:25:57", "100", "delayed shipment");
$refunds[] = $refunded;

$api = new ChannelPilotSellerAPI_v1_2("cpMerchantId", "cpApiToken");
$result = $api->registerRefunds($refunds);

API function "REGISTERREFUNDS"

$result = $api->registerRefund($refunds);

To refund the total or a partial amount in Channel Pilot Pro, there is the function "refunds()". A "CPRefund" object is created for each order to be refunded.

Sample request:

[
{
"orderHeader":{
"orderId":"12345678",
" orderIdExternal":"TEST_ORDER_531_1",
"source":"marketplace_1",
" refundTime":" 2019-02-07T13:42:30+01:00",
"refund":{
" net":"100",
" gross":" 119",
" tax":" 19"
}
}
}
]

Sample response:

[
{
"updateResults":[{
"orderHeader":{
"orderId":"12345678",
"orderIdExternal":"TEST_ORDER_531_1",
"source":"marketplace_1",
"status":{
"identifier":"25",
"publicTitle":"Storniert",
"publicDescription":"Teilweise Ausgeliefert",
"hasError":false
},
"orderTime":"2014-05-27T18:22:38+02:00"
},
"header":{
"resultCode":200,
"resultMessage":""
}
}
}
]

Did this answer your question?