#ORIKIMO-PM
1 messages ยท Page 1 of 1 (latest)
Yes
then yes you could retrieve the PM using this API https://stripe.com/docs/api/payment_methods/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.
I tried but the api return an empty object
would you mind sharing the PM id pm_xxx?
ok wait a sec
pm_1JZbBlLYMuPAhhAUy6MURaKv
I think the api don't return informations because the pm is not link to a customer
let me check
do you have the request id where you try to retrieve it? 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 center 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.
req_RmnE7kGfnq9QgT
are you able to retrieve any other PM from a customer?
Yes
would you mind sharing another pm id? and also the response that you're getting?
yes wait a min
if you could throw in your code as well that would be great
a side note if you don't mind
you don't need to wrap your code with return new Promise etc...
you're already in an async function using await
so instead of using return new Promise etc... remove that line and replace the resolve({value}) to return {value}
pm_1HUC16LYMuPAhhAUvovRjcAQ
req_CwjcRbe100Y7D7
I promise it because i'm parallelize requests
you already have await which is making your function as a promise, so no need for the extra Promise
Yes but all the verification process need to be promised, with this method, i can check a pm every 52ms and don't wait response
sorry for my english ^^
when using a new Promise with an async function, you're creating a redundant Promise for nothing... basically instead of checkPaymentMethodValidity to return a Promise<bool> your code is returning a Promise<Promise<Promise<bool>>>
Ok.. and for the main problem ?
I was still looking to be honest, and it's really weird that I wasn't able to find something specific
the only thing that I was able to see is that your account is in a weird state
maybe you should sort that out first with support https://support.stripe.com/?contact=true
Find help and support for Stripe. Our support center 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.
In the api doc, they said "Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer" So i think gest customers don't work..
I'm not sure to be honest let me test it out
Hi ๐ jumping in as my teammate needed to step away. I see that you're logging paymentMethod in most of the paths that your code is taking, can you share the output of those log lines when you retrieve the Payment Method that is coming back empty?
Is your code hitting any of the log statements? Taking a closer look you seem to be referencing exp_year and exp_month rather than card.exp_year and card.exp_month
https://stripe.com/docs/api/payment_methods/object?lang=node#payment_method_object-card-exp_year
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Glad I could help!