#op84
1 messages ยท Page 1 of 1 (latest)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You can then call /confirm server-side (https://stripe.com/docs/api/payment_intents/confirm) once you've carried out your database actions
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
hm it now says The Payment Element does not support Intents created with confirmation_method=manual
it also has a problem with automatic_payment_methods: { enabled: true }
Ah, yeah. That's still in beta: https://stripe.com/docs/payments/run-custom-actions-before-confirmation
I guess you'll need to re-think your application logic flow. Why not create the order first? Or do it asynchronous with a webhook?
awesome support i was 1,5h in support chat and got nowhere ๐ thanks a lot. webhook sounds good too - on which event would i do that? processing? i mean they come in fast for creditcard for example. and they are not ordered right? could be that succeeded is before processing..
what if using the beta?
the thing is the pay button is basically the confirmation for the order.. so i can't create the order before that
You'd listen for payment_intent.succeeded events. There wouldn't be a .processing event for card payments - they're synchronous
I think webhooks are a better fit for your use case really. The beta doesn't make sense, it's more for making adjustments to the payment after you've collected payment details (like increasing the amount for a specific card brand, or something)
ok sounds good - i'm also using sepa - with that i would create it on .processing right?
what if i would use a setup intent instead of a payment intent for the first checkout? card would be instantly available but what about sepa? do you know how long that could take? same as attempting a payment with it?
SEPA payments are async so would trigger .processing events yes: https://stripe.com/docs/payments/payment-methods#payment-notification
what if i would use a setup intent instead of a payment intent for the first checkout? card would be instantly available but what about sepa? do you know how long that could take? same as attempting a payment with it?
Doesn't matter โ the SEPA payment would still be delayed/async regardless of whether you'd setup/saved the PM prior to payment
You just need to account for that in your webhook handler (i.e. only create your order on payment_intent.succeeded, not .processing)
Or maybe you create it on .processing too, but in some kind of pending state until .succeded event for the same order/payment is handled
ok amazing thanks for your help!!