#dino_pephanis-customer-pms

1 messages · Page 1 of 1 (latest)

mighty stump
velvet grove
#

OK, that will return all the payment methods. I can pass the following parameters ending_before, limit, starting_after can I filter by fingerprint

mighty stump
#

No, you can't. What are you specifically trying to do

velvet grove
#

I am trying to integrate Stripe with our gateway. We have a connect setup. Us -> Accounts -> Customers

#

We process payments using Stripe but through our API. We have a payment page, Customers can pay to an Account. I have setup a payment page with a CardElement that posts PaymentIntentID, Token & User Data to our end point.

#

I have managed to process the data, and send the payment to the correct Account storing the customer & payment so that it appears in the correct Account

#

I check the Account customer by Email to avoid duplicates, but if I use the same card, I get 2 instances of the same card in the Stripe Account

mighty stump
#

Yep, you can have multiple Payment Method objects which are from the same underlying credit card

velvet grove
#

OK, so every time they pay with that card they and new Payment Method is created?

#

Is there no way of checking and using the Payment Method that already exists?

mighty stump
#

Well, there is. But you'd need to implement the logic for that. The fingerprint field is generally unique

#

What most people do is build a UI that lists the saved PMs to present to their customers to select from

#

Can show the last 4 digits, brand, etc

velvet grove
#

We would like to do that, but in this scenario the Customer add their details before we know who they are.

velvet grove
mighty stump
#

Then you will need to check the fingerprint field of existing PMs on the Customer

velvet grove
#

So I would need to get Customer's PaymentMethods iterate through them, compare fingerprint with one supplied and if it exists use the exists card_id

mighty stump
#

Yep, that's the recommended approach!

velvet grove
#

OK thanks

mighty stump
#

Sure, np!

velvet grove
#

Enjoy the rest of your day

mighty stump
#

you 2!

velvet grove
#

Sorry one more question

mighty stump
#

Sure!

velvet grove
#

in my current flow I create a source using the token supplied

#

can i use a PaymentMethod is it exists?

mighty stump
#

You should most definitely use Payment Methods and not Sources

#

Sources are an older, deprecated API

velvet grove
#

OK

mighty stump
velvet grove
#

thanks