#mtanzi

1 messages · Page 1 of 1 (latest)

hoary wadiBOT
rotund bronze
#

HI there!

#

Can you try to summarize your question in this new thread?

crimson parrot
#

Hey Soma, yes let me do a quick summary!

#

We have a subscription based product, we initialize the subscription using the checkout session and then the customer can cancel and the subscription will end at the end of the billing period.

on top of that we have extra products that are charged by metering, at the end of the billing period if they exceed the allowance given we charge the overages, that works great within the subscription lifecycle.

The issue we have is when a subscription is cancelled... when the customer.subscription.deleted event is sent by Stripe, we listen to it and we calculate the final overage, then we create a one-off invoice (since the subscription is already terminated) for the customer to pay the overage of the last period.

The issue I found is that the payment method associated to the payment_intent is set to none even if the customer has a valid CC associated

#

If you need I can give you a PI id so that you can take a look

rotund bronze
#

If not, it's expected that the invoice will have no payment method.

crimson parrot
#

the customer enter the payment method during the checkout session

#

isn't that set as a default payment method?

rotund bronze
#

Can you share the customer ID (cus_xxx)?

crimson parrot
#

sure.. here is an example cus_MWUQsCIJDYYzQf

lost spear
#

Hey! Taking over for my colleague. Let me catch up.

crimson parrot
#

sure!

lost spear
#

Sorry for keeping you waiting

crimson parrot
#

this would need to be done always after the checkout session is completed?

#

can it not be set as a default action after the checkout session (ex. settings passed to the checkout session)

lost spear
#

Let me do a test to confirm this for you, five me couple of minutes please

#

So yeah, you need to update the customer settings and set the payment method as default via dashboard or by the use of API