#huzzi.me
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
- huzzi.me, 2 days ago, 7 messages
You can set the metadata on the Checkout Session for your own reference data: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-metadata
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
so like this
checkout_session = stripe.checkout.Session.create(
client_reference_id=request.user.id,
success_url=settings.DOMAIN_URL + 'success?session_id={CHECKOUT_SESSION_ID}',
cancel_url=settings.DOMAIN_URL + 'cancel',
payment_method_types=['card'],
mode='payment',
customer_email=request.user.email,
automatic_tax={"enabled": False},
line_items = [
{
'price_data': {
'currency': 'usd',
'unit_amount': int(total_amount_cents),
'product_data': {'name': "Your Order"},
},
'quantity': 1,
}
],
metadata={"rate_id": shipping_rate_id}
)
alright