#Scotty
1 messages · Page 1 of 1 (latest)
You're using Checkout Sessions right? Instead of using a setup mode Checkout Session AND a PaymentIntent, you should use a payment mode Checkout Session and set payment_intent_data.setup_future_usage: off_session
Ok thanks @marsh beacon, My prices are highly variable, is there away to pass in an amount to checkout sessions rather than a price id?
You can't pass in an amount directly, but you can create one-off prices by setting price_data (https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok thank you. Doing it this way, I will still have to create a payment_intent for all future payments right, @marsh beacon ?
correct!
I just realized that this doesn't exactly solve my problem. Even when the user completes the payment on checkout session, confirming the payments been made will take some time. The item I'm selling is a local video file that I need to download on the users device once the payment's been made.
I guess is there a way to do some actions after a checkout session was completed but BEFORE the user redirect back to the page? @marsh beacon