• Resolved frontporchweb

    (@frontporchweb)


    [UNPROCESSABLE_ENTITY] The requested action could not be performed, semantically incorrect, or failed business validation. https://developer.paypal.com/docs/api/orders/v2/#error-TAX_TOTAL_MISMATCH

    We are consistently seeing this error during checkout under the following scenario: customer applies a COUPON CODE, is from the state of Minnesota (the only state that we charge sales tax), and clicks the Paypal button.

    We turned on logging and found that the tax amount that is being sent to Paypal is calculated based on the non-discounted amount (before the coupon code). It should be calculating 6.875% tax based on the discounted amount. The tax that is shown on the checkout page is correct, but it’s what is getting passed through the API that is incorrect.

    Here is a snippet from the log. Discounted price in cart is $75, so the tax amount should be $5.16, but it shows as $6.54 below.

    `Response Body: {“name”:”UNPROCESSABLE_ENTITY”,”details”:[{“field”:”/purchase_units/@reference_id==’default’/amount/breakdown/tax_total/value”,”value”:”6.54″,”issue”:”TAX_TOTAL_MISMATCH”,”description”:”Should equal sum of (tax * quantity) across all items for a given purchase_unit”}],”message”:”The requested action could not be performed, semantically incorrect, or failed business validation.”,”debug_id”:”4ca2b902ef255″,”links”:[{“href”:”https://developer.paypal.com/docs/api/orders/v2/#error-TAX_TOTAL_MISMATCH”,”rel”:”information_link”,”method”:”GET”}]}

    2021-10-04T22:52:28+00:00 WARNING Failed to create order. PayPal API response: [UNPROCESSABLE_ENTITY] The requested action could not be performed, semantically incorrect, or failed business validation. https://developer.paypal.com/docs/api/orders/v2/#error-TAX_TOTAL_MISMATCH
    2021-10-04T22:52:28+00:00 ERROR Order creation failed: [UNPROCESSABLE_ENTITY] The requested action could not be performed, semantically incorrect, or failed business validation. https://developer.paypal.com/docs/api/orders/v2/#error-TAX_TOTAL_MISMATCH
    2021-10-04T22:52:33+00:00 DEBUG POST https://api.paypal.com/v2/checkout/orders
    Request Body: {“intent”:”CAPTURE”,”purchase_units”:[{“reference_id”:”default”,”amount”:{“currency_code”:”USD”,”value”:”80.16″,”breakdown”:{“item_total”:{“currency_code”:”USD”,”value”:”95.00″},”shipping”:{“currency_code”:”USD”,”value”:”0.00″},”tax_total”:{“currency_code”:”USD”,”value”:”6.54″},”discount”:{“currency_code”:”USD”,”value”:”21.38″}}},”description”:””,”items”:[{“name”:”Roman Catholic eCourse”,”unit_amount”:{“currency_code”:”USD”,”value”:”95.00″},”quantity”:1,”description”:”WHAT\u2019S INCLUDED IN THE CATHOLIC eCOURSE?\r\nAfter you purchase the Catholic eCourse, you\u2019ll receive a login code that will make i”,”sku”:””,”category”:”PHYSICAL_GOODS”,”tax”:{“currency_code”:”USD”,”value”:”6.53″}}],”payee”:{“merchant_id”:”6JK8WQVDVEHD4″},”shipping”:{“name”:{“full_name”:”Test Test”},”address”:{“country_code”:”US”,”address_line_1″:”xxxxxx”,”address_line_2″:””,”admin_area_1″:”MN”,”admin_area_2″:”xxx”,”postal_code”:”xxx”}}}],”application_context”:{“user_action”:”CONTINUE”,”shipping_preference”:”GET_FROM_FILE”,”landing_page”:”BILLING”,”locale”:”en-US”,”brand_name”:”Online Marriage Preparation”,”return_url”:”https:\/\/onlinemarriagepreparation.com\/?wc-ajax=ppc-return-url”,”cancel_url”:”https:\/\/onlinemarriagepreparation.com\/checkout-2\/”},”payment_method”:{“payee_preferred”:”IMMEDIATE_PAYMENT_REQUIRED”,”payer_selected”:”PAYPAL”}}
    Response Debug ID: 4a98cfc08e92e
    Response: Array
    (
    [code] => 422
    [message] => Unprocessable Entity
    )

    Any help is GREATLY APPRECIATED!

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Error: [UNPROCESSABLE_ENTITY] TAX_TOTAL_MISMATCH’ is closed to new replies.