#thefyrewire-PMs

1 messages ยท Page 1 of 1 (latest)

fading relic
#

๐Ÿ‘‹ happy to help

#
  1. as per our docs https://stripe.com/docs/api/payment_methods/detach: Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer. meaning that once you detach a PM it's useless in Stripe.
  2. Elements by itself wouldn't allow that, but you can build your app in a way to use Elements with custom flows that you would have to create to show PMs and give your customer the possibility to delete (detach), add or replace (detach then add)
honest pecan
#

Ah thanks! So with the detach and add method, is there any option to pre-fill Elements to give the experience of "editing"? Or is there a way I can show my own form but then pass the data to Elements in the background and send that way?

fading relic
#

you wouldn't have access to the card info

#

it's not PCI Compliant

#

you would leave the Elements component empty and they'd have to fill in new card details

honest pecan
#

Gotcha gotcha. It almost feels like we'd need an "EditIntent" that you create by passing the payment method ID, then passing the client secret to Elements so it can securely load the card details back only for that customer's eyes, then they could adjust as needed and re-save

#

In any case the other method should be fine for now, thanks! ๐Ÿ˜„

fading relic
#

that you create by passing the payment method ID, then passing the client secret to Elements so it can securely load the card details back only for that customer's eyes, then they could adjust as needed and re-save
that would never happen, because it would mean that Stripe would have to send the card details to the customer's browser which is again non compliant to PCI standards and in all cases Stripe doesn't save the card number it saves something else (some sort of a token) that we'd use for later payments

#

In any case the other method should be fine for now, thanks! ๐Ÿ˜„
let me know if you need any more help

honest pecan
fading relic
#

you can always edit stuff on the payment method that are available for you

#

meaning exp_month, exp_year is editable

#

in the card object

#

so all of the parameters you see in that page you could use to update a payment method

#

but we wouldn't touch the initial card info

#

you could simply show the last4 digits to help your customer identify their card

honest pecan
#

Ah that's great, thank you!