#mangoiv
1 messages · Page 1 of 1 (latest)
hi!
I would use a CheckoutSession for the deposit amount (https://stripe.com/docs/payments/accept-a-payment) and set the options so the payment method used is saved to the Customer object:
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage
And then when my server is ready to charge for the remaining amount, I'd call the backend API to confirm a new PaymentIntent on the saved card.
https://stripe.com/docs/payments/save-during-payment?platform=web#charge-saved-payment-method
do I send to requests? afaict when setting mode to Payment, I do not get back a setup intent
ah never mind, the link already helps!
perfect
SetupIntents are not involved here
And then when my server is ready to charge for the remaining amount, I'd call the backend API to confirm a new PaymentIntent on the saved card.
can I have Stripe invoice the customer or would I have to create those mails myself?
yeah, I figured, I should've read the links carefully first. Thank you
not sure what you mean by 'mails' in this context. If you have a saved payment method(that you collected during the payment of the deposit), you can initiate a payment attempt on it from the backend without the customer's involvement.
In general the only way you could have Stripe automatically create the payment for you at a certain time would be to use Subscriptions, but this doesn't sound like recurring payments(rather it's one-off payments on a saved card) so that doesn't feel like a good fit, and scheduling your own logic to call the API seems to fit.
right, so this aims at a scenario where the customer is involved in what way? I.e. if I charge the card for the remaining amount, the user has to do what?
I imagine it to work something like the (Stripes) invoice product, where I have the user receive a mail at a certain point which contains a link to another checkout session that approves the remaining amount.
it's up to you, you can just create a PaymentIntent against the saved card and attempt the payment on the backend(https://stripe.com/docs/payments/save-during-payment?platform=web#charge-saved-payment-method), or if you want you can email the customer a link to a page on your website and that page can create + redirect to a new CheckoutSession; there are multiple ways to implement this ,depends on your business use case.
right, thank you, I have an idea of how to implement this myself, I was mainly looking for off-loading this to stripe as I know that you have a product that does this (I think) https://stripe.com/docs/invoicing/send-email
you could use that too, yes
you still need to call the API to create the Invoice at the time you want, to be clear
Sure. That’s unfortunate. But I’ll have to create another service anyways that does recurring tasks nightly so that’s necessary evil i guess