#lmifflen
1 messages · Page 1 of 1 (latest)
Yes there is a client_reference_id parameter that you can pass an arbitrary value in to when creating the session https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-client_reference_id
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Okay. So if using the stripe checkout method with python integration instead of adding it as a query param like i was doing previously, I would be able to add it into the actual checkout session like this?
line_items=[
{
# Provide the exact Price ID (for example, pr_1234) of the product you want to sell
'price': '{{PRICE_ID}}',
'quantity': 1,
},
],
mode='payment',
success_url=YOUR_DOMAIN + '?success=true',
cancel_url=YOUR_DOMAIN + '?canceled=true',
automatic_tax={'enabled': True},
customer_reference_id = user
)
``` ?
Yes, that should work. I would recommend running code like that in test mode to see how it play out