#NikolaKG80
1 messages · Page 1 of 1 (latest)
hey there can you explain more about the situation here? What exactly are you trying to do?
Sure, so I have two connected accounts, admin and restaurant owner. I'm using payment_intent_data in stripe session to transfer the data to the restaurant owner
And it kinda works, but the restaurant owner doesn't see the customer information
You're using Checkout sessions and then providing transfer details for a destination charge?
I'm doing that in the same session construct
$session = Session::create([
'payment_intent_data' => [
'application_fee_amount' => $application_fee_amount,
'on_behalf_of' => $this->order->restorant->user->stripe_account.'',
'transfer_data' => [
'destination' => $this->order->restorant->user->stripe_account.'',
]
]);
Something like this
So on the connected account's side (restaurant owner), I do see the payment, but I don't see the customer, nor do I see the Order ID for instance.
I already asked this, and got some pointers, but I didn't manage to solve the problem
What Order ID are you referring to here? Is it some metadata you set?
Order ID would be saved as a payment description
And how does this relate to your question about updating the destination? (No, you can't do that, but I'm curious what you're actually trying to accomplish)
A description where, specifically?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
So when the restaurant owner opens this page, he should be able to see the customer and order information
Those are visible only to the admin user
On the main account, and not on the connected account
Maybe I need to create a manual transfer from the admin account to the connected account, and set source_transaction?
Can you show an example of what you see via screenshot, redacting anything sensitive/private?
For example, you can also set the description of the payment intent created by the session:
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-description
but you don't seem to use this in your snippet above
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
This is what is visible to the restaurant owner
And what about to you?
I should note that destination charges aren't recommended for use with standard accounts, so normally this py_123 transfer payment is not seen by the recipient
However, in the event you want to change how this is viewed, you can update that py_123 transfer payment (charge) using the Charge update API by authenticating as the connected account
https://stripe.com/docs/connect/authentication#stripe-account-header
And calling charge update for that ID to set the description -- you'd need to get the ID from the transfer linked in the charge object within the payment intent
But taking a step back, it seems like perhaps you should be using direct charges here, with application fees
If we use direct charges, then the admin won't see the payment
That's somewhat separate from what kind of charge is appropriate here. You could provide visibility of payments like this via your platform.
I'll discuss that with my client...
On a separate note, I can create a customer in stripe, and I supply the customer ID inside the session construct
Yes, you can optionally provide an existing customer
But, when I go to stripe checkout page, only the customer email field is populated
Am I missing something, or it's not possible to set the customer "Name on card" without storing all of the details by using setup_future_usage?
No the card details are separate -- the customer does what you note above, associates that payment to an existing customer