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

current_period_end update problem #580

Open
Nimo11 opened this issue Nov 9, 2023 · 2 comments
Open

current_period_end update problem #580

Nimo11 opened this issue Nov 9, 2023 · 2 comments
Labels

Comments

@Nimo11
Copy link

Nimo11 commented Nov 9, 2023

Bug report

The current_period_end is not updated in subscription after free period and may be after renewal

Describe the bug

We use your stripe gateway to manage subscriptions. We have opted for a free period of 14 days before the first billing.

After this period has passed, the stripe webhook transmits an update to the extension containing the new corrected end date and a new payment.
In the firebase logs only the creation of the payment is present and the subscription update is not carried out

Stripe webhook logs:

Le paiement de la facture de [email protected] d'un montant de 0,00 € a été effectué evt_x 08/11/2023 20:11:30
La facture de [email protected] d'un montant de 0,00 € a été payée evt_x 08/11/2023 20:11:30
Un brouillon de facture de 0,00 € a été finalisé pour [email protected] evt_x 08/11/2023 20:11:30
La facture de [email protected] a été modifiée evt_x 08/11/2023 20:11:30
**L'abonnement de [email protected] a été modifié evt_y 08/11/2023 19:07:41**
Un brouillon de facture a été créé evt_x 08/11/2023 19:07:41

Firebase extension webhook logs for event evt_y 08/11/2023 19:07:41

{
  "object": {
    "id": "sub_xx",
    "object": "subscription",
    "application": null,
    "application_fee_percent": null,
    "automatic_tax": {
      "enabled": false
    },
    "billing_cycle_anchor": 1699466767,
    "billing_thresholds": null,
    "cancel_at": null,
    "cancel_at_period_end": false,
    "canceled_at": null,
    "cancellation_details": {
      "comment": null,
      "feedback": null,
      "reason": null
    },
    "collection_method": "charge_automatically",
    "created": 1698257167,
    "currency": "eur",
    **"current_period_end": 1731089167,**
    "current_period_start": 1699466767,
    "customer": "cus_xxxxx",
    "days_until_due": null,

To Reproduce

see description

Expected behavior

current_period_end updated

@Nimo11
Copy link
Author

Nimo11 commented Jan 15, 2024

Could you help us please this is a blocking problem

@Nimo11
Copy link
Author

Nimo11 commented Feb 9, 2024

After search i discover that some needed events in the webhook stripe interface wasn t checked :

customer.subscription.created
customer.subscription.resumed
customer.subscription.paused
customer.subscription.deleted
customer.subscription.updated

This solved my problem. thank you for your work

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

No branches or pull requests

2 participants