#rasparac-Subscription

1 messages · Page 1 of 1 (latest)

carmine salmon
#

You should still able to use the method above, when an event invoice.payment_succeeded arrives on a real payment (not trial one)

digital wave
#

yep, but do i need to set default payment before trial ends?
how user will be charged when trial ends?

carmine salmon
#

When trial_end is approaching, you will receive a invoice.created event. You would want to collect your customer Payment around that time

digital wave
#

is there an easier way? We have also subscriptions without trial and those will get invoice.created.
Can i use single event to set payment method for subscriptions with trial and without trial?

#

Can i use fore example,
setup_intent.succeeded for tiral and payment_intent.succeeded without trial?

carmine salmon
#

I believe invoice.created is fired in both cases, no?

digital wave
#

yes, it's fired in both cases.
but i'm already listen for payment_intent and setup_intent succeeded and if i can use those two events i would use them.

raw furnace
#

Hey there! Taking over from @carmine salmon – just catching up

digital wave
#

oke :). If something is not clear i can explain.

raw furnace
#

For a Subscription where there is no immediate payment (i.e. a trial) then there will be a Setup Intent to authorise the payment method for the off-session payments. So you should see setup_intent.succeeded events yes

digital wave
#

nice. When that happens i can set default payment for the subscription. And when trials end i will get payment_intent.succeeded for new invoice which will be generated the start of billing period? In that case i will again update payment method? Can something go wrong if i update update subscription payment method two times with same payment_method id?
I'm asking this because users are also able to buy subscription without trial which will fire payment_intent.succeeded event and plan is to set payment method for the users who bought subscriptions without trial.

#

sorry for this questions but we wanna make sure that everything is ok with payments.

raw furnace
#

In that case i will again update payment method? Can something go wrong if i update update subscription payment method two times with same payment_method id?
I don't think anything will go wrong, the API may just error. You should be able to test this out

#

Otherwise just write logic in your application to check if the default_payment_method field is set on the Subscription

digital wave
#

why asking this is because in some cases stripe dashboard does not show payment method when i go to customers and list all the customers.
Is that because i did not set default payment method?

raw furnace
#

If there's no payment methods listed on a Customer object then it sounds like they weren't attached. Do you have an example?

digital wave
#

what example?
i do not attach payment method customer.
Flow is this:

  • create customer
  • create subscription
  • insert credit card details and confirm subscription
#

i can see in dashboard that subscription has payment method, but it's not listed in customer object list

#

Do i need to also attach payment method to the customer?

raw furnace
digital wave
#

is this the problem, we do not send anything

#

we want to attach payment method to the customer and not worry about that, later users can update that in billing portal

raw furnace
#

No, that's taken care of via the initial Setup Intent/Payment Intent. There's no problem per se. The subscription will be renewed using the payment method set on that object

raw furnace
digital wave
#

Ok, that's nice. Only thing that i need to to is attach payment method to the customer.