#akram.alsaidi

1 messages · Page 1 of 1 (latest)

jade hillBOT
thin kernel
#

Hello! stripe.redirectToCheckout is deprecated and we don't recommend you use it at all. Can you tell me more about what you're trying to build?

muted kindle
#

we are need for each customer to pay amount for donations

#

press on the buton to go

thin kernel
#

Are you following a guide or tutorial? Can you link me to it?

muted kindle
#

i am using payment element but i want to remove it and we need to use Create a Session

#

this backend

thin kernel
#

When you create a Checkout Session it has a url property. Send your customer to that URL for them to go through Checkout.

muted kindle
#

it was working

thin kernel
#

Do not use stripe.redirectToCheckout.

muted kindle
#

how we can remove price ?

#

because this is donations

thin kernel
#

Are you trying to do recurring donations?

#

Or one-time donations?

muted kindle
#

just the user can type what and how much can pay and then pay

muted kindle
thin kernel
muted kindle
#

this ?

#

and this ?

thin kernel
#

Yes. That first part will create a Price where your customer specifies what they want to pay. The last part is where you create a Checkout Session using the Price you create.

#

You only need to create the Price once.

#

Then you create Checkout Sessions using that Price for each customer/transaction.

muted kindle
#

Hmm understood now

#

and this ?

thin kernel
muted kindle
thin kernel
#

Give it a try, see if it works the way you expect, and if you have questions about it once you've tried it let me know!

muted kindle
#

and about to type any mount to pay ? what the param can use to add input ti add mount as what i want

thin kernel
#

Please give it a try.

muted kindle
#

ok

muted kindle
thin kernel
#

Yes.

muted kindle
thin kernel
#

Yep, that's the part that creates a Product.

muted kindle
thin kernel
#

You shouldn't create a new Product and Price every time.

#

You create a Product and Price once.

#

You then use the Price over and over again for each Checkout Session.

muted kindle
thin kernel
#

Do you have a question about that?

muted kindle
#

now the url here

#

all good now

#

have one qustion

#

about this donation will be to pay on stripe connected id

#

so we can add param stripe_account ?

thin kernel
#

What type of connected accounts are you using? Standard? Express?

muted kindle
#

Standard

thin kernel
muted kindle
#

I am useing this

#

but with this we can not to add input to add any mount as what i want and can not add input for eamil user with payment form

thin kernel
#

You should not be creating Payment Intents if you're using Checkout.

#

Checkout will create the Payment Intent for you.

#

You don't need to do it yourself.

muted kindle
thin kernel
#

Yes, probably.

#

All you need to do is create a Checkout Session with the correct parameters and then send the person donating to the url.

#

That's it.

muted kindle
#

and what about stripe_account id connected ?

#

how can i pay for him

thin kernel
#

Yes, you need to specify that if you want the donation to go to the connected account.

muted kindle
#

How ?

#

i need param to do it

muted kindle
#

I am confuse

thin kernel
#

What are you confused about?

muted kindle
muted kindle
thin kernel
#

That's an example that shows you how to specify the connected account ID when making an API request. You need to use that technique when you create a Checkout Session.

muted kindle
#

the first step is good Checkout Session

#

Checkout Session with correct param has been done and now about paid under each account has stripe account

thin kernel
#

You need to add the stripe_account parameter when you create the Checkout Session.

muted kindle
thin kernel
#

That was for creating a Payment Intent, so no.

#

Show me your current Checkout Session creation code.

muted kindle
#

this one

thin kernel
#

There's no stripe_account specified here.

muted kindle
#

like this ?

thin kernel
#

You put it in the wrong place.

#

Needs to go under mode.

muted kindle
#

ok

thin kernel
#

Yeah, give that a try and see what happens.

muted kindle
thin kernel
#

Oh, your brackets are nested wrong...

#

It needs to come after the last ] there.

muted kindle
thin kernel
#

The first argument is the array containing the API parameters, then a comma, then the second array containing the stripe_account header info.

muted kindle
thin kernel
#

No, in a separate array after that array.

muted kindle
#

ok

thin kernel
#

create([ <API params> ], [ <header params> ])

#

And, again, you shouldn't be creating a new Price every time.

#

You need to create the Price once. Once ever. You then reuse the Price ID over and over again.

muted kindle
thin kernel
#

Does that work?

thin kernel
#

You need to create the Price on the connected account too.

#

The Price you're creating there exists on your platform account, not on the connected account.

muted kindle
#

add here ?

thin kernel
#

You need to create the Price on the connected account (once) then use it over and over again for Checkout Sessions on that connected account.

#

That's the code to create the connected account. What about it?

muted kindle
#

just now we need to create price when create an account ?

thin kernel
#

Yeah, you could do it at that point.

muted kindle
#

just confirm please add price as a param with create account or create new price by api price ?

thin kernel
#

It's not part of creating the account. You create the account, then separately you create a Price on that account.

muted kindle
thin kernel
#

No.

muted kindle
#

how can pass the price to a account ?

thin kernel
#

That creates the Price on your platform before you create the account. You need to create the account first, then create teh Price on that account, not on your platform account.

muted kindle
#

Hmm now i understood

#

i,ll try

#

the we can add strip_account as header ?

thin kernel
#

Yes, when you create the Price, so you create it on the connected account and not your platform.

muted kindle
thin kernel
#

Does that help?

muted kindle
#

yes price onec time now just when create an account

#

and after that we need retrieve price id depending on stripe_account when make checkout

thin kernel
#

Yep!

#

I recommend storing the connected account IDs and Price IDs on your end.

muted kindle
#

just 2 min please

thin kernel
#

We're getting ready to close Discord for a while, do you have any final questions before I leave?

muted kindle
#

I,ve created account with price

#

where can i see the price please

thin kernel
#

You can view the Dashboard as that account.

#

Click on the account, then click on the ••• button in the top right.

#

Then go to the payments section.

muted kindle
thin kernel
#

The top one.

muted kindle
#

acct_1NukyvCiqS0MFAcY

thin kernel
#

What's your question?

muted kindle
#

this account id

thin kernel
#

What do you see when you click on the ••• button you circled in your screenshot?

muted kindle
thin kernel
#

Right. So what's your question?

muted kindle
#

the price id include with account id ?

thin kernel
muted kindle
thin kernel
#

Did you go through Checkout and pay successfully?

muted kindle
#

kust empty now

#

ok thanks if you close now imll try by my self and if i have any qestion i,ll ask tomorow

thin kernel
#

Sounds good. Make sure you go through the Checkout page and pay successfully.