#fr0smat1c

1 messages · Page 1 of 1 (latest)

brave pondBOT
empty ginkgo
#

👋 happy to help

weak egret
#

I can provide the parts of code if it helps

empty ginkgo
#

sorry for the delay

#

I'm not sure I understand what resubscribe means

#

would you mind elaborating?

weak egret
#

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

empty ginkgo
#

I'm not sure I follow

weak egret
#

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

empty ginkgo
#

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

weak egret
#

What difference between confirmCardPayment and confirmPayment?

empty ginkgo
#

confirmCardPayment means that you already collected the Card PM whereas confirmPayment needs a PM to be passed

weak egret
#

In our case, the user first adds a card and then pays with it, so maybe confirmCardPayment works for us after all?

empty ginkgo
#

I think you need to review your integration workflow

#

read this guide