#khris22963

1 messages ยท Page 1 of 1 (latest)

steel stumpBOT
valid prairie
#

Hi there

#

You want to specify a trial period in this case

#

Otherwise you will still be creating an initial Invoice here

#

Which will involve a PaymentIntent

#

Not a SetupIntent

waxen nova
#

Ok, I seem to be getting a lot of conflicting advice today ๐Ÿ™‚

valid prairie
#

Ah well I'm sorry to hear that.

#

If you lay out your use-case I'd be happy to help ensure you are on the right track

waxen nova
#

thank you ๐Ÿ™‚

#

Ok, my client is a not-for-profit organisation. I host a website for my client who wants to collect online donations.

So a donor wants to set up a recurring gift... monthly, for example, so visits the page having logged in, specifies the monthly payment amount, and the future date on which the first payment is to be collected.

#

I want to present the donor with the Payments Element, collect payment details either card or BACS direct debit, and then record all the details server side for later reporting

valid prairie
#

Got it

#

Then yep you want to do as I noted. Since you want to trigger future payment you want to use a trial period.

#

You don't need to explicitly set a billing_cycle_anchor at all, you just let the trial handle that.

waxen nova
#

Ok.

#

So when I got this working for one-off payments, I created a Payment Intent, and used its client secret in the Options when I created the Payments element using stripe.js

valid prairie
#

Yep

waxen nova
#

is there still a client secret in the recurring case?

valid prairie
#

Yep when you set a trial the pending_setup_intent will no longer be null

waxen nova
#

ahhhhhhhhh

valid prairie
#

so you expand: pending_setup_intent

waxen nova
#

got it

valid prairie
#

Then grab its client_secret and pass it to the frontend

waxen nova
#

the secret piece of crucial information!!!!!!!!

valid prairie
#

๐Ÿ™‚

waxen nova
#

so how do I avoid any initial payment being taken?

valid prairie
#

Since it is on trial there will be no initial payment

waxen nova
#

Ah ok

valid prairie
#

That is the point of the trial

waxen nova
#

got it

#

sorry to be dumb

valid prairie
#

Np at all

#

A lot of different flows here

#

Can be quite confusing

waxen nova
#

I think my IQ is decreasing in proportion to the number of hours I spend in the documentation

valid prairie
#

lol

waxen nova
#

which at this point is considerable ( the number of hours that is, no longer my IQ ๐Ÿ™‚

#

Ok, many thanks, I'll give that a go

valid prairie
#

Well dang that is not how it is supposed to work!

#

If you do have feedback don't hesitate to let us know

#

We are always trying to improve our docs

waxen nova
#

They are amazing

valid prairie
#

But yeah there is a lot in there so I can totally understand how it can be overwhelming

waxen nova
#

But huge, and there always seems to be a crucial detail not spelled out for noobs like me

valid prairie
#

It definitely is a hard balance to figure out what the right amount of info is

#

Anywho if you ever do get stuck don't hesitate to pop in this channel

#

We are here 24/5

waxen nova
#

thank you so much for your time, I do appreciate it. I guess you have a real job to do as well, so that's double the appreciation

valid prairie
#

This is my real job ๐Ÿ™‚

#

But appreciate the kind words

waxen nova
#

gosh, how do you stay sane with all the numpties like me?

valid prairie
#

It is actually quite fun!

#

You are much farther along than most. Believe me ๐Ÿ˜‰

waxen nova
#

eek ๐Ÿ™‚

#

Ok, I'll try again. It is gradually starting to make sense

#

thank you again

valid prairie
#

Good luck!