#jacky_api

1 messages · Page 1 of 1 (latest)

patent shellBOT
#

👋 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/1303568756785545268

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

ripe atlas
#

Wait me a second to provide more code details

#

I followed the guide https://docs.stripe.com/api/checkout/sessions/create

        const params: Stripe.Checkout.SessionCreateParams = {
            payment_method_types: ['card'],
            ...(email && { customer_email: email }),
            customer: stripeId,   <------- ( I checked I passing the correct ID)
            line_items: [{
                price_data: {
                    currency: 'hkd',
                    product_data: {
                        name: `//`,
                        description: `//`
                    },
                    unit_amount: AMOUNTINCENTS,
                },
                quantity: 1,
            }],
            mode: 'payment',
            success_url: `//`,
            cancel_url: `//`,
            locale: locale,
            metadata: {
                customer_id: uid,
                transaction_id: transaction_id,
                payment_date: date_string,
                amount: AMOUNT,
                type: "extend_return",
                description: "extend return deadline"
            }

        };

The guide stated that A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer’s card details.
And the screen cap of the payment method I am trying to use. But the checkout seesion is not prefilled . I wonder why

quick sorrel
#

Could you share the checkout session ID (cs_xxx) that you expect the saved payment method to be prefilled, so that I can have a check why it's now showing?

quick sorrel
#

Thanks for sharing! The payment method pm_1QI0JxKHA3BqBfGBA8MEI7Q3 was created from Setup Intent directly with allow_redisplay as unspecified: https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay

When the allow_redisplay is unspecified, the payment method won't be prefilled in the Checkout Session: https://support.stripe.com/questions/prefilling-saved-cards-in-checkout

This is how you should save payment method that allows redisplaying: https://docs.stripe.com/payments/save-and-reuse?platform=web&ui=elements#enable-saving-the-payment-method-in-the-payment-element

Learn how to save payment details and charge your customers later.

ripe atlas
#

OK thx, Let me try that real quick