#mcrib - connect api requests

1 messages ยท Page 1 of 1 (latest)

pseudo flickerBOT
icy plinth
#

mcrib - connect api requests

meager pagoda
#

Yep, the stripe account header was it. Thanks so much!

icy plinth
#

Great! Happy to help ๐Ÿ™‚

meager pagoda
#

Can you help with another connect api question?

icy plinth
#

Sure, fire away

meager pagoda
#

I'm also trying to create a checkout session, but I'm getting an error:

There was an issue setting up your call.

Raw response for the API
Status code 400
{
"error": {
"code": "resource_missing",
"doc_url": "https://stripe.com/docs/error-codes/resource-missing",
"message": "No such price: 'price_1LpJzQIoCIZ57on5UmL9U5U0'",
"param": "line_items[0][price]",
"type": "invalid_request_error"
}
}

#

But I believe that Price ID is correct

icy plinth
#

Can you share the request ID?

#

This error usually occurs when the Checkout Session is created on one account but the Price record exists on another

meager pagoda
#

req_Q8a17VnxFfdKjk

icy plinth
#

I can see that this price record belongs to the Account acct_1LpBmpIoCIZ57on5. That would also need to be the account the Checkout Session is created on.

#

Okay that's a different error.

#

If you are making the request on the Connect Account then you don't specify a transfer_data.destination. What are you trying to achieve here?

meager pagoda
icy plinth
#

Destination Charges are made on the Platform Account, so no Stripe Account header is used

#

But the Price, Product, and Customer all need to exist on the Platform

#

The Platform collects funds by transferring an amount less than the full charge to the Connect Account via the transfer_data parameters.

#

Or by specifying an application_fee_amount

#

The Doc you linked is a good overview to give you a general idea of how Stripe Connect works but, as you can see in the left navigation menu, there are a lot more specifics to how to put all the pieces together.

meager pagoda
#

Yeah I'm still not understanding this error though. Its saying the price ID doesn't exist but I'm pulling it directly from the dashboard to make sure.

icy plinth
#

The request you shared did not have that error message

#

So it's hard for me to check on that part.

#

The only API requests for acct_1LpBmpIoCIZ57on5 with a 400 status show errors related to the [transfer_data][destination] parameter.

#

Based on that, I suspect you created the Checkout Session on the Platform Account. This is what you are supposed to do for a Destination charge. But the Price record exists on the Express Account. You will need to create a Price on the Platform Account (don't use the Stripe Account header).

meager pagoda
#

This is the last request I tried: req_jZRbzBF2CGljIc

icy plinth
#

Yeah okay sot it's what I described above. This request was made on Account acct_1LonUtEqlO7ZxV9Z but the Price ID belongs to account acct_1LpBmpIoCIZ57on5

#

With Express Accounts and Destination Charges all the Price & Products need to be created on the Platform

meager pagoda
#

So when I create the product and price I need to do so on the platform account, then reference that price ID, right?

icy plinth
#

Yup. And all you need to change about your API request when creating the Product and Price records is you don't include the Stripe Account header.

meager pagoda
#

Ok. I'll try that. Thanks