#zerozero00_docs
1 messages ¡ Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- zeroes_paymentelement-googlepay, 4 days ago, 37 messages
- zeroes_paymentelement-update, 5 days ago, 20 messages
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1255306809510723584
đ Have more to share? Add details, code, screenshots, videos, etc. below.
i think i need to provide the account_id when create checkout session, is it correct?
If you're working with destination charges, you can use your platform's secret key and pass the connected account's ID as the value for payment_intent_data.transfer_data.destination: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-payment_intent_data-transfer_data
If you're working with direct charges, you'd pass the connected account's ID as the value for stripe_account when creating the Session, similar to this: https://docs.stripe.com/api/connected-accounts
session = Stripe::Checkout::Session.create({
line_items: [{
price_data: {
currency: 'gbp',
unit_amount: 1000,
product_data: {
name: 'Gold Plan'
}
},
quantity: 1,
}],
mode: 'payment',
success_url: domain + '?success=true',
cancel_url: domain + '?canceled=true',
{
stripe_account: 'acct_xxxxx'
}
})
for instance, this should work for direct charge, right?
Fromatting is a little off but that should work
session = Stripe::Checkout::Session.create({
line_items: [{
price_data: {
currency: 'gbp',
unit_amount: 1000,
product_data: {
name: 'Gold Plan'
}
},
quantity: 1,
}],
mode: 'payment',
success_url: domain + '?success=true',
cancel_url: domain + '?canceled=true'
},
{
stripe_account: 'acct_xxxxx'
}
)
oops, i see what you mean now. thanks so much
Sure thing!