• Resolved Cédric

    (@icedo)


    Hello,

    Please, can you give me the correct Json request required to create a refund?

    I am not able to make ‘line_items‘ work.

    Thank you very much!

    • This topic was modified 6 years, 3 months ago by Cédric.
    • This topic was modified 6 years, 3 months ago by Cédric.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    I recommend using this documentation:
    https://woocommerce.github.io/woocommerce-rest-api-docs/#refunds

    What’s going wrong?

    Thread Starter Cédric

    (@icedo)

    Hello Hanna,

    i know the doc. But item lines are not taken into account. When i look at the order after the request, only the total refunded is displayed, and nothing is displayed on the product line (what quantity and how much is refunded for each line).

    this is my request:
    {"amount":"4.89","reason":"","refunded_by":1,"line_items":{"2052":{"quantity":1,"tax_class":0,"total":"4.89"}}}

    What am i doing wrong?

    Thank you for your help

    Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    I’m not a developer, so I can’t get too deeply into this – I’ll leave it open to see if anyone else has a good answer for you.

    Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    We haven’t heard back from you or anyone else in a while, so I’m going to mark this as resolved. It helps keep the forum cleaned up. If you have any further questions, you can start a new thread.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Create Refunds With API REST’ is closed to new replies.