#thefirstharpy
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- thefirstharpy, 12 hours ago, 48 messages
- thefirstharpy, 14 hours ago, 8 messages
Can you share the problem you're facing?
Can you share the request ID (req_xxx) with the error? Here’s how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
so before creating the checkout session i check if the customer is created. on this piece i get the error
seeing yesterdays requests only
In your log, does the response (in green) contain an request ID in the format of req_xxx)?
Hmm.. can you share the customer ID (cus_xxx) in the screenshot, so that I can check if I can find anything internally?
the complete log
cus_PQwPaiXlkuxkGs
Thanks! Checking it now
lemme know what to delete from here, for security purposes
These information is fine to share in public as there is no sensitive data
did you find anything?
In your code, you're attempting to use Account Retrieval API to request customer ID. Account Retrieval only takes account ID in the form of acct_xxx. You should use Customer Retrieval API to retrieve the customer information with customer ID (cus_xxx): https://stripe.com/docs/api/customers/retrieve
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
The issue is with line 192 of your code
i want to check if the customer exists on the connected account
as mentioned by bismarck earlier, that the customers will have to be created on the connected account
rather than the platform account
Let's step back here. What are you trying to achieve?
The error here was that you're using Account Retrieval API to retrieve a customer ID, which is incorrect
what i dont get is that if the customer is not found, why is it giving The provided key does not have access to account. Application access may have been revoked
Customer information can only be retrieved with Customer Retrieval API
cus_PQwPaiXlkuxkGs is a Customer ID, not account ID
ok so, im creating a checkout session with application fee,
before using connect, my code checked if the customer was created or not
but ive got to know now that instead of platform, the customers need to be created on the connected_account
so here im trying to check if the customer is created on the connected account
thats why i passed the stripeAccount: stripe_connected_accountID as bismarck said the base apis using this header will work
im now thinking to search the stripe customer by their email
and i need to check on the connected acc
What charge type of payment do you perform? Direct Charges or Destination Charges? Can you share an example Checkout Session (cs_xxx) created, so that I can check how your payment integratino works?
So that I can advise the solution accordingly
application_fee_amount can be used on both Direct Charges and Destination Charges
It depends on what you are looking to achieve here
What type of connected account are you using?
Ah I see! Then yes, it will be Standard connected account with Direct Charges
cus_PQwPaiXlkuxkGs is created on the platform instead of connected account
In addition, you're using the incorrect API to retrieve the customer information
It should be:
stripe.customers.retrieve('cus_xxx', {
stripeAccount: 'acct_xxx'
});
currently it is, as the customer was created before connect integration
If you use Direct Charges, you should ensure that the customer is created on the connected account directly
so this code is correct
i just need to somehow handle StripePermissionError
cause it now has two meanings
line 192 is incorrect. You should use stripe.customers.retrieve(), NOT stripe.accounts.retrieve() for customer information retrieval
oh 👀
is there a way i can request to open a closed thread?
for eg, you will close this one after a certain time
just asking so i dont have to link references again n again
btw, thanks for the help
The discord thread is short lived. We recommend to post the new question with summary of previous conversations
1 more question,
are the following changes correct?
old: stripe.customers.create(data)
new: stripe.customers.create(data, { stripeAccount: 'acct_xxx' })
old: stripe.customers.update(customerID, update)
new: return await stripe.customers.update(customerID, update, { stripeAccount: 'acct_xxx' })