- This topic has 3 replies, 2 voices, and was last updated 1 day, 18 hours ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Stripe payment plugins for your WordPress site
· ·
Home › Forums › Stripe Payments Plugin › Auto-Renew subscription action/hook/callback?
Hello,
Is there a callback for when a subscription is auto-renewed in Stripe?
I am having an issue that my users in DB are not updated with the new freshly renewed subscription details (for example the new expire date – which I need to know in my App)
Action “asp_stripe_payment_completed” does not seem to be called.
Currently I need to renew/updated the subscriptions manually in my DB.
Any ideas? Thank you very much!
Best,
Marius
For the Stripe subscription charges (the recurring charges), there is an action hook for it. See the following section of our documentation:
Hello,
Thank you for your reply!
I am using the “asp_stripe_payment_completed” action/hook and it’s working for the first time an user purchases a subscription. But it seems when the subscription is renewed, the hook is not triggered as my DB is not updating. Is this action supposed to be triggered on renewal as well?
I will try to simulate a subscription renewal and retest my code meanwhile.
Best,
Marius
I’ve managed to do this using Stripe Webhooks and written my own webhook handler in my API. I’d say this is the best/cleanest method. I’m thinking of also moving the “asp_stripe_payment_completed” action I have in WP to Stripe Webhooks.