#xfechx - connect checkout

1 messages ยท Page 1 of 1 (latest)

finite wagonBOT
green rose
narrow lichen
#

and do I need still to pass the connect array at the end?

#

like:

#

['stripe_account' => $connect]

green rose
#

No, that is for direct charges

#

xfechx - connect checkout

narrow lichen
#

OK, so I have to remove that line, and add the array to the parameters of payment_intent_data ?

green rose
#

payment_intent_data.transfer_data.destination is the parameter you will want to set with the correct Connect Accout ID

narrow lichen
#

I am getting an error

green rose
narrow lichen
#

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

green rose
#

What is the error you get on the Checkout page?

narrow lichen
#
#

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

green rose
#

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

green rose
#

Use the Checkout Session ID, retrieve the object from the API, and use the URL that returns

narrow lichen
#

not sure what you mean

#

why do I need to change that, If only with one flag the other option works well?

hidden spoke
#

๐Ÿ‘‹ stepping in

narrow lichen
#

like if I do a checkout session for a direct charge, there is absolutely no problem

hidden spoke
#

The link looks wrong

narrow lichen
#

I get to see the checkout of the connected account.

hidden spoke
narrow lichen
#

No request log found with the specified ID.
The log may have passed its retention period.

#

for which account you are looking?

hidden spoke
#

This is in acct_1ClDIPHlZBj3A1TO

narrow lichen
#

ok got it

hidden spoke
#

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

narrow lichen
#

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?

hidden spoke
#

Can you create a new Session running that script

#

And provide the request ID

#

And the URL you get?

#

Oh wait

narrow lichen
#

aha?

hidden spoke
#

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

narrow lichen
#

so in the JS ?

#

youmean?

#

In the snippet of code i just shared?

hidden spoke
#

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

narrow lichen
#

??? 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?

hidden spoke
#

Hmm if it is getting ignored then that is a different story.

#

Like if you are setting it null

narrow lichen
#

that is not the issue

#

otherwise it would not work for direct charges

hidden spoke
#

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

narrow lichen
#

ok, I understand now

hidden spoke
#

And provide the URL that it redirects to and the Session ID

narrow lichen
#

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?

hidden spoke
#

Correct

narrow lichen
#

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??

hidden spoke
#

If you aren't using OBO, then yes.

narrow lichen
#

what is OBO

hidden spoke
#

on_behalf_of

narrow lichen
#

how can I add this?

narrow lichen
#

so, I can see the on_behalf_of, but I cannot see what options I can use ?

#

Looking at the API

hidden spoke
#

You set that to the same account ID as the COnnected Account

narrow lichen
#

But then OBO, is kind of like direct charges...

hidden spoke
#

So the same ID as your transfer_data.destination

narrow lichen
#

this is a US-only feature, isn't it?

#

I don't have business in the US

#

onlyl in AU and DE

hidden spoke
#

Ah

#

Then to use destination without OBO you will have to have Connected Accounts in your region

#

Otherwise OBO is required

narrow lichen
#

or Direct Charges..

#

also Direct Charges allow platform and vendor to have different country of operations I believe

hidden spoke
#

Yep OBO and Direct both set the Connected Account as the settlement merchant

#

So it works for the regulatory side

narrow lichen
#

what about if the AU connected account accepts another currency?

#

is this about currency or just a regulation

#

that I won't get accross

hidden spoke
#

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

narrow lichen
#

Is there a way that I can present a checkout with branding from the platform, but with a direct charge to a connected account?

hidden spoke
#

No

narrow lichen
#

So what does that refer to?

hidden spoke
#

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.

narrow lichen
#

yes, about the ui actually

#

what exactly changes from the checkout?

hushed solar
#

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

narrow lichen
#

nothing seems to change

devout lantern
#

๐Ÿ‘‹ my teammate needs to step away. just catching up on your question!