#hickorydickorydock_code
1 messages ยท Page 1 of 1 (latest)
๐ 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.
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)
๐ 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
Hi there! Thank you ๐
But can you also share a request ID (req_โฆ) or Payment Method ID (pi_) where you're seeing the behaviour you described?
Sure thing: pi_3SpsY4RmigaSU0y20x5QDcw4
How are you creating the Confirmation Token in this case?
const {error, confirmationToken} = await window.stripe.createConfirmationToken({elements: window.stripeElements})
We then confirm it on the server side and I'm not currently passing allow_redisplay through the create/confirm ConfirmationTokens step because the docs (https://docs.stripe.com/js/payment_intents/confirm_payment#confirm_payment_intent-options-confirmParams-payment_method_data-allow_redisplay) suggested that it will override the parameter anyway
I would set allow_redisplay there, since that's when the underlying Payment Method is created
Does seem like a bug that the override doesn't take though, right?
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.
I see, that makes sense. Thank you for your help!
But taking a step back, where is it you want to "display the last4 / expiration date for the user"?
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
hi! I'm taking over this thread. let me know if you have other questions.
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
this is a Link payment method, not a Card payment method.
so it's expected that it doesn't have a last4 property
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.
Yes, I understand, but the underlying payment is with a Card
sure, but Stripe abstract this as a "link" payment method. and you can see here all properties of the Link payment method (which doesn't includelast4): https://docs.stripe.com/api/payment_methods/object#payment_method_object-link
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?
correct
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
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.
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
makes sense.