#toxiCity-card

1 messages ยท Page 1 of 1 (latest)

woeful mesa
#

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?

inland elbow
#

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

woeful mesa
#

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.

inland elbow
#

I just want to load users card number, cvc and expiration date

woeful mesa
#

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

inland elbow
#

is it possible to load the form using stripe elements? do you have the documentation for that?

woeful mesa
inland elbow
#

What I am looking for is to reload the payment element with the user card details

woeful mesa
#

That's not an option.

inland elbow
#

So I have to code a custom form to make it look like the stripe payment element then update it using the API Call?

woeful mesa
#

I'm sorry, I don't think I'm understanding what you're trying to accomplish.

inland elbow
#

ok,

  1. I need to show user card details saved earlier
    -> Is it possible to load the elements with all the saved card details
  2. 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?
woeful mesa
#

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).

inland elbow
#

we created a card setup module that allows user to edit their credit card info

woeful mesa
#

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.

inland elbow
#

Thank you

#

Thank you Mr Miseeks!

woeful mesa
#

Any time!