#Brian-Checkout
1 messages · Page 1 of 1 (latest)
Hi there, can you tell me what you want to achieve here?
Ok, you don't need to specify an amount with SetupIntent. What SetupIntent API do is collecting payment details from your customer and save for future use.
You only specify the amount when you want to charge the customer.
OK. Are we looking at the wrong method "setup" using the pre-built to achieve this? Could we do it with the SessionPaymentIntentDataOptions wth the prebuilt checkout? It's a little confusing.
We need to specify a price
Basically we need to replicate what we have done with the custom "off_session" payment intent but with the pre-built checkout.
"You only specify the amount when you want to charge the customer." - I don't think this is true. When setting up an off_session payment an amount is required or at least accepted but the customer is not charged,
At least for creating the paymentintent
You don't need to specify the amount even when setting up the off_session usage, it's not required.
Or are you talking about manual capture? e.g., hold the money for up to 7 days and charge the customer later?
But we need to. We need to send prices so they display in the pre-built. I think we figured it out. We just need to set it to an off_session payout using the SessionPaymentIntentDataOptions of the pre-built checkout. "setup" was the wrong choice.
one last quick question. using the prebuilt checkout - how do we specify returning the payment intent id using the callback URL. We are currently getting the session id back by using this query append
?session_id={CHECKOUT_SESSION_ID}
How can we set it to return the creatd paymentintent id instead
The paymentIntent ID is inside the checkout session object
So once you have the checkout session ID, retrieve the checkout session object and look for the paymentIntent ID https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-payment_intent
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Thanks. is the checkout sessionID the only optin we have with the code above? {CHECKOUT_SESSION_ID} Where is the documentatiojn on the options for appending the query string of the callback URL
We want to avoid a 2nd call as all we need is the newly created payment intent id
You can also listen to webhook event checkout.session.completed to get the checkout session object.
Thanks but that is not what I asked. Can you point us to the docs for the query string options or is that the only option
The Checkout redirection will only return the checkout session ID, you can't get the PaymentIntent ID directly through redirection
OK. Thanks