#_kevinx
1 messages ยท Page 1 of 1 (latest)
It depends on how you'd like to integrate with Stripe.
It is conntect Standard account that we are using
then reading direct charges, which is recommendated for Standard account, it use paymentintent
https://stripe.com/docs/connect/direct-charges
For Connect Standard, you'd want to use Direct Charges. These are separated on what you're using to integrate with Stripe.
Stripe Checkout, https://stripe.com/docs/payments/checkout/how-checkout-works is a low code integration.
Payment Element requires more resources: https://stripe.com/docs/connect/enable-payment-acceptance-guide?platform=web&ui=payment-element#accept-payment but you can use either/ or
You need to decide which one you perefer to integrate with
Here are the codes comparison, notice both has stripe Account
const session = await stripe.checkout.sessions.create(
{
mode: "payment",
line_items: [
{
price: '{{PRICE_ID}}',
quantity: 1,
},
],
payment_intent_data: {
application_fee_amount: 123,
},
success_url: `${req.headers.origin}/account&success=true&session_id={CHECKOUT_SESSION_ID}`,
cancel_url: `${req.headers.origin}/?canceled=true`,
metadata: {
totalcharge: totalcharge,
},
},
{
stripeAccount: '{{CONNECTED_ACCOUNT_ID}}',
}
);
const paymentIntent = await stripe.paymentIntents.create(
{
amount: 1000,
currency: 'usd',
automatic_payment_methods: {
enabled: true,
},
},
{
stripeAccount: '{{CONNECTED_ACCOUNT_ID}}',
}
);
ok, I need a little bit help to understand Direct Charges (which is paymentintent) vs checkout. sesssion
Why the doc we got is different from the doc you just sent?
I do not understand your question. Are you asking me to provide the right document for each integration?
This, https://stripe.com/docs/payments/accept-a-payment is the document for our low code option of Stripe Checkout
This is the Payment Element documentation, https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
Ok,so what is your question? Where are you blocked?
so if using Checkout, should I use checkout.session then? now, I'm trying to pass some metadata in the checkout.session, but it didn't work, so I went through the documents, and find out for Standard Account, it needs to use paymentintent
just need to clarify, for using Stripe Checkout with Standard Account, should we use Checkout.session?
Are you trying to pass the metadata to the Pyament intent id?
If so, you can do that : https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-metadata by passing it in the payment_intent_data.
no, trying pass metadata in checkout.session
just need to clarify, for using Stripe Checkout with Standard Account, should we use Checkout.session?
Are you seeing an error when passing it https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-metadata here?
@lusty zodiac There's no "connection" between a type of connected accounts and whether to use Checkout
Whether to use Checkout or not is more a business decision based on the payment experience you want to offer. But it does work totally fine with Standard accounts yes