#fr0smat1c
1 messages · Page 1 of 1 (latest)
👋 happy to help
I can provide the parts of code if it helps
sorry for the delay
I'm not sure I understand what resubscribe means
would you mind elaborating?
In our case it is something like that
if (startsAt) {
stripeSubscriptionPayload.trial_end = Math.ceil(DateTime.fromJSDate(startsAt).toMillis() / 1000);
}
return this.stripeSubscriptionsService.createSubscription(stripeSubscriptionPayload);
In our case, resubscribing is simply creating a subscription using the trial_end field
I'm not sure I follow
When creating a subscription using the trial_end field and using a card that requires 3dsecure, the server returns clientSecret. When I use the confirmCardPayment method with this clientSecret, nothing happens.
const { error, paymentIntent, ...rest } = await stripe.confirmCardPayment(
data.clientSecret,
);
// nothing returns from stripe.confirmCardPayment in this case on FE side
if there's a trial on the subscription
then there won't be any latest_invoice.payment_intent.client_secret
instead you should use pending_setup_intent.client_secret and on the frontend use the confirmSetup
and in all cases you should use confirmPayment and not confirmCardPayment
What difference between confirmCardPayment and confirmPayment?
confirmCardPayment means that you already collected the Card PM whereas confirmPayment needs a PM to be passed
In our case, the user first adds a card and then pays with it, so maybe confirmCardPayment works for us after all?