#davethecust

1 messages · Page 1 of 1 (latest)

inland forumBOT
grizzled pier
#

Hello! Typically when a Customer has an incomplete Subscription you would have them attempt to pay that Subscription's Invoice instead of creating another Subscription for them.

calm grail
#

using stripe node library these are the arguments i'm passing into subscription create

        customer: customerID,
        off_session: true,
        items: [
          {
            price,
          },
        ],
        trial_period_days: 0,
        payment_behavior: "default_incomplete",
      });
#

hmmm

#

so we'd need to bring back the existing subscription and force an invoice payment?

grizzled pier
#

I would say attempt instead of force, but yeah. 🙂

calm grail
#

hehe i hear ya

#

do you mind pointing me to some examples of this?

grizzled pier
#

What do you mean?

calm grail
#

i am not sure i am following how to trigger an invoice for an existing canceled subscription

#

or even what resource would be called to make this happen

grizzled pier
#

Are you doing client-side confirmation?

calm grail
#

we use stripe elements to process the initial payment for the subscription

#

and then create a subscription on the backend

#

i can share with you some customerids or something if it's helpful

grizzled pier
#

Okay, so every Subscription creates Invoices, and every Invoice creates a Payment Intent. You can confirm that Payment Intent like any other.

#

So if you're using Stripe Elements, you can pass the Payment Intent's client secret to your frontend and have them pay/confirm it to get the Subscription going.

calm grail
#

ohhh

#

ok ok i think it's becoming more clear to me

#

so i need to grab the invoice and actually confirm it at the time of subscription creation NOT at the setup intent time or do i have that backwards?

grizzled pier
#

It sounds like you might be creating a standalone Payment Intent now, taking payment, then creating a Subscription after that?

#

Is that correct?

calm grail
#

i think that's correct but instead of payment intent i believe i am creating a setup intent

grizzled pier
#

Yeah, that's not correct. Do people pay up front for your Subscriptions or is there a trial period?

calm grail
#

there's a trial period

#

unless they are returning users i.e. they cancel and come back, they should be charged immediately

grizzled pier
#

So create the Subscription first, then confirm that pending_setup_intent to set up their payment info for use when the trial is over.

#

Or, if you're taking an initial payment, confirm the Payment Intent associated with the Subscription's Invoice.

calm grail
#

reading

#

it sounds like what i need is the latter

#

alright let me try this

#

thank you for the help, it's much appreciated