#dilkw-Payment
1 messages · Page 1 of 1 (latest)
Hi, the flow you specified is correct. What do you mean by "bind the card"?
When we notify your system, we send webhook events which always. contains object with Id
attach the card to a customer
If you use PaymentIntent with setup_future_usage it will automatically attach the card to the customer for you: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Is the customerId parameter required?
No it's optional
According to what you said, can the card list be displayed on the following page?
That parameter only "attached" the Card to the Customer object. You would need to write your client code to ask your server, you server figure it out that current customer has some card attached through Stripe API, and send back information to your client, then your client would be able to display the existing card in this UI
What I see is that this page is based on the customer's access to the stripe server (https://api.stripe.com/v1/payment_methods) to obtain the card list, so how should my client implement it?
Your client would need to send the customer id to your server, and let your server query Stripe for that card list, then respond to your client
No, this page is implemented internally in the SDK, and the network request for the card list is also implemented internally
The original process is to add paymentMethodId and customerId when creating paymentIntent, no other operations are required, but after your first payment is successful, subsequent payments can be realized on the card list page to display the previously paid card
Hi, if this is a pre-implemented by the SDK, then yes I think it would display the saved card. I have seen similar behavior in iOS SDK and Android/ReactNative should be the same. Would that answer your question?
So, it can be achieved by adding the setup_future_usage parameter when creating paymentIntent?
yes, I think so