#paly
1 messages · Page 1 of 1 (latest)
Hi
When using Standard Account, the recommendation is to use Direct Charge:
https://stripe.com/docs/connect/direct-charges
So you can create a Checkout Session with existing prices:
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items
You need to use Stripe Auth Header in order to make direct charges:
https://stripe.com/docs/connect/authentication#stripe-account-header
Hi @rugged inlet Thanks for the reply. Can I create a paymelink link using checkout Session?
Hi! I'm taking over this thread.
If you create a Payment Link, every time a user click on the link Stripe will automatically create a Checkout Session.
Sorry, I am confused
Which part exactly? Can you clarify what you are trying to do?
ok let me repeat that
I want to use stripe connect standard account to make the transaction with some application fees, But I need to create a payment link to open in a new tab on browser (as I am using iframe widget)
and each transaction will have no such product or price because each transaction has different amount or currency
each transaction has different amount or currency
Then you shouldn't use Payment Links for this, but Checkout Session.
but I cannot use the checkout session because it's in i frame
can I create a payment link from checkout session or get the payment link using checkout session?
Okay let's take a step back:
- If you want customers to be redirected to a Stripe URL to pay (so not in a iframe), use Payment Link or Checkout Session (these are two different products)
- If you want customers to pay directly on your website, use Payment Element
In your case, since you mentioned "each transaction has different amount or currency", you can't use Payment Links. So it should either be Checkout Session or Payment Element.
So which one do you want to use? Checkout Session or Payment Element?
I can use any of them I do not have any issues until it's meeting my requirements which is
- I can send a link or session from the backend and user will have the option to pay using the link
I cannot embedd stripe elements in iframe and technically it's not meeting the requirements
I'm not sure I understand your requirements, but Checkout Session should work, no?
- Create a Checkout Session
- You get back a URL
- Redirect users to that URL so they can pay
You can learn more about Checkout Session here: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=checkout
ok understood but for every checkout session I have to create a priceID and productID . right?
because each transaction has a different amount and there is no product associated with it. It's a one time payment
ok understood but for every checkout session I have to create a priceID and productID . right?
No you don't have to, you could useline_items.price_datainstead: https://stripe.com/docs/api/checkout/sessions/create?lang=node#create_checkout_session-line_items-price_data
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
- Either you use a Price object, like
line_items: { price: "price_xxx"} - Or you don't use a Price object and directly set the price, like
line_items: { price_data: { amount: 1000, currency: "usd", ... } }