#CHIΞFMCCONNΞLL.ΞTH

1 messages · Page 1 of 1 (latest)

near whaleBOT
ocean badger
#

Hi there

#

Yep if you provide the PaymentIntent IDs then I'd be happy to look

rugged cargo
#

one moment i will paste them in here

ocean badger
#

👍

rugged cargo
#

These didn't work and sent the charge to the platform (destination charge)
py_1LiLAqIlhDBkxKVD3TPPCJGW
py_1LiL60IlhDBkxKVD3cJhzpRx

These were working (to our suprise) and did a direct charge
pi_3LiKWNIlhDBkxKVD1uGp6gfl
pi_3LiKOoIlhDBkxKVD0qtMEQfZ

ocean badger
#

Thanks, looking

#

Okay so everything looks expected here. The difference is that you are creating certain Checkout Sessions using the Stripe Account Header (which creates a Direct Charge), and certain Sessions you aren't using the Stripe Account Header but instead are setting transfer_data.destination which creates a Destination charge.

#

So it appears there are two different paths in your code that are going on here

#

And you'll want to debug that

rugged cargo
#

ok. thank you for that explanation.... so in order for clarity on my end let me follow up with a question

#

if I am passing the Stripe-Account header which should look like this
Stripe-Account: accountID
then I should not have transfer_data.destination in the API call at all otherwise it will create some strange behavior

#

if I do want to use transfer_data.destination some time in the future I will have to also remove the header, they both cannot exist in the api call at the same time

#

is that accurate?

ocean badger
#

Yep that's correct

#

The Stripe Account header is used to create the request on the Connected Account

#

You can't create a destination charge on a Connected Account

rugged cargo
#

ok. so just remove the transfer_data.... out of the API call completely. and the platform fees can stay the same also right?

#

shouldn't be any conflict with them. and then once the transaction is completed the both show in the hover when looking at the charges in the stripe dashboard

#

like the 2 above that completed correctly

#

can I run a test real quick on the api call .. would you be able to wait a minute or 3?

ocean badger
#

Yep no rush

#

Myself or someone on my team will be here

remote barn
#

Hi Bismarck, I work with Chief. Just curious what is the current checkout API version?

#

I'm wondering if this is due to using an outdated API version

ocean badger
#

Hi there

rugged cargo
#

yeah that was another question we are using the v1 as stated above in the url i pasted in. do we need to be on a v2?

ocean badger
#

Checkout is supported on all versions

#

There are a few changes to params in the newest API version

#

But that wouldn't have an impact here really on Direct versus Destination

rugged cargo
#

if you had to make a recommendation. based on the call data you saw, would you recommend us using a different version, and what would we have to be aware of if we changed. I personally did not see any updated version on this particular api call but may I glazed over it

ocean badger
#

I mean yes you are on an old API version (2018-02-28)... the newest one just released is 2022-08-01 (https://stripe.com/docs/upgrades#2022-08-01) and that doc notes the parameters that were removed from Checkout Session creation on the new API version so you'll want to look at that if you upgrade, but really the API version has no relevance here to what you are seeing with regards to the issue you surfaced.

#

The manner of creating Direct Charges versus Destination Charges is not impacted by the API version you are using

rugged cargo
#

yeah, ok, that makes sense. just wanted to make sure it will be reliable and we weren't seeing some sort of fluke from our end either. it was so strange. Thanks so much for your time and help Bismarck, really appreciate you a lot!

#

🦄