#akram.alsaidi
1 messages · Page 1 of 1 (latest)
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?
Are you following a guide or tutorial? Can you link me to it?
i am using payment element but i want to remove it and we need to use Create a Session
this backend
When you create a Checkout Session it has a url property. Send your customer to that URL for them to go through Checkout.
it was working
just the user can type what and how much can pay and then pay
one time
Okay, so right now you're using a recurring Price, which will create a Subscription and a recurring payment. If you want people to specify what they're donating you should follow this guide: https://stripe.com/docs/payments/checkout/pay-what-you-want
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.
That's not something I can help with. We can only help with technical questions here. If you have questions about that you need to talk to Stripe support: https://support.stripe.com/contact/email
just now need to create price dynamic ?
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!
and about to type any mount to pay ? what the param can use to add input ti add mount as what i want
Please give it a try.
ok
ww need to create product also ?
Yes.
Yep, that's the part that creates a Product.
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.
Do you have a question about that?
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 ?
What type of connected accounts are you using? Standard? Express?
Standard
You can use this approach to create the Checkout Session on a connected account: https://stripe.com/docs/connect/authentication
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
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.
So i need to remove this
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.
Yes, you need to specify that if you want the donation to go to the connected account.
I am confuse
What are you confused about?
about how can send mony paid under each account it has stipe account connected
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.
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
You need to add the stripe_account parameter when you create the Checkout Session.
by this ?
That was for creating a Payment Intent, so no.
Show me your current Checkout Session creation code.
this one
There's no stripe_account specified here.
Yeah, give that a try and see what happens.
The first argument is the array containing the API parameters, then a comma, then the second array containing the stripe_account header info.
No, in a separate array after that array.
ok
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.
Does that work?
need this this to work
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.
add here ?
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?
just now we need to create price when create an account ?
Yeah, you could do it at that point.
just confirm please add price as a param with create account or create new price by api price ?
It's not part of creating the account. You create the account, then separately you create a Price on that account.
No.
how can pass the price to a account ?
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.
Yes, when you create the Price, so you create it on the connected account and not your platform.
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
just 2 min please
We're getting ready to close Discord for a while, do you have any final questions before I leave?
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.
The top one.
What's your question?
this account id
What do you see when you click on the ••• button you circled in your screenshot?
Right. So what's your question?
the price id include with account id ?
Did you go through Checkout and pay successfully?
kust empty now
ok thanks if you close now imll try by my self and if i have any qestion i,ll ask tomorow
Sounds good. Make sure you go through the Checkout page and pay successfully.