#quizford_best-practices

1 messages ¡ Page 1 of 1 (latest)

broken pastureBOT
#

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

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

magic magnet
#

Hello hanzo, so i am trying to reuse the payment info for a saved customer (me and the test card).

after a initial payment i see that my data is logged in the stripe dashboard, however when i want to top up the account an populate a new payment intent the data does now autofill even though i am still logged in as the same account and the data is there

opaque olive
#

When you say "top up the account", what does that mean?

magic magnet
#

so i have a small setup that allows the user to add 5$ to their act. then i hit 'Add $5', wich populates the payment intent again

opaque olive
#

Right, what customer ID are you reusing when you create the PaymentIntent? Can you share the ID?

magic magnet
#

cus_R1xL8KU8csUyOk

opaque olive
#

payment_method_data.allow_redisplay is unspecified on the payment method you've attached to that customer. This means it won't be automatically displayed on the checkout form

magic magnet
#
const appearance = {
  elementType: "expressCheckout",
  availablePaymentMethods: {
    applePay: true,
    googlePay: false,
    //paypal: false,
    //link: false,
    //amazonPay: false,
  },
  theme: "night",
  variables: {...

so am i just missing the optionality here ?

opaque olive
#

Hmm can you clarify what Stripe Element you're using? Your code above suggests you're using Express Checkout Element but the request that attached the payment method shows you're using PaymentElement

magic magnet
#
    const paymentIntent = await stripe.paymentIntents.create({
      amount,
      currency: "usd",
      customer: customer.id,
      automatic_payment_methods: { enabled: true },
      payment_method_options: {
        card: {
          setup_future_usage: "off_session",
        },
      },
    });
opaque olive
#

That's your server-side code..