#pawan_docs

1 messages ยท Page 1 of 1 (latest)

sturdy lionBOT
#

๐Ÿ‘‹ 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/1288093408593969152

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

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

old geyser
#

Hi @drowsy sun

drowsy sun
#

Sorry unclear from your question what exactly is the issue? Sounds like a saved card is not surfacing in hosted Checkout?

old geyser
#

yes

#

Here is the Payment form in My Checkout

So In Saved Card I am seeing only one card but i am having more then one and that one card in not the latest saved card

#

can you please go through the above doc which i provided

drowsy sun
#

What is the pm_xxx ID of the card that is not showing up?

old geyser
#

pm_1Q2WGDHBIoGyEgRJ0IVWIxhv

#

pm_1Q2WEbHBIoGyEgRJQPtdPe4F

#

allow_redisplay is always i setted customly via update payment method

drowsy sun
#

Can you share the code you use to create the Customer Session?

old geyser
#

/**

  • This is used to create a customer session for registered users to save the cards
    */
    import Stripe from 'stripe'
    import stripeApiKeys from './stripe-api-keys'

export default async function (req, res) {
const stripeAPIKeysResults = await stripeApiKeys()
const stripe = Stripe(stripeAPIKeysResults.secretkey)
const {customerId} = req.body

try {
    const customerSession = await stripe.customerSessions.create({
        customer: customerId,
        components: {
            payment_element: {
                enabled: true,
                features: {
                    payment_method_redisplay: 'enabled',
                    payment_method_save: 'enabled',
                    payment_method_save_usage: 'on_session',
                    payment_method_remove: 'enabled',
                    payment_method_allow_redisplay_filters: [
                        'always',
                        'limited',
                        'unspecified'
                    ],
                    payment_method_redisplay_limit: 3
                }
            }
        }
    })

    res.status(200).send({
        customerSession: customerSession
    })
} catch (error) {
    res.status(400).send({error: error.message})
}

}

drowsy sun
#

Taking a look

old geyser
#

As Per The Doc Follwed the Approach to show checkbox in payment page by creating customer session and passing the customerSessionClientSecret in options

drowsy sun
old geyser
#

did't got your question ?

drowsy sun
#

I asked which pm_xx is not showing in the list, you sent me two pm_xxx IDs

#

Which one of the two is it?

old geyser
#

pm_1Q2WGDHBIoGyEgRJ0IVWIxhv : Not Showing
pm_1Q2WEbHBIoGyEgRJQPtdPe4F : Showing

#

As you can see in the Doc There is Option to **See More ** in saved card Section, But Its Also Not coming for me

#

Hi @drowsy sun Are you there ?

drowsy sun
#

Yes, please be patient we're looking into it and also helping other users

old geyser
#

Sure yunoj

#

Waiting !!!!

drowsy sun
#

Can you try adding a new pm_xxx to the same customer but using a different test card, maybe 4242

#

We think that payment methods that have the same card number are deduplicated. Both pm_1Q2WGDHBIoGyEgRJ0IVWIxhv and pm_1Q2WEbHBIoGyEgRJQPtdPe4F are created from the 1111 test card so we only show one of them

old geyser
#

Hi @drowsy sun

#

pm_1Q2X9fHBIoGyEgRJ5TFiuSFy
using this 4242 card i am able to see

drowsy sun
#

Yep, so this is expected. We only list unique payment methods

#

i.e. not ones that are from the same card details

old geyser
#

Ok If We Saved Differnt card then Only It Will Show See More

#

What if We Saved one Card with different month/expiery and CVV

sturdy lionBOT
old geyser
#

Hi @drowsy sun , @boreal bramble ?

drowsy sun
#

Have some patience, please

#

Yes, the deduplication is specific to the card number

#

So you can add 1111 again with a different expiry and it should show

old geyser
#

Not Clear Can you please Elaborate

boreal bramble
#

hi there!

#

so you want to know if you add the same card twice with a different expiry date, if you will see the two cards in the Payment Element?

old geyser
#

yes

#

you are right Should i get or not

boreal bramble
#

I recommend testing this yourself. but it looks like we would show a single card in this case.

old geyser
#

