#SusanP-checkout

1 messages ยท Page 1 of 1 (latest)

tight path
#

Hi there ๐Ÿ‘‹ taking a look now

#

Additionally, is there a way to make the payment conditional upon the shopper returning to the cart to complete their order?
You should make sure to listen for the checkout.session.completed event and fulfill your orders using it instead of relying on the cart (if you can help it)

nova atlas
#

Thanks two-shoes. I am not trying to set up future payments. I really just want to take a payment for a shopping cart and know that the payment will go through. Stripe seems to make that impossible, in an effort to be more robust. So no, I don't think it's future payments I want. It's a "now" payment, so to speak.

And when the customer returns from the stripe-hosted page to the cart, I could wait until the event is sent before showing them the order confirmation page, but if the event isn't sent within seconds, that would be a poor experience for the user.

I guess I really need to know if there is a way for Stripe to work like a normal credit card processor, where processing happens "while you wait", and the order isn't creating until/unless the payment is completely successful

#

sorry...that should be "al the order isn't created"

tight path
#

If a payment is being created through Checkout, it will error out if the payment is unsuccessful, so it should be happening "while you wait" already. The exception is for some non-card payment types that happen asynchronously, but those are the exceptions.

nova atlas
#

ok that's great. and are they always already captured, instead of just pre-authorized?

tight path
nova atlas
#

perfect. and then no need for a separate capture, correct?

obsidian mirage
#

That is not needed unless you explicitly use parameters to set manual capture

nova atlas
#

thanks synthrider and two-shows!

#

shoes oops ๐Ÿ™‚

obsidian mirage
#

NP!

nova atlas
#

oh one last thing. do we have to pass the shipping, charges, tax rate, etc to checkout? we can't just pass the order total?

obsidian mirage
#

I'd suggest taking a look through that to see if it covers what you need

nova atlas
#

I'm actually trying to avoid all of that - I've seen it already and have it working, but my client would rather just pass the total and nothing else

obsidian mirage
#

That's fine too then ๐Ÿ™‚

#

And you can manage what all that includes in your own systems

nova atlas
#

perfect, that's exactly what I want. thank you again

#

i'm going to try it now so I can come back if I have any trouble with the message data!

obsidian mirage
#

Good luck!

nova atlas
#

Thanks but...no ๐Ÿ˜‰ Without passing line items I get back this: The line_items parameter is required in payment mode

#

i also don't see where I can pass a simple "total" or "amount"

obsidian mirage
#

Well yes, you'd still need to pass a line item, 1 line item wiht the total

nova atlas
#

oh!

#

duh ๐Ÿ™‚

#

last thing, I think. my success url needs to do backend processing on my side to convert the cart to an order. if that fails, the payment will still have gone through, correct? if so i just need to tell my client to watch out for it

obsidian mirage
#

Whoops missed this update

#

Sorry for the delay

#

Yes, but we recommend using webhooks for this, using checkout.session.completed events

nova atlas
#

i could use that to send off a message. thank you and have a great day!