Debug app to show different billing_reason on invoice events with Stripe API version 2018-10-31
Relates to dj-stripe/dj-stripe#758
Installation:
- (recommended) create a new python virtualenv (tested with python 2.7 and 3.6)
- pip install -r requirements.txt
Example:
- Start app with:
STRIPE_API_KEY=sk_test_YOURSECRETKEY python app.py
- Create a webhook on stripe dashboard pointing at local 127.0.0.1:5000/stripe/webhook/ (eg via an ngrok tunnel)
- Create a subscription via the stripe dashboard
- Observe logging in console - billing_reason is different for a given event id when recieved as a webhook vs retrieving the same event from the API.