#mangoiv

1 messages · Page 1 of 1 (latest)

ancient drumBOT
west geode
#

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

ripe kelp
#

ah never mind, the link already helps!

#

perfect

west geode
#

SetupIntents are not involved here

ripe kelp
#

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?

ripe kelp
west geode
# ripe kelp > And then when my server is ready to charge for the remaining amount, I'd call ...

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.

ripe kelp
west geode
ripe kelp
west geode
#

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

ripe kelp
#

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