1

I want to partial refund (for example 5$) with the rest API for an invoice paid with PayPal.

I am using this endpoint: /invoice/{id}/refund
And this body:

{
  "items": [
    {
      "order_item_id": 1,
      "qty": 0
    }
  ],
  "isOnline": true,
  "arguments": {
    "shipping_amount": 0,
    "adjustment_positive": 5
  }
}

It works, if the customer bought only one product.

But it gives me the following error if the customer bought multiple products (same body, but more products bought ... tried it also with all order_item_id's and I don't want to set qty to 1 because then the product itself will be invoiced, I just want to refund e.g. 5$)

"Creditmemo Document Validation Error(s):\nYou can't create a creditmemo without products."

Am I doing something wrong, or is this just an error from the API?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.