#pooja_api
1 messages ¡ Page 1 of 1 (latest)
đ 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/1316599514097782795
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there, what's the customer ID?
The /v1/customers/{{cust_id))/cards will return a list of cards that are attached to the customer. The result is empty if there's no cards attached to this customer yet.
cards attached you mean saved cards?
I tried in test mode and added a card in payment methods then I sent a get request to that customer id but it still returns 200 but no data
Yes, you need to save a card to the customer first. Have you done that?
yes
What's the customer ID?
cus_RNRailLYeTQytV
Thanks. I can see that the customer has an card payment method object attatched it. And I'd recommend you using the Payment Method list API instead https://docs.stripe.com/api/payment_methods/customer_list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok, but there is no card id in responce
You were using the legacy cards API previously, can I suggest you to try the payment methds API that I shared earlier?
sorry I meant there is no card id in response from payment method api as well
This is expected, the card payment method object doesn't embed a card object.
Can you tell me why you need a card ID?
for the next payment
You can also use a saved payment method to charge a payment. Details in https://docs.stripe.com/payments/save-and-reuse?platform=web&ui=elements&lang=node#charge-saved-payment-method
thanks, is payment method only for saved cards?
Not entirely, payment method is a representation for all payment methods, including card
what if client just pay in checkout and don't have any default payment method added? can we get the card id of the card which was used for on checkout oage?