Calculate order total different than create order total

I use the calculateOrder API to calculate the amount to charge the credit card, and then use that sum for create order
I got a weird case where the calculated totals do not match
One item had no taxes and another had 13%.
The calculate order returned correct amount, submit order and weebly applied taxes to both items.

example:
This is the result from calculate order → $12.23
Weebly and create order expect → $12.66 (I guess it also applied 13% to the first item (why?) )
Since I send "autoApplyTaxes": true, shouldn’t calculate order return the same amount as the others?

2022-06-28T11:03:44.575Z	09043249-ff35-4c42-b7bc-7c4f1ec32b94	INFO	2022-06-28 11:03:44,575 DEBUG [service] Calculated square order is: {
    "order": {
        "locationId": "L83WZEPK92V0X",
        "referenceId": "916e9314-0b20-4435-8bd1-6450ea42e9e8",
        "source": {
            "name": "XXX"
        },
        "customerId": "XXX",
        "lineItems": [
            {
                "uid": "916e9314-0b20-4435-8bd1-0",
                "name": "XXX",
                "quantity": "1",
                "catalogObjectId": "AFENX4S2NFVFCZ7I6DNO7SHJ",
                "catalogVersion": 1656382969533,
                "variationName": "16oz",
                "itemType": "ITEM",
                "modifiers": [
                    {
                        "uid": "qZuch7mOrhLnb67yvgJnO",
                        "catalogObjectId": "ANVKNJMTOG7KV4IPJ3MHUV52",
                        "catalogVersion": 1656382969533,
                        "name": "No Creamer (Black)",
                        "quantity": "1",
                        "basePriceMoney": {
                            "amount": 0,
                            "currency": "CAD"
                        },
                        "totalPriceMoney": {
                            "amount": 0,
                            "currency": "CAD"
                        }
                    },
                    {
                        "uid": "wpryT68kXq7gexVDXrDOUB",
                        "catalogObjectId": "QNPQLRBV7QP2P4DQ4JAMJ27Z",
                        "catalogVersion": 1656382969533,
                        "name": "No Sugar",
                        "quantity": "1",
                        "basePriceMoney": {
                            "amount": 0,
                            "currency": "CAD"
                        },
                        "totalPriceMoney": {
                            "amount": 0,
                            "currency": "CAD"
                        }
                    },
                    {
                        "uid": "woslV6QhV6sOa2v50dGpmB",
                        "catalogObjectId": "OYPS2536SJE54XRHYEMGKUYF",
                        "catalogVersion": 1656382969533,
                        "name": "None",
                        "quantity": "1",
                        "basePriceMoney": {
                            "amount": 0,
                            "currency": "CAD"
                        },
                        "totalPriceMoney": {
                            "amount": 0,
                            "currency": "CAD"
                        }
                    }
                ],
                "basePriceMoney": {
                    "amount": 325,
                    "currency": "CAD"
                },
                "variationTotalPriceMoney": {
                    "amount": 325,
                    "currency": "CAD"
                },
                "grossSalesMoney": {
                    "amount": 325,
                    "currency": "CAD"
                },
                "totalTaxMoney": {
                    "amount": 0,
                    "currency": "CAD"
                },
                "totalDiscountMoney": {
                    "amount": 0,
                    "currency": "CAD"
                },
                "totalMoney": {
                    "amount": 325,
                    "currency": "CAD"
                }
            },
            {
                "uid": "916e9314-0b20-4435-8bd1-1",
                "name": "XXX Sandwich",
                "quantity": "1",
                "catalogObjectId": "DBTSHQ7NUKIDSIPOSJIW7E6T",
                "catalogVersion": 1656382969533,
                "variationName": "Regular",
                "itemType": "ITEM",
                "appliedTaxes": [
                    {
                        "uid": "qT8D2Ta5ohTBEil7pO7Ky",
                        "taxUid": "TXGHnFvpcjYM7EExZdRalB",
                        "appliedMoney": {
                            "amount": 103,
                            "currency": "CAD"
                        }
                    }
                ],
                "basePriceMoney": {
                    "amount": 795,
                    "currency": "CAD"
                },
                "variationTotalPriceMoney": {
                    "amount": 795,
                    "currency": "CAD"
                },
                "grossSalesMoney": {
                    "amount": 795,
                    "currency": "CAD"
                },
                "totalTaxMoney": {
                    "amount": 103,
                    "currency": "CAD"
                },
                "totalDiscountMoney": {
                    "amount": 0,
                    "currency": "CAD"
                },
                "totalMoney": {
                    "amount": 898,
                    "currency": "CAD"
                }
            }
        ],
        "taxes": [
            {
                "uid": "TXGHnFvpcjYM7EExZdRalB",
                "catalogObjectId": "A6AOVPBRCXMQQQWIARNSNTU2",
                "catalogVersion": 1592824635652,
                "name": "HST",
                "type": "ADDITIVE",
                "percentage": "13.0",
                "appliedMoney": {
                    "amount": 103,
                    "currency": "CAD"
                },
                "scope": "LINE_ITEM",
                "autoApplied": true
            }
        ],
        "netAmounts": {
            "totalMoney": {
                "amount": 1223,
                "currency": "CAD"
            },
            "taxMoney": {
                "amount": 103,
                "currency": "CAD"
            },
            "discountMoney": {
                "amount": 0,
                "currency": "CAD"
            },
            "tipMoney": {
                "amount": 0,
                "currency": "CAD"
            },
            "serviceChargeMoney": {
                "amount": 0,
                "currency": "CAD"
            }
        },
        "createdAt": "2022-06-28T11:03:44.131Z",
        "updatedAt": "2022-06-28T11:03:44.131Z",
        "state": "OPEN",
        "version": 1,
        "totalMoney": {
            "amount": 1223,
            "currency": "CAD"
        },
        "totalTaxMoney": {
            "amount": 103,
            "currency": "CAD"
        },
        "totalDiscountMoney": {
            "amount": 0,
            "currency": "CAD"
        },
        "totalTipMoney": {
            "amount": 0,
            "currency": "CAD"
        },
        "totalServiceChargeMoney": {
            "amount": 0,
            "currency": "CAD"
        },
        "pricingOptions": {
            "autoApplyDiscounts": true,
            "autoApplyTaxes": true
        }
    }
}

:wave: I’m a bit confused. How was CalculateOrder used with a Weebly payment? If you CalculateOrder then CreateOrder your custom integration will pass the order_id to the CreatePayment request. Also do you have the Weebly payment_id that you’re comparing the calculation to? :slightly_smiling_face:

it is not used, I was just saying that the calculated price is different, calculate order returns the correct price, create order and weebly not
you can go to https://webstore.fleetscoffee.com/s/order?location=11eb0670776faf70a1570cc47a2b63ac and order a coffee at about $3 . Because it is less than $4 it has no taxes configured, but weebly still adds the 13% tax. The same with create order, if "autoApplyTaxes": true then it will add it, even if I have not added any taxes to that item.
The problem with payment is that if I use google pay I get a nonce for an exact amount (the one returned by calculate order) but when I call create order with that nonce, it fails, because create order calculates the a wrong price and it does not match the price from the nonce