#mcrib - connect api requests
1 messages ยท Page 1 of 1 (latest)
Hi ๐
Can you share a request ID for one of the failed attempts to use the API?
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
In general, you make API requests on behalf of a Connect Account using the Stripe Account header:
https://stripe.com/docs/api/connected_accounts
So for the API requests to create a Price:
https://stripe.com/docs/api/prices/create
or a Product
https://stripe.com/docs/api/prices/create
you would include the Stripe Account parameter in the API call.
mcrib - connect api requests
Yep, the stripe account header was it. Thanks so much!
Great! Happy to help ๐
Can you help with another connect api question?
Sure, fire away
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
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
req_Q8a17VnxFfdKjk
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?
I'm trying to do a destination charge, basically trying to follow this tutorial and I'm on step 4
https://stripe.com/docs/connect/collect-then-transfer-guide
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.
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.
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).
This is the last request I tried: req_jZRbzBF2CGljIc
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
So when I create the product and price I need to do so on the platform account, then reference that price ID, right?
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.
Ok. I'll try that. Thanks