#xfechx - connect checkout
1 messages ยท Page 1 of 1 (latest)
HI ๐
You can specify the destination account in either the payment_intent_data or the subscription_data parameters when creating the Checkout Session
https://stripe.com/docs/api/checkout/sessions/create?lang=python#create_checkout_session-payment_intent_data-transfer_data
and do I need still to pass the connect array at the end?
like:
['stripe_account' => $connect]
OK, so I have to remove that line, and add the array to the parameters of payment_intent_data ?
payment_intent_data.transfer_data.destination is the parameter you will want to set with the correct Connect Accout ID
I am getting an error
Can you share your request ID
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
i am not seeing the error on the dashboard
only on the checkout page
req_UYoSGpaj5KZ8pw
so everything seems ok, but in the checkout page i get an error
What is the error you get on the Checkout page?
The specified Checkout Session could not be found. This error is usually caused by using the wrong API key or visiting an expired Checkout Session. Please make sure the Session is not expired and that the API keys used to initialize Stripe.js and create the Checkout Session are test mode keys from the same account.
It is strange that I get this type of error, as I only change one flag and everything works for direct charges
I cannot see the error anywhere in the logs
Can you try re-fetching the Checkout Session object and follow that URL?
I found the checkout session through the request and visited the URL just fine
Use the Checkout Session ID, retrieve the object from the API, and use the URL that returns
not sure what you mean
why do I need to change that, If only with one flag the other option works well?
๐ stepping in
like if I do a checkout session for a direct charge, there is absolutely no problem
The link looks wrong
I get to see the checkout of the connected account.
Here is the creation requerst: https://dashboard.stripe.com/logs/req_uNK4MKXubEx3i3
No request log found with the specified ID.
The log may have passed its retention period.
for which account you are looking?
This is in acct_1ClDIPHlZBj3A1TO
ok got it
If you look at that creation request and visit the URL from the response I can see the Session just fine
Not sure how you generated the link that you provided above
yes
like this:
<script src="https://js.stripe.com/v3/"></script>
<script>
var stripe = Stripe('<?php echo $public_key ?>', {
stripeAccount: '<?php echo $connect ?>'
});
function StripeCheckoutExternal(){
stripe.redirectToCheckout({
sessionId: '<?php echo $session->id ?>'
}).then(function (result) {
alert(result.error.message);
});
}
StripeCheckoutExternal();
</script>
<?php```
not sure why is that creating a wrong url?
Can you create a new Session running that script
And provide the request ID
And the URL you get?
Oh wait
aha?
I see the issue
The Session above was not created via a Platform. However, you are redirecting client-side using the platform key + Connected Account header
See how you do var stripe = Stripe('<?php echo $public_key ?>', { stripeAccount: '<?php echo $connect ?>' });
If you are just creating the Checkout Session on your own account then you should not be setting stripeAccount
??? but how come it works with the same code, but creating a session with direct charges?
that is how I have processed like SO MANY checkout sessions with and without connect.
for my business and other businesses.
same code. When $connect is empty it gets ignored.
so I don't think that is the issue. Otherwise why would it work for direct charge session?
Hmm if it is getting ignored then that is a different story.
Like if you are setting it null
Well it would work with direct charges just fine
That is what it is designed for
The current test you shared is not a direct charge
Run another test like you did the above, remove that stripeAccount param
ok, I understand now
And provide the URL that it redirects to and the Session ID
so, the JS code I shared it is incompatible with Destination Charegs.
because it passes the stripe account header, and it is not needed in this situation.
right?
Correct
Cannot create a destination charge for connected accounts in AU because funds would be settled on the platform and the connected account is outside the platform's region. You may use the `on_behalf_of` parameter to have the charge settle in the connected account's country. For more information on `on_behalf_of`, see https://stripe.com/docs/connect/charges-transfers#on-behalf-of. If using capabilities (e.g. `card_payments`, `transfers`), note that they affect settlement as well. For more information on capabilities, see https://stripe.com/docs/connect/account-capabilities. If you still need assistance, please contact us via https://support.stripe.com/contact.
So, for destination charges, the platform and the account have to be in the same region??
If you aren't using OBO, then yes.
what is OBO
on_behalf_of
how can I add this?
You add it to your Session creation here: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-on_behalf_of
so, I can see the on_behalf_of, but I cannot see what options I can use ?
Looking at the API
You set that to the same account ID as the COnnected Account
But then OBO, is kind of like direct charges...
So the same ID as your transfer_data.destination
Yes it is... regulations stipulate you can't settle into your platform and transfer cross border unless you are using Cross Border Payouts (https://stripe.com/docs/connect/cross-border-payouts)
this is a US-only feature, isn't it?
I don't have business in the US
onlyl in AU and DE
Ah
Then to use destination without OBO you will have to have Connected Accounts in your region
Otherwise OBO is required
or Direct Charges..
also Direct Charges allow platform and vendor to have different country of operations I believe
Yep OBO and Direct both set the Connected Account as the settlement merchant
So it works for the regulatory side
what about if the AU connected account accepts another currency?
is this about currency or just a regulation
that I won't get accross
It is a cross border regulation. The presentment currency doesn't matter as we will just auto-convert to the settlement currency for wherever the charge settles
So currency doesn't change anything here
Is there a way that I can present a checkout with branding from the platform, but with a direct charge to a connected account?
No
That only affects the UI and won't actually put your platform info on Direct Charge Checkout Sessions. But maybe I'm misunderstanding what you are looking for exactly.
Hi there. Taking over for bismarck as they have to step out
I recommend just trying this out in test mode to get a feel for what changes
I believe it will show the Connect account's business name but the styling of the platforms's branding
But I recommend just testing
nothing seems to change
๐ my teammate needs to step away. just catching up on your question!