#kevin-phillips_customer-payment-methods

1 messages ยท Page 1 of 1 (latest)

empty forgeBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1271527718923669647

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

tiny lance
#

Hi ๐Ÿ‘‹

We don't have any control or insight into the woocomerce plugin. You will need to reach out to woocommerce for support.

unique solar
#

I understand this. This is about connecting to the stripe API and retrieving customer cards.

tiny lance
unique solar
#

I am talking about writting an integration to the stripe API and useing the stored cus_xxxx keys to pull down their saved CC data @ stripe. I am asking if it will trigger some kind of shutdown

#

yup

tiny lance
#

List payment methods by Customer ID

unique solar
#

yup exactly

#

aside from rate limits will i trigger something. that will lock me out

tiny lance
#

Rate limits are 100rps in Live and 25rps in Test mode. If you are making these requests synchronously you're not likely to hit them in my experience. But if you do you can implement some sort of delayed retry.

unique solar
#

for sure

#

I will just to be safe

#

i know this is going to be super sus but it wont think I am up to anything nefarious and label me as a bad actor

#

๐Ÿค”

tiny lance
#

Wait a sec, do you have an example CC ID you can share?

unique solar
#

yup

#

cus_M7by5eLtdmtFsS

#

sorry thought you wanted the cus
here is a credit card ID
src_1Lu5KyKi8KmLp4Ywvue9yZ0f

#

i do realize that this is using the source endpoint and the new tokens start with pm_

tiny lance
#

Yeah, that's okay. So what is it exactly you want to store in your integration?

unique solar
#

so the Woo integration has a bug that is deleting our customers CC from their account. it has left the card details in Stripe. I have stopped this from happening.

My integration would...

send a request to /v1/customers/cus_xxx/payment_methods

evaluate results looking for cards with prefix src_xxx

if cards exist with src_xxx check our db for src_xxx if does not exist save card to our db and connect to ouur customers account

#

like you said we have the normal rate limits apply but my concern is that if I try to do a bulk update istripe will think I am up to no good and send me to api purgatory

tiny lance
#

I don't think so. We have plenty of merchants that do bulk operations

#

I think you'll be fine as long as you don't hammer the API with too many requests.

unique solar
#

cool, this will make recovering so much easier. Just want to avoid creating more problems

#

well it looks like i ned to check about 10k

tiny lance
#

Okay sure, but can you spread that out over like 100 seconds?

unique solar
#

yeah for sure

tiny lance
#

Honestly, unless you are doing a multi-threaded or distributed approach, the duration of a single API call is likely going to be long enough that you won't hit our rate limits.

unique solar
#

i will set it to run consecutivly

tiny lance
#

The List PM by Customer API means we have to look up the Customer and then search for all associated PMs so the response takes a little bit

#

You could do some initial tests to get a sense for latency

unique solar
#

yeah then i have to evaluate it on my end and do what I have to do

tiny lance
#

Makes sense to me

unique solar
#

for sure will do some tests before letting it go wild

#

thank you for your input i appreciate it!!

tiny lance
#

Happy to help ๐Ÿ™‚ It's why we're here

empty forgeBOT