API Refund problems

Highlighted
Shopify Partner
3 0 0

I'm use api to refund and cancel, But I can't refund:

/admin/api/2019-07/orders/#OrderId//refunds/calculate.json


With parameter: 

Array
(
    [refund] => Array
        (
            [currency] => USD
            [notify] => 1
            [note] => wrong size
            [shipping] => Array
                (
                    [full_refund] => 1
                )

        )

    [refund_line_items] => Array
        (
            [0] => Array
                (
                    [line_item_id] => 2035130040409
                    [quantity] => 1
                    [restock_type] => no_restock
                    [location_id] => 873229746265
                )

        )

    [transactions] => Array
        (
            [0] => Array
                (
                    [parent_id] => 1149718855769
                    [amount] => 11008.90
                    [kind] => refund
                    [gateway] => Cash on Delivery (COD)
                )

        )

)

 Shopify return:

stdClass Object
(
    [refund] => stdClass Object
        (
            [shipping] => stdClass Object
                (
                    [amount] => 10.00
                    [tax] => 0.00
                    [maximum_refundable] => 10.00
                )

            [refund_line_items] => Array
                (
                )

            [transactions] => Array
                (
                    [0] => stdClass Object
                        (
                            [order_id] => 924536438873
                            [kind] => suggested_refund
                            [gateway] => Cash on Delivery (COD)
                            [parent_id] => 1149718855769
                            [amount] => 10.00
                            [currency] => USD
                            [maximum_refundable] => 11008.90
                        )

                )

            [currency] => USD
        )

)

 

I test other orders but same result [refund_line_items] => Array NULL

 

 

 

0 Likes