#haroon2022
1 messages ยท Page 1 of 1 (latest)
Hi ๐ how are the cards being created? Are they returned if you list the Payment Methods for the customer?
https://stripe.com/docs/api/payment_methods/customer_list
adding more to the info I have copied customers from one stripe account to another. And their payment methods are also cp[oed
https://stripe.com/docs/api/cards/list
I'm using this API and I've been using it for quite some time. Don't know why it is happening in this case
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Do you have the ID of the card/source/payment method you're expecting to be returned that you can share? I'd also be curious whether it shows up as expected if you use the endpoint I referenced to list the Payment Methods for the customer.
@mellow shale Will payment intent id works?
The ID of the Source/Card/Payment Method would work better here, but if a Payment Intent is the only reference you have to those values then I may be able to work with that.
unfortunately, I'm unable to get id of source/card from dashboard
This is one of payment intent id
pm_1Nn04FEaCipTvbCZOrXdoxMF
Thank you, pulling that up. The pm_ prefix indicates that ID is for a Payment Method.
Since that is a Payment Method, is it returned when you list the customer's payment methods?
,nope sources API isn't returning it. But on stripe dashboard it's visible
Not the Sources API, the Payment Methods API.
Payment Methods API is giving the card details
But I have been using sources api for quite sometime and it gives me cards against user
and this method itself is a card
Sources are an older object type, and most of our integrations are moving towards Payment Methods if they aren't already on them. I would recommend setting up your flow so that it looks for both Sources and Payment Methods.
but until it's working I think so sources should return cards
Not if the Card isn't associated with a Source object.
It is working against some customers and not working against some of them. My whole system will stop working because of it
so I'm unable to understand why it isn't associated?
as customer has cards
a one more thing customer object also doesn't have default source and it is currently set to null. How can I know the default source?
The object that you shared is a Payment Method, it is not a Source, that is why it is not being listed when you retrieve Sources but is when you retrieve Payment Methods.
The invoice_settings.default_payment_method parameter is set for the Customer, which points to their default Payment Method.
ok thanks @mellow shale for explanation. Can you please resolve it for me and can for now I can view the cards payment methods under sources so that my system continue working. Until I shift all things to payment methods api
@mellow shale ^^
@cinder raft @oak scroll can you please respond here?
Can you clarify what you're looking to be resolved here? The resolution seems to be to use the right function to retrieve the type of objects that are being created.
I just want to keep using sources api for now as my system is using it at multiple places and I'm unable to change it all sudden. So, can you please resolve it so that sources api can give me this information?
for example I'm charging on a specific card with the help of card id. In payment methods API card id isn't present so how can I achieve it?
No, if Source objects are not being created, which seems to be the case here, then it's not possible to use the Sources API to interact with the objects being created.
so @mellow shale how can I achieve this case?
for example I'm charging on a specific card with the help of card id. In payment methods API card id isn't present so how can I achieve it?
Can you provide an example of where you're providing the Source ID to another function?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Gotcha, I don't think you can use Payment Methods directly with Charges, you would use Payment Intents instead which can accept Payment Methods.
Is this a new integration you're working on? I'm trying to wrap my head around how you got into a state where your integration is expecting to use Sources, but is ending up with Payment Methods instead.
it is 2-3-year-old project. I have over 1500 + stripe customers
I have copied 40+ customers from 1 stripe account to this account and this issue is occurring against those 40 customers
so with your suggestions to handle just those 40 customers I need to revamp and test my whole flow which is costly. So, I was asking you if sources are available it can save me from all this hassle
How were those customers and their payment details copied? Was that done by your code by cloning the payment details from a Platform account to a Connected account?
Gotcha, do you have the ID of one of the original customers that was copied from?
It is the same customer whose payment method I have shared
cus_MyDxIeZZVnyzzO
Hm, looking at the original Customer, I'm also seeing a Payment Method for it rather than a Source. Do you have the original ID of the Source that you had set up for the original Customer?
No
so do you have any easy and best solution for me?
The only approach coming to mind is to adapt your flow to handle the object types that it's being provided.
you mean using payment methods and intents?
Correct
ok, I have a few questions. can I use payment intents similar to charges? Can you please share the documentation regarding payment intent?
Yes, they're pretty similar.
This is our migration guide for moving from Charges to Payment Intents, but it has an emphasis on the frontend changes that would also need to occur:
https://stripe.com/docs/payments/payment-intents/migration?charges-cards-migration=paying-saved-cards
For charging already saved Payment Methods, you can use this step as a guide:
https://stripe.com/docs/payments/save-and-reuse?platform=web&ui=elements#charge-saved-payment-method
A key difference with Payment Intents, is that they support cards that require 3DS/SCA challenges be completed, so you may encounter a new state where the Payment Intent goes into a requires_action state that requires the customer to complete additional authentication. The step I linked to walks through that as well though.
?the ok thanks. Can you please confirm if I charge user using payment intent? Will it show up when I retrieve that charge using charges api?
If you list Payment Intents you will see the intent that you created, and if you list Charges then you will see the Charge object that the Payment Intent generates.
ok thanks