#melvin-mlc_api

1 messages ยท Page 1 of 1 (latest)

terse violetBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1292785273758814240

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

coral raptor
#

When you create the Checkout Session You need to omit the payment_intent_data.transfer_data.destination field

#

and after the Checkout is completed. You make two transfers API call

little stratus
#

Ok I understand but I'm not going to have a mistake like that, the balance isn't enough. Because when I create a transfer only for the ambassador and for the organizer I leave payment_intent_data.transfer_data.destination then I get this error: โ€œYou have insufficient funds in your Stripe account for this transfer. Your card balance is too low.โ€ Because I think the funds are pending

coral raptor
#

But probably you are not setting the charge Id when making the transfer

little stratus
#

Yes, I'll get that

terse violetBOT
little stratus
#

req_gpeEbfM47M3Jb4

coral raptor
#

In this request you are not setting the source_transaction field.

little stratus
#

Yes, I know, but when I set source_transaction, I get this error: The source_transaction ch_3Q7DBJLeTnOqbIoi131T4CG7 can only be transferred to the account that the destination field was set to when it was created (acct_1Q5OkgQ4Ws5wfLLn) because the organizer's connect account is not the same as the ambassador's connect account

coral raptor
#

First you need to remove payment_intent_data.transfer_data.destination field when creating the Checkout Session
Then you create a transfer with the resulting charge by setting it as a source_Transaction

little stratus
#

Okay then. I create my checkout and when the checkout succeeds then I create a transfer to the organizer's account with the source_transaction and another for the ambassador with also the source transaction?

amber chasm
#

Yes, that's correct.

little stratus
#

Okay thanks! You're a lifesaver! Have a nice day ๐Ÿ™‚

terse violetBOT