#alessandro.ricci
1 messages · Page 1 of 1 (latest)
Hello 👋
When you say charge is created automatically, what exactly do you mean?
You want to charge your users prior to your partner providing their services, correct?
yes is what we want but we want to pay our partner only after a confirmation from our user using a code like this
$price = $stripe->prices->create([
'unit_amount' => 55000,
'currency' => 'eur',
'product_data' => [
'name' => 'booking_id_1'
]
]);
$session = \Stripe\Checkout\Session::create([
'line_items' => [[
'price' => $price->id,
'quantity' => 1,
]],
'mode' => 'payment',
'success_url' => 'http://localhost:8000/success-stripe',
'cancel_url' => 'http://localhost:8000/success-failure',
'payment_intent_data' => [
'application_fee_amount' => 5000,
'transfer_data' => [
'destination' => $account->id,
],
],
]);
but in this scenario after 7 days the partner is payed automatically
we are sure we do something or we dont undestand something
*wrong
Do you want to control the timing of the payout OR the transfer of the amount to the connected (partner's) account?
yes
Which one out of the two?
the second one
Gotcha. In that case, you'd want to switch to Separate Charges and Transfers flow. As with destination charges, you can't control the timing of the transfer.
ok thanks, can we still use a checkout session to achieve this instead of create a payment intent?
You can, you'd create a checkout session as you normally would on your platform account and then create a transfer by calling the API
You can use source_transaction to link the transfers to the Charge from the successful CheckoutSession
https://stripe.com/docs/connect/charges-transfers#transfer-availability
hi, stepping in as hanzo is away. Let me know if you have any follow up questions here.
hi another question about the timing process, after a period of time from the checkout session completion money are available to our bank account (lets suppose 7 day) after this period we can use the stransfer api with the source_transaction only if our stripe balance cover the amount is this right ? or we can still pay our partner having a negative amount by our side
?
By using source_transaction, the transfer request succeeds regardless of your available balance and the transfer itself only occurs once the charge’s funds become available, https://stripe.com/docs/connect/charges-transfers#transfer-availability
there is a way to "freeze" a portion of the total amount ?
lets suppose i have a checkout of 10 and need to collect 2 for me and 8 for a connected account there is a way to avoid that 8 euro to be transfered in my bank account automatically?
to make sure funds are always available at any time for my connected account
The only way this can be achieve id if you used a manual payout, https://stripe.com/docs/payouts#manual-payouts. Otherwise, with automatic payout funds would be sent according to your set schedule.
ok thanks, the last question..... fee are applied by both sides of the stripe connect process or only by my side
?
That all depends, and it's documented here for your review: https://stripe.com/docs/connect/charges
thank you everything is clear now
Happy to help!