#nikivi

1 messages · Page 1 of 1 (latest)

austere steppeBOT
stray junco
#

for example I wanted to run this on userCreate

ashen igloo
#

No the urls expire after 24 hours without payment

stray junco
#

ok i see, thank you

ashen igloo
#

As you get a permanent link

stray junco
#

they work on subscriptions too

#

with metadata passing?

#

You can use Payment Links to sell a product or service, start a subscription

#

ok seems to be perfect indeed

#

or actually

#

this doesn't make sense

#

how can metadata be passed

#

with perma link

#
  try {
    const normalSubscription = await stripe.checkout.sessions.create({
      success_url: process.env.STRIPE_SUCCESS_URL!,
      mode: "subscription",
      metadata: {
        userDetailsId: userDetailsId,
      },
      line_items: [
        {
          quantity: 1,
          price: process.env.STRIPE_10_SUBSCRIPTION!,
        },
      ],
    })
#

userDetailsId is unique to user trying to pay

ashen igloo
#

If you need metadata then just use checkout

#

payment links are more convenient for no-code users

stray junco
#

so stripe.checkout.sessions.create

ashen igloo
#

but don't have as much functionality