Surcharges via REST Api

Fooman Surcharges will automatically appear in REST responses for individual orders/invoices/creditmemos under the extension_attributes key. 

For example the below response for salesOrderRepositoryV1Get will list the surcharges under extension_attributes > fooman_total_group > items:

2ac7e9ba9e9eb1f551718d029b66b9a2.pngCreating Refunds for Orders with Surcharges

By default when creating a creditmemo the whole surcharge amount will be refunded. If you wish to adjust the amount to a lower amount you can append an amount override to the REST Api url like the below:
where payment1 is the type id as seen in the previous API response.

So the full url would be something like this


for offline payment methods. And this for creating an online refund:


Which results in

Still need help? Contact Us Contact Us