#db-assi-subscriptions

1 messages · Page 1 of 1 (latest)

real glade
#

if you have a sub_xxx or subsched_xxx I can have a look

sacred yacht
#

ok, so basically I create a stripe customer 'stripe.customers.create' and then I create a subscription schedule 'stripe.subscriptionSchedules.create' (I'm using the API) So I should have an intermediate step that creates a subscription with a default payment method

real glade
#

or adds a payment method to the customer

#

it would be a lot easier if you had an example! Like at some level the customer has to have some payment method to charge, so presumably you do collect one from them? So most likely it's a small oversight and that collected method is not being charged as it's not the default

sacred yacht
#

yes, the user is flow is the following: user creates an account with us, then we create a user with that email in stripe, then we create a subscription schedule and finalize the invoice to generate a payment intent, the client secret it then passed onto the frontend that takes payment details, process payments... etc we have a webhook set up that triggers a successful subscription when payment is successful

real glade
#

can you share an example Subscription or SubscriptionSchedule ID so I can look at your logs?

#

sorry, the words help, but specific technical examples would be the fastest way to help you. You almost certainly just need to set a default_payment_method after processing the first payment but if I can see exactly what you're doing I can tell you exactly.

sacred yacht
#

I can share some from our test env

#

sub_KCd2L966X4ylll

real glade
#

thanks

#

so yeah here this customer doesn't have any saved payment methods (https://dashboard.stripe.com/test/customers/cus_KCd2ptjglsWsyQ) so future payments would fail. To clarify, how did you pay the previous invoices? Was it a custom payment page where you call confirmCardPayment using Elements, or our hosted invoice page?

But yeah this is a really annoying part of SubscriptionSchedules, they don't save the PaymentMethod by default

#

basically there's two approaches here :

sacred yacht
#

yes, I used confirmCardPayment using Elements

real glade
#
#

sorry, the developer experience of this part of the API is really quite poor, I'm sorry.