#Masud

1 messages · Page 1 of 1 (latest)

long krakenBOT
lucid harbor
#

Can you elaborate on what you mean by 'custom params'?

lilac coral
#

i wanna send a user_id:string so i know who subscribed so i can update my database.

#

I assume i put it somewhere in here

session = Stripe::Checkout::Session.create({
      line_items: [{
        # Provide the exact Price ID (e.g. pr_1234) of the product you want to sell
        price: 'price_1Ls5u0IWc5b6XPSDoTgMatgM',
        quantity: 1,
      }],
      mode: 'subscription',
      success_url: domain + '/customs/new',
      cancel_url: domain + '/cancel.html',
    })
    @payment_url = session.url
lucid harbor
lilac coral
#

client_reference_id makes more sense thx

#

This client_reference_id should show up on the webhook endpoint for checkout.session.completed, right?

#

Not sure if i put it in incorrectly

Stripe.api_key = stripe_api_key
    domain = 'https://queue.ngrok.io'
    session = Stripe::Checkout::Session.create({
      line_items: [{
        # Provide the exact Price ID (e.g. pr_1234) of the product you want to sell
        price: price,
        quantity: 1,
      }],
      mode: 'subscription',
      success_url: domain + '/customs/new',
      cancel_url: domain + '/cancel.html',
      client_reference_id: Organization.last.token
    })
    @payment_url = session.url
lucid harbor
#

It will, yep! Looks good to me

lilac coral
#

Not appearing for me, and there's a SO post about it

#

i'll try again to double check.

#

nvm it shows thanks

lucid harbor
#

All good?

lilac coral
#

yep thanks!