#latwelve
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
- latwelve, 4 hours ago, 17 messages
'payment_intent_data' => [
'transfer_data' => [
'destination' => 'xxx',
],
],
Can you share the request id: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
pi_3O8OVLIEG6XkSwCO02pGEe9c
You didn't pass transfer data
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 know it looks like that but its there :/
if I dump the Session after creation I should also be able to see it in the passed information but its not coming through for some reason:
For example this is the same code I used in testing
$stripe_session = Session::create([
'payment_method_types' => ['card'],
'submit_type' => 'pay',
'customer' => $this->booking->user->stripe_id,
'client_reference_id' => $this->booking->reference,
'line_items' => $this->line_items,
'mode' => 'payment',
'metadata' => [
'booking_id' => $this->booking->id,
'user_id' => $this->booking->user->id,
'type' => $this->type->value,
'payment_type' => $this->payment_type->value,
'payment_destination' => $this->payment_destination->value,
],
'payment_intent_data' => [
'application_fee_amount' => $one_percent_fee,
'transfer_data' => [
'destination' => $this->concierge_account_id,
],
],
'success_url' => URL::to('/guest-area/booking-payment-success?session_id={CHECKOUT_SESSION_ID}'),
'cancel_url' => URL::to('/guest-area/booking/'.$this->booking->reference),
]);
and dumping $stripe_session i'd have excepted to see the payment_intent_data passed but its not weirdly?
Log $this->concierge_account_id
prior to calling session::create
If that's null then there's your issue
its not sadly
Yep I've got it setup here with live details its coming from the same class not remotely.
I've just inlined it to simplify it for testing and its still not in the dump for the stripe_session
can I pm you a quick screenshare video to show?
sorry I only asked as the last person here suggested it
I just didnt want to share the live details
Doesn't make much sense that it works in test mode with the same code
So something must be different here
Either you're using the wrong code
Or the data you're passing isn't what you expect
Recommend logging all the params you're passing BEFORE you call $stripe_session = Session::create([
Its baffling me I've looked and all the data is there
literally everything is in the log except the payment_intent part
You're logging individual pieces of data prior to the session create call?
You mentioned you're logging the session AFTER the call
yes and you can see them in the stripe log after
even with the intent inlined with no external calls it doesnt pass the info to the live session
'payment_intent_data' => [
'transfer_data' => [
'destination' => 'xxx',
],
],
xxx is obscured for the real account id
I've triple checked the docs for what is required as a field - but its not something stupid like on_behalf_of being required also is it?
I'm going to go grab a dump of the working test vs the incomplete live version for help
What do you mean by this?
the information passed to stripe in the gui
the other fields - all except the transfer data
Please can you let me know that I'm correct in thinking that I should be able to dump the session after its creation and see the payment_intent_data information?
You should
Is everything the same between live and test mode
Client library version, language runtime, etc
the test mode is also producing the same results on this code now
i did a very basic test earlier today then refactored my code and thought it was just a live/test error.
I've now just simplified its to its basics and all inlined so you can see nothing is coming in incorrectly and it still doesnt seem to pass the data to the session for the destination:
$stripe_session = Session::create([
'payment_method_types' => ['card'],
'submit_type' => 'pay',
'customer' => 'cus_OwHpRfzzePcFn7',
'client_reference_id' => 'xxx',
'line_items' => [
[
'price_data' => [
'currency' => 'eur',
'unit_amount' => '90000',
'product_data' => [
'name' => 'Test',
],
],
'quantity' => 1,
],
],
'mode' => 'payment',
'payment_intent_data' => [
'transfer_data' => [
'destination' => 'acct_1O56wGI1NhFQRbo5',
],
],
'success_url' => URL::to('/guest-area/booking-payment-success?session_id={CHECKOUT_SESSION_ID}'),
'cancel_url' => URL::to('/guest-area/booking/'.$this->booking->reference),
]);
So it's actually not working in test mode then?
not now - my example this morning was - sorry for that
but the session couldnt be simpler
What did you change
That doesn't make sense that it's intermittently working haha
this was this mornings...
$stripe_session = Session::create([
'payment_method_types' => ['card'],
'submit_type' => 'pay',
'customer' => $customer_id,
'client_reference_id' => $this->booking->reference,
'line_items' => $this->line_items,
'mode' => 'payment',
'metadata' => [
'booking_id' => $this->booking->id,
'user_id' => Auth::id(),
'type' => $this->type,
'payment_type' => $payment_type,
],
'payment_intent_data' => [
// 'application_fee_amount' => 100, // optional
'transfer_data' => [
'destination' => 'xxx',
],
],
'success_url' => URL::to('/guest-area/booking-payment-success?session_id={CHECKOUT_SESSION_ID}'),
'cancel_url' => URL::to('/guest-area/booking/'.$this->booking->reference),
]);
nothing really i was just tidying up the class above it - but the data passed to here is the same
I didnt physically dump the session to test this morning i just ran a card through
Are you able to test a session for me to see if the transfer_data gets added to the dump?
ok so i've got a bit further
$stripe_session does not log the transfer data in the object.
which is why it wasn't showing.
I just did a test with test details on my code and it does seem to go through correctly
I'll try the live again.. but it'd be good to know how I can test the destination information in the stripe_session object