#toxiCity-card
1 messages ยท Page 1 of 1 (latest)
Hi ๐ your question is a little vague, could you try elaborating to help me better understand what you're trying to do and what part is giving you trouble?
I created a module for users to save their card information then saves their secret key. How do I load their card details inside my application
also, what do I do if users want to change their card information
What type of card details are you looking to display? A lot of that information is protected for PCI compliance purposes.
Depending on the information that you want to update, you'd either collect the details from the Customer and update the related Payment Method:
https://stripe.com/docs/api/payment_methods/update
Or, if you're trying to update non-editable fields like the card number, you would collect all necessary details and create a new Payment Method.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I just want to load users card number, cvc and expiration date
You can't do that, you won't be able to retrieve the full card number or CVC. You can retrieve the Payment Method, and within the card hash you'll find the expiration information and the last 4 digits of the card number.
https://stripe.com/docs/api/payment_methods/object#payment_method_object-card-exp_month
https://stripe.com/docs/api/payment_methods/object#payment_method_object-card-last4
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 it possible to load the form using stripe elements? do you have the documentation for that?
Yes, that is our Payment Element and our current recommended path for most integrations. It is what most of our documentation revolves around currently. I'm guessing you're looking for a guide on how to create a new payment method:
https://stripe.com/docs/payments/save-and-reuse?platform=web
What I am looking for is to reload the payment element with the user card details
That's not an option.
So I have to code a custom form to make it look like the stripe payment element then update it using the API Call?
I'm sorry, I don't think I'm understanding what you're trying to accomplish.
ok,
- I need to show user card details saved earlier
-> Is it possible to load the elements with all the saved card details - If I cannot use the payment element, Should I code a custom form that looks like the payment element in order to show saved user card details?
To clarify, you want to build a flow to show your customers the details of their card that you have access to (exp month, exp year, and last 4 of the card number)? You can't use the Payment Element for that, nor am I understanding why you would want to as you wouldn't be able to populate all of it's fields with the available information (you won't have the CVC or the full card number).
we created a card setup module that allows user to edit their credit card info
Gotcha, you cannot prefill the card fields on the Payment Element, nor do I think you would want to as your customers may need to provide new information anyway. I also would not recommend building custom UI to handle payment method details, doing so shifts part of the PCI compliance burden onto you.
Any time!