#manish_api

1 messages ¡ Page 1 of 1 (latest)

civic snowBOT
pulsar nicheBOT
#

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.

civic snowBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1246174863966863494

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

charred elk
#

Hi, what do you mean by 'but not the required ones'?

peak nimbus
#

check the second request id,
when i specified the customer id only then it returned its details

but in the first request id that customer was not present in the list

charred elk
#

The response on GET requests are not saved so I can't see what you're saying.

#

However, if you're using Node, I might have a guess

peak nimbus
#

ok i will give you an example
when i use customers.list(), i get a list of objects with ids as follows

[
{
id: 'cus_1'
},
{
id: 'cus_2'
}
]

but i wanted to see cus_3 as well in the list which shows in my dashboard
so i do customers.retrive('cus_3')

and this returns the detail of this customer

#

what i mean to say is customers.list() is not returning all the customers which is present in my dashboard

charred elk
#

Can you share the exact code to list customers?

peak nimbus
#

sure

#
import Stripe from "stripe";
const stripe = new Stripe(
  "sk_test_ajhsfbvajhsbajshbda",
  {
    maxNetworkRetries: 0,
  }
);

stripe.customers
  .list()
  .then(result => {
    console.log("RESULT BLOCK");
    console.dir(result, { depth: null });
  })
  .catch(error => {
    console.error("ERROR BLOCK");
    console.dir(error, { depth: null });
  });
charred elk
#

Can you share the response from this request with me?

#

Also, what customer id are you not seeing?

#

I just tested this on my end and it does not look like there is an issue.

peak nimbus
#

oh damn
i forgot

#

the limit thing

#

Thanks @charred elk

charred elk
#

The default is 10 but you mentioned just 3 customers so I did know that was the culprit.

#

Happy to help!

peak nimbus
#

i have one more question

charred elk
#

Sure!

peak nimbus
#

suppose i create a checkout session with
setup_future_usage: "on_session"
payment_method_save: "enabled"
and i guest account is created so next time if i create a session for a different order and the same customer uses a different card

will both the payment methods gets saved in customers data?

charred elk
peak nimbus
#

so it works for guest accounts too?

#

guest customers i mean

charred elk
peak nimbus
#

Okay

#

Whats the primary key in case of guest customers?

charred elk
#

Can you reword your question? I don't fully understand what you're asking

peak nimbus
#

umm

#

suppose there's a customer A with email test1@gmail.com
he enters all the payment details and stuff and checkout is successful

now there's a customer B with same email test1@gmail.com
he enters a different payment method

so stripe will have 1 guest account or stripe will have 2 different accounts with same email?

charred elk
#

We surface our logs here: https://support.stripe.com/questions/guest-customer-faq.

What happens if the same card was used by different guest customers for different payments?

A guest payment will only be associated with a single guest customer. In this case, it will appear under the guest customer who used the email address, phone number or the card information most recently to complete a payment.

peak nimbus
#

I see
thanks