#tamil-selvan_api
1 messages ¡ Page 1 of 1 (latest)
đ 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/1270353675616780310
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- tamil-selvan_api, 4 hours ago, 12 messages
- tamil-selvan_api, 6 hours ago, 18 messages
- tamil-selvan_api, 4 days ago, 17 messages
Hi, let me help you with this.
Could you please share the Request ID req_xxx? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Here is the request ID:
req_594fEubJ1mKnUk
What does it mean? Where I need to have that fund in my stripe to process those payments?
You have insufficient funds in your Stripe account. One likely reason you have insufficient funds is that your funds are automatically being paid out; try enabling manual payouts by going to https://dashboard.stripe.com/account/payouts.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I see you're using transfer_group to specify the source transaction. It doesn't work exactly like this. transfer_group is just an arbitrary string, that also needs to be present on the source transaction, in your case, this Checkout Session: https://dashboard.stripe.com/logs/req_uoDYmnDxDOErtN
You need to use the same string when you create the Checkout Session in payment_intent_data.transfer_group: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-payment_intent_data-transfer_group
To solve this now, you can try creating the Transfer again, but using the Charge ID in the source_transaction parameter instead: https://docs.stripe.com/api/transfers/object#transfer_object-source_transaction
I understand it's an advanced concept and might be confusing. You can read about it in detail here: https://docs.stripe.com/connect/separate-charges-and-transfers?platform=web&ui=stripe-hosted#transfer-availability
public function success(Request $request)
{
Stripe::setApiKey(env('STRIPE_SECRET_KEY'));
$sessuser = Auth::user();
$user = User::find($sessuser->id);
$userid = $sessuser->id;
$ChildId = session('child_id');
$sessionId = $request->get('session_id');
$certificateId = session('certificate_id');
$session = StripeSession::retrieve($sessionId);
if ($transfer > 0) {
// Create the first transfer
$transfer = Transfer::create([
'amount' => $transfer * 100, // Transfer amount in cents
'currency' => 'usd',
'destination' => env('STRIPE_CONNECTED_ACCOUNTID_1'),
'transfer_group' => $session->id,
]);
}
if ($transfer2 > 0) {
$transfer2 = Transfer::create([
'amount' => $transfer2 * 100, // Transfer amount in cents
'currency' => 'usd',
'destination' => env('STRIPE_CONNECTED_ACCOUNTID_2'), // Stripe connected account ID 2
'transfer_group' => $session->id,
]);
}
Can you help me to implement it here. So that it will really helpful for me
Please refer to the documentation I shared above. It's essential that you understand the logic behind it yourself, since I can't write the code for you.