#haroon2022

1 messages ยท Page 1 of 1 (latest)

oak scrollBOT
mellow shale
cinder raft
#

adding more to the info I have copied customers from one stripe account to another. And their payment methods are also cp[oed

mellow shale
#

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.

cinder raft
#

@mellow shale Will payment intent id works?

mellow shale
#

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.

cinder raft
#

unfortunately, I'm unable to get id of source/card from dashboard

#

This is one of payment intent id
pm_1Nn04FEaCipTvbCZOrXdoxMF

mellow shale
#

Thank you, pulling that up. The pm_ prefix indicates that ID is for a Payment Method.

oak scrollBOT
mellow shale
#

Since that is a Payment Method, is it returned when you list the customer's payment methods?

cinder raft
#

,nope sources API isn't returning it. But on stripe dashboard it's visible

mellow shale
#

Not the Sources API, the Payment Methods API.

cinder raft
#

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

mellow shale
#

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.

cinder raft
#

but until it's working I think so sources should return cards

mellow shale
#

Not if the Card isn't associated with a Source object.

cinder raft
#

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?

mellow shale
#

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.

cinder raft
#

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?

mellow shale
#

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.

cinder raft
#

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?

mellow shale
#

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.

cinder raft
#

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?

mellow shale
#

Can you provide an example of where you're providing the Source ID to another function?

cinder raft
mellow shale
#

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.

cinder raft
#

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

mellow shale
#

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?

cinder raft
#

there is a copy option available on stripe dashboard under customers tab

mellow shale
#

Gotcha, do you have the ID of one of the original customers that was copied from?

cinder raft
#

It is the same customer whose payment method I have shared

cus_MyDxIeZZVnyzzO

mellow shale
#

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?

cinder raft
#

Nope, I don't have it

#

is there any way to transfer payment methods into sources?

mellow shale
#

No

cinder raft
#

so do you have any easy and best solution for me?

mellow shale
#

The only approach coming to mind is to adapt your flow to handle the object types that it's being provided.

cinder raft
#

you mean using payment methods and intents?

mellow shale
#

Correct

cinder raft
#

ok, I have a few questions. can I use payment intents similar to charges? Can you please share the documentation regarding payment intent?

mellow shale
#

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.

cinder raft
#

?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?

mellow shale
#

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.

cinder raft
#

ok thanks