question

habib avatar image
habib asked David Marginian Deactivated commented

created Atomic Order Discount Issue

Bello attached image I have created atomic order the call discount api but discount total is showing correct on reciept but its not showing correct on detail page1617111810433.png



1617111859805.png

Orders
1617111810433.png (101.2 KiB)
1617111859805.png (110.9 KiB)
10 |2000

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

1 Answer

David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated commented

The atomic order APIs can only calculate the order total etc. for you based on the data that is available at the time the request is made. In this case you are using the atomic order endpoint to create the order, and then you are adding the discount after order creation in a separate call (/v3/merchants/mid/orders/orderId/discounts). If you perform any adjustments to the order after it has been created you are responsible for properly updating the total to account for those adjustments. If you want to continue to do this then you need to properly update the total after you add the order discount. However, I would suggest that you pass the discount in the atomic order request instead of making a subsequent call to add the discount. Also, you should be testing in sandbox, not production.

2 comments
10 |2000

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

habib avatar image habib commented ·

Client is given live account and i have created sandbox account but that account is not verified . if am using live account so there is any issue?

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ habib commented ·

I don't understand what you are trying to ask. It doesn't appear to be related to your original question.

0 Likes 0 ·

Welcome to the
Clover Developer Community