I am Getting Single Card When Using Same card With different Expiry

boreal bramble
#

yes same on my end. so that answers your question.

old geyser
#

Ok Let me know One More Thing in below Scenario how to Handle

for Ex : I have Saved 2-3 Cards

4111 4111 4111 4111 12/30 999
4111 4111 4111 4111 04/25 255
4111 4111 4111 4111 01/28 858

So If There if Will Show One Card Then How Can I Place Order with Other Saved card

boreal bramble
#

but in real life users won't have the same card with different expiry dates, right? so that's not really an issue.

old geyser
#

I Am Having One More Issue Actually I am Customly setted the allow_redisplay='always' via calling the updatePayment Method but As Per the Doc It Should Not Happen,

boreal bramble
#

I don't undertsand. what's your question/issue?

old geyser
#

When we Create payment method and Sucessfully placed Order In payment method response i am Getting allow_redisplay='unspecified'

#

It Should Automatic handle by stripe when we click on checkbox

boreal bramble
#

can you share the PaymentMethod ID (pm_xxx)?

old geyser
#

PMid : pm_1Q2W1zHBIoGyEgRJLP5HKqM0

boreal bramble
#

having a look

old geyser
#

Sure Soma Take your Time

boreal bramble
#

are you sure you checked the box to save the PaymentMethod on the Payment Element?

old geyser
#

Yes I am Sure I Checked the Box and Payment is Saved for The Customer

boreal bramble
#

okay let me try to reproduce. it's possible to documentation is wrong.

old geyser
#

Yes

#

Please Don't Close The Thread Allow me 30-45mins , because if you close then again i have to describe all the issue to your collegue

boreal bramble
#

we may close this thread if it's inactive, but you can zasily reopen a new thread if needed and share a quick summary of the issue.

old geyser
#

I think there is No any Option to reopen the thread

#

Let me reverify again the Scenario

#

Now I am removing the custom code which i wrote to update paymentMethod allow_redisplay: "always"

boreal bramble
#

I think there is No any Option to reopen the thread
no, but you can open a new one.

old geyser
#

looking on it

sturdy lionBOT
old geyser
#

Hi @boreal bramble are you there

#

Let me Know if You are Available @boreal bramble

#

Hi @thorny whale Let me know if you are available.

thorny whale
#

Hey there, yep stepping in for soma who had to step away, just getting caught up

old geyser
#

Sure

thorny whale
old geyser
#

I Have removed my custom code and captured Please have a look

#

Have you gone Through ?

thorny whale
#

Yea but its long and I don't understand the pieces. Trying to come up with some questions.

#

I noticed you're using manual payment method creation, and a test card that isn't a typical stripe test card (4111). Are you sure you're confirming the intent with the created payment method? Can you share the associated intent?

#

Honestly, I can try to review but I think this would be better handled by you writing in with a clear minimal reproduction along with an instance that we can access to probe the behaviour.

old geyser
#

No We Are not Using manual Payment Method Creation It its trigrring function once all the fields are filled then Its Creating Payment methid

#

if you notice after payment intent Confirmation we are navigating to Order Confirmation page

thorny whale
#

You're specifying paymentMethodCreation: 'manual' and calling createPaymentMethod

#

That's manual payment method creation

#

If you want to use a flow like that with Saved Payment Methods, you need to use Confirmation Tokens

#

If I recall correctly, this is required for Saved Payment Methods to work like you expect

old geyser
#

in ElementsOptions ?

thorny whale
#

Yes, elements options, in the video you shared

#

That is your flow, is it not?

old geyser
#

Yes Its Mine

#

What if i Use Manual then what need to do ?

#

And When i don't use manual then ?

thorny whale
#

If you use confirmPayment without PM/CT creation, this should work as you expect

#

I'm pretty sure the reason this isn't working like you expect is becaus eof this manual PM creation flow. SPM requires using ConfirmationTokens for this pattern.

old geyser
#

Okay, I will try it out. Additionally, if this thread closes and I have any related questions, will providing this thread link allow your colleagues to access the discussion so I don't have to explain everything again?

thorny whale
#

If you open a new thread later, it will automatically link back to your recent threads ๐Ÿ™‚