#brave_monkey_33835_00636

1 messages · Page 1 of 1 (latest)

hazy coralBOT
gusty parcel
#

Which event type of your 3 webhook call backs?

#

Normally a Checkout Session will trigger one checkout_session.completed event

rocky crater
#

3 consecutive checkout sessions have been created

gusty parcel
#

That means 3 different customer generated it

rocky crater
#

yes

gusty parcel
#

They will have the same metadata yes. How do you want to distinguish them?

#

There can be 10 or dozens of them corresponding to your sales, in Production

hazy coralBOT
rocky crater
#

The meta data will be different for each session. the above is just an example format that we used

wanton sleet
#

i'm not quite sure i understand what's the problem you're trying to solve here : You asked How to identify which checkout sessions webhook received. - you should be able to identify each Checkout Session by their Checkout Session id, or metadata, or client_reference_id that you passed in

rocky crater
#

Now its working.

#

Is it possible to calculate the tax and stripe processing fee before the checkout session is created?

wanton sleet
#

can you share more on what you're trying to achieve / do? Why do you need that information before the Checkout Session is created?

rocky crater
#

$unit_amount=100
$commission = 2.5;
$partner_amnt= $unit_amount - $commission;$session = \Stripe\Checkout\Session::create([
'client_reference_id' => $refernceid,
"success_url" => base_url("checkout/success"),
"cancel_url" => base_url("checkout/cancel"),
"mode" => 'payment',
"line_items" => [
[
"price_data" => [
"currency" => "mxn",
"product_data" => [
"name" => "Test",
"description" => "Testdata"
],
"unit_amount" => intval($unit_amount * 100)
],
"quantity" => 1
],
],
'payment_intent_data' => [
'transfer_data' => [
'amount' => intval($partner_amnt * 100),
'destination' => $destination,
],
],
'metadata' => [
'session_id' => $refernceid
],
]);

#

is it possible to calculate the fee (tax,stripefee) before the checkout session created.autotax disabled.

wanton sleet
#

we don't provide any API for you to calculate that before the Checkout Session is created if that's what you're asking

rocky crater
#

how to collect taxes for one-time payments in Stripe Checkout?Is it possible to define ?

wanton sleet
rocky crater
#

$paymentIntent = \Stripe\PaymentIntent::create([
'payment_method_types' => ['card'],
'amount' => intval($trxn_amount * 100), // Convert to cents
'customer' => $customer->id,
'currency' => 'mxn',
'transfer_data' => [
'amount' => $amountForAccount1, // co
'destination' => $destinationAccount1, // Connected account ID1
],
'transfer_data' => [
'amount' => $amountForAccount2, //receiver
'destination' => $destinationAccount2, // Connected account ID2
],
]);
Transfer not happened to firstaccount

wanton sleet
#

please always provide the corresponding request id or object id - can you please share that?