#dominik_error

1 messages ยท Page 1 of 1 (latest)

sturdy jackalBOT
#

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

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

sterile drift
#

This is the code I use to create my sessions if that helps

    const session = await stripe.checkout.sessions.create({
      metadata: {
        // we will use this in our webhooks 
        priceId: priceId,
        userId: userId,
        serverId: serverId,
        monthly: monthly,
      },
      allow_promotion_codes: true,
      payment_method_types: ["card", "paypal", "sofort", "link"],
      line_items: [
        {
          price: priceId,
          quantity: 1,
        },
      ],
      mode: "subscription",

      // normally you would redirect to a succes page/onboarding page
      success_url: `${req.headers.get("referer")}/success?type=${monthly ? "monthly" : "annualy"}&server=${serverId}`,

      cancel_url: `${req.headers.get("referer")}`,
    });
pulsar tendon
pulsar tendon
#

I'd recommend talking to our support team about this

#

they can help enable this on your account

sterile drift
#

Oh yea I requested those a few days ago

#

I had another small question im using payment_method_types: ["card", "paypal", "sofort", "link"], in my code do I need to add something to make google/apple pay work?

pulsar tendon
#

No. Google Pay/Apple Pay are considered card type payment methods. They don't need to be specified separately

sterile drift
#

Alright awesome thank you!

pulsar tendon
#

NP! ๐Ÿ™‚ Happy to help