question

adil avatar image
adil asked David Marginian commented

Default tax not getting applied on clover custom orders(API).

I have set default taxes on clover dashboard.1632815288726.png

I have created a custom order api call

-> post ( "{ $this -> baseUrlPlatformApi }/v3/merchants/" . $cloverMerchantId . '/orders' , [
'state' => 'open' ,
'note' => 'Membership payment order.'
]);


Then made line items for that above order like below and posted to respective endpoint:

$lineItem = [
"name" => " membership payment" ,
"price" => dollarToCents ( $membershipTotal )
];
-> post ( "{ $this -> baseUrlPlatformApi }/v3/merchants/" . $cloverMerchantId
. '/orders/' . $order [ 'id' ] . '/line_items' , $lineItem
);


the problem is default taxes is not bieng applied to it.

how can i make default taxes be applied on custom clover orders?

REST API
1632815288726.png (305.9 KiB)
10 |2000 characters needed characters left characters exceeded

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

1 Answer

· Write an Answer
David Marginian avatar image
David Marginian answered David Marginian commented

Please see the note in the UI - "Default (will be added to any items with "Default Taxes and fees" turned on"). As a side note, I would highly recommend you use our atomic order endpoints to work with orders, not the APIs you are using - https://docs.clover.com/docs/working-with-orders.

2 comments
10 |2000 characters needed characters left characters exceeded

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

Im creating custom line item not preexisting line item.


0 Likes 0 ·

Ok, so you aren't using Clover inventory, which means the dashboard setting isn't going to apply (there is no Clover item that has the associated tax rate). You need to pass the tax rate with your request per the documentation - https://docs.clover.com/docs/creating-custom-orders#adding-a-custom-line-item

1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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