0

Trying to setup dynamic tax calcuation using Stripe Orders API. Using these docs:

https://stripe.com/docs/orders

https://stripe.com/docs/orders/dynamic-shipping-taxes

enter image description here

    result = {
    "order_update": {
        "items": [
            {
                "parent": None,
                "type": "tax",
                "description": "Sales taxes",
                "amount": 100,
                "currency": "usd"
            }
        ],
        "shipping_methods": [
            {
                "id": "free_shipping",
                "description": "Free 7-day shipping",
                "amount": 0,
                "currency": "usd",
                "delivery_estimate": {
                    "type": "exact",
                    "date": "2020-08-11"
                },
                "tax_items": []
            }
        ]
    }
}
print(result)
return Response(result, status=status.HTTP_200_OK)

Even dummy response without any sophisticated computations failed to create an order object with HTTP 402 error for script trying to create Order Creating order with no tax specified works as well and allows to create order.

Webservice running a callback receives a request from the Stripe as it must and works as well.

Stripe support says only "we no longer recommend developing your integration around this system" and does not answer directy if they turn off this feature. If they turn off this feature I do not understand why it is available in the dashboard.

  • 1
    The feature does still work(but you 100% should not be writing new code today to use it, Stripe actively recommends against it). You should contact Stripe support again and give the specific request ID req_xxx of the failed API request to /v1/orders and ask them to look at the internal logs for it. Usually this means there is _something_ wrong in your server's response but I think this legacy API doesn't make it easy to see. – karllekko Aug 07 '20 at 09:27

1 Answers1

0

The issue was in the middleware of my service. It transformed response keys from snake_case to camelCase. Resolved.