question

imenu360 avatar image
imenu360 asked sam Deactivated answered

post service charge to order

We are sending orders to the clover system via our ordering platform and the API. But fails to post service charge for order.

We are posting json to - /v3/merchants/{mId}/orders/{orderId}/service_charge/

JSON is : {"percentage":21,"name":"Service Charge","enabled":true,"percentageDecimal":219000}

We are getting error as Bad Request from clover.

Is there anything wrong with our request ?

Thanks for any help in advance,

David

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

rachel avatar image
rachel Deactivated answered

Hi @iMenu360,

Thank you for identifying this issue. Currently, a pure web app has no way to apply a service charge to an order because posting a service charge to an order requires the service charge's id (hence the "Service charge in body is missing an ID" response).

Please note however that a merchant will always have at most a single service charge set. Creating a custom service charge on the fly to be added to an order is not supported behavior.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sam avatar image
sam Deactivated answered
Your request should look like this:
https://sandbox.dev.clover.com/v3/merchants/{ {mid}}/orders/{ {oid}}/service_charge
body: { "percentage": 10, "name": "this test", "id": "Z4MKX1B4RSQ34"}

Please refer to this thread:
https://clover.cloud.answerhub.com/questions/2038/...
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community