#hickorydickorydock_code

1 messages ยท Page 1 of 1 (latest)

potent kilnBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1461640455707037938

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

alpine pecan
#

I should also mention that this is for a user who is authenticated via Stripe Link. I'd like to display the last4 / expiration date for the user so they know which card they used (even though they used Stripe Link in the end)

sudden bridge
#

๐Ÿ‘‹ Hi there! Let me take a look

#

I'll check on what information is available for a saved Payment Method using Link, backed by a card

alpine pecan
#

Hi there! Thank you ๐Ÿ™‚

sudden bridge
#

But can you also share a request ID (req_โ€ฆ) or Payment Method ID (pi_) where you're seeing the behaviour you described?

alpine pecan
#

Sure thing: pi_3SpsY4RmigaSU0y20x5QDcw4

sudden bridge
#

How are you creating the Confirmation Token in this case?

alpine pecan
#

const {error, confirmationToken} = await window.stripe.createConfirmationToken({elements: window.stripeElements})

sudden bridge
#

I would set allow_redisplay there, since that's when the underlying Payment Method is created

alpine pecan
#

Does seem like a bug that the override doesn't take though, right?

sudden bridge
#

I don't think there's anything really being overridden here. If you want to set allow_redisplay, then it needs to happen at the point that a Payment Method object is being created.

In this case, that's when createConfirmationToken is called. Setting allow_display on confirmPayment would only really apply if a confirmation token wasn't used, and so the Paymetn Method was being created at that point.

alpine pecan
#

I see, that makes sense. Thank you for your help!

potent kilnBOT
sudden bridge
#

But taking a step back, where is it you want to "display the last4 / expiration date for the user"?

alpine pecan
#

On our server-side application for a user who wants to manage their recurring donation to an organization, not as part of the Stripe UI

short mica
#

hi! I'm taking over this thread. let me know if you have other questions.

alpine pecan
#

thanks again for your help arran, and hi soma! I was able to create a payment method with redisplay: always, but I'm not seeing any last4/expiration date when I look at the payment method in the API explorer. Here's an example payment method: pm_1Sq9CpRmigaSU0y29dVxbyYM

short mica
#

this is a Link payment method, not a Card payment method.

#

so it's expected that it doesn't have a last4 property

alpine pecan
#

Yes, I understand, but the underlying payment is with a Card

#

In other words: the user comes to the site, enrolls in Stripe Link with their credit card while making a donation, and I'd like to be able to display the last 4 and expiration date of the card that they used when enrolling in Stripe Link, so they know on which card they made the donation

#

I thought it wasn't being displayed because allow_redisplay wasn't being passed, but perhaps that's not the case.

short mica
alpine pecan
#

So are you saying there is no way to capture or display the last4 and expiration date for a credit card used with Stripe Link?

short mica
#

correct

alpine pecan
#

I'm really surprised by that! In that case, I'd like to make a feature request that this be available. Can't imagine we're the only ones who want to be able to show our users which card is underlying the Stripe Link payment

short mica
#

the Link payment method may be a card, but it may be other things, like a bank account or a Klarna payment method. and in these case a last4 wouldn't make any sense.

#

if it's a Link payment method, then you should simply display "link" in your UI, with maybe the associated email of the account. there's no last4.

alpine pecan
#

Sure. but if it is a card, and for our users it often is, I'd want to be able to display the card. So again, I'd like to make this a feature request

#

end users aren't typically thinking "oh, I made this payment with Stripe Link", they're thinking "I used my credit card ending in x4242'

#

Thank you for your help today

short mica
#

makes sense.