Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stripe Subscriptions error webhook #575

Open
hanstakeshi opened this issue Jul 11, 2018 · 3 comments
Open

Stripe Subscriptions error webhook #575

hanstakeshi opened this issue Jul 11, 2018 · 3 comments

Comments

@hanstakeshi
Copy link

hanstakeshi commented Jul 11, 2018

Issue Summary

We are getting a bit of trouble with the webhook called "invoice.payment_succeeded". All the subscriptions are created in the dashboard with the format "sub_DCXg.....", but the package make internal an id subscription with the format "sli_ABcDX..." (we dont know why).

In the function sync_invoice_items (pinax/stripe/actions/invoices.py), it is doing a comparation with invoice.subscription.stripe_id and item["id"] but they are different:
image

image
so in the else, it try to retrieve the subscription with the fields customer and the item id but it doesnt exist in my dashboard stripe panel raising an error:

image

image

@blueyed
Copy link
Contributor

blueyed commented Jul 12, 2018

Have you checked the event and EventProcessingException logs / entries to see where "sli_*" is coming from?

@hanstakeshi
Copy link
Author

hanstakeshi commented Jul 20, 2018

Hello blueyed, thank you for the answer.
i've been checked that error, and literally it show the same information.
image

We've already an account in Stripe for international payments using pinax-stripe(pinax-stripe==4.3.0), but it doesn't have any error in the webhook called invoice.payment_succeeded... (this Stripe account was created four years ago, and it's using webhook's version 2014, that's the unique diferente between this new Stripe account and the old Stripe account)

Greetings.

@k3oni
Copy link

k3oni commented Feb 17, 2019

The issue is due to the new stripe api version. Edit pinax/stripe/actions/invoices.py line 167 from item["id"] to item["subscription"] .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants