#gunwant_dev

1 messages · Page 1 of 1 (latest)

robust torrentBOT
fast field
#

Hello

restive wasp
fast field
#

I have expanded pending_setup_intent but its return null.

restive wasp
#

Can you share the subscription ID (sub_xxx)?

fast field
#

OKay

#

Here is subscription id: sub_1Lgre0SC8iVyWevSPQMTfeGk

#

Hello
I'm waiting for your reply.

restive wasp
#

I'm checking why pending_setup_intent is null

fast field
#

Okay

#

Take your time

forest oasis
#

Hi @fast field I'm taking over this thread

fast field
#

Okay

#

Did you get anithing?

forest oasis
#

Give me some time to catch up the history of conversations

fast field
#

Okay

forest oasis
#

Can you briefly tell me what you want to achieve here? you want to setup a subscription schedule and collect the payment method from your customer later?

#

So the easiest way to get started with subscription is to use Stripe Checkout, and Stripe will automatically take care of the e-mandate requirement for you.

fast field
#

Hello
I have used the stripe payment element.
So I want client_secret to mount the stripe payment element.
In my case, I have created a subscription schedule with a trail, How can I get client_secret this this case?

forest oasis
#

You can create a normal subscription with trial first without using subscription schedule(so that pending_setup_intent is returned), then create subscription schedule to cancel the subscription after 5 iterations.

#

Alternatively you can also create a SetupIntent upfront to collect the payment method first before creating a subscription or subscription schedule.

#

My personal recommendation is Stripe Checkout.

fast field
#

I have checked the normal subscription with the trial it's working.

#

But same case for subscription schedule its not working.

#

Thanks for the recommendation is Stripe Checkout.

#

But I want a solution for the subscription schedule with trial.

forest oasis
#

The only solution that I can of right now is to create a subscription with trial first, and use its pending_setup_intent to collect a payment method before creating the subscription schedule.

fast field
#

But as I said same case for subscription schedule its not working

forest oasis
#

if you use the above solution, you don't need to collect a payment method for subscription schedule anymore because you've already collected it with the pending_setup_intent in the 1st subscription.

fast field
#

Yes, You are right but in my case cancel the subscription after X payments so I have used the subscription schedule iteration(X payment) with trial

#

Is there any solution to get client_secrete ?

#

I have expand 'pending_setup_intent' but its return null value.

forest oasis
#

Are you expending the pending_setup_intent from a normal subscription (i.e., not from subscription schedule)?

fast field
#
 const scheduleData = {
            ****
            expand: [
                'subscription',
                'subscription.latest_invoice',
                'subscription.pending_setup_intent',
                'subscription.latest_invoice.payment_intent'
            ]
        };

await stripe.subscriptionSchedules.create(scheduleData, { stripeAccount: job.account_id });

#

Here is my code for subscription schedule.

forest oasis
#

Hmm, I thought I told you to use subscription first (e.g., not subscription schedule)?

fast field
#

Sorry, Maybe you are not understand my problem.

#

Thank you