#thefirstharpy

1 messages · Page 1 of 1 (latest)

boreal stratusBOT
#

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.

elder gazelle
#

Can you share the problem you're facing?

manic narwhal
elder gazelle
manic narwhal
#

so before creating the checkout session i check if the customer is created. on this piece i get the error

manic narwhal
elder gazelle
#

In your log, does the response (in green) contain an request ID in the format of req_xxx)?

manic narwhal
elder gazelle
#

Hmm.. can you share the customer ID (cus_xxx) in the screenshot, so that I can check if I can find anything internally?

manic narwhal
elder gazelle
#

Thanks! Checking it now

manic narwhal
#

lemme know what to delete from here, for security purposes

elder gazelle
#

These information is fine to share in public as there is no sensitive data

manic narwhal
#

did you find anything?

elder gazelle
#

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

#

The issue is with line 192 of your code

manic narwhal
#

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

elder gazelle
#

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

manic narwhal
#

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

elder gazelle
#

Customer information can only be retrieved with Customer Retrieval API

#

cus_PQwPaiXlkuxkGs is a Customer ID, not account ID

manic narwhal
#

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

elder gazelle
#

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

manic narwhal
#

will I be using direct charges? can they be created on the checkout session?

elder gazelle
#

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?

manic narwhal
#

i dont want the liability on the platform

#

standard

elder gazelle
#

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'
});
manic narwhal
elder gazelle
#

If you use Direct Charges, you should ensure that the customer is created on the connected account directly

manic narwhal
#

so this code is correct

#

i just need to somehow handle StripePermissionError

#

cause it now has two meanings

elder gazelle
#

line 192 is incorrect. You should use stripe.customers.retrieve(), NOT stripe.accounts.retrieve() for customer information retrieval

manic narwhal
#

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

elder gazelle
#

The discord thread is short lived. We recommend to post the new question with summary of previous conversations

manic narwhal
#

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' })