#kanonhian

1 messages · Page 1 of 1 (latest)

worldly kernelBOT
verbal sluice
#

hi

balmy berry
#

If you have a payment method already saved for future payments, you can see how to use that here, for example:
https://stripe.com/docs/payments/save-and-reuse?platform=web#charge-saved-payment-method

You can also set the payment method up as the default payment method for invoice payment for a customer, or specify it for subscription payments:
https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method
https://stripe.com/docs/api/subscriptions/create#create_subscription-default_payment_method

What have you tried alreayd? WHat isn't working for you?

Learn how to save card details and charge your customers later.

verbal sluice
#

I mostly use checkouts, but having to do it all by myself is a little complicated

#

so, having the payment method I can do all the other stuff?

balmy berry
#

Then I'd suggest sticking with Checkout if that works for you!

#

Well for supported payment methods properly set up for future payments you could charge later with your own code, but yes you'll need to build that

verbal sluice
#

think I get so. So basically I create an incomplete subscription attached to my payment method.

#

But then how do I actually bill the customer? Through a Charge object?

#

or perhaps a Payment Intent?

balmy berry
verbal sluice
#

Oh I see. The miissing piece was the PaymentIntent. Basically, create a paymentintent and returning its hash or whatever, so client-side we perform confirmPayment() and cycle closes

#

But in case paymentintent fails, what happnens with the incomplete subscription?

plain burrow
#

Hi there! Stepping in for my colleague and catching up

verbal sluice
#

nah

#

its cool

plain burrow
verbal sluice
#

so, I would have to invalidate/wipe it off by myself?

plain burrow
#

I'm not sure I follow. Invalidate what exactly? The subscription remains incomplete (not active) and the invoice remains open (still awaiting payment)

verbal sluice
#

yes sorry, I was talkin about my webhooks. never mind

#

Thank you both guys

#

may I ask you one last thing?

plain burrow
#

sure!

verbal sluice
#

what is the server side equivalent of this stripe.confirmPayment()?

plain burrow
#

Yep, that's it!

verbal sluice
#

thanks my friend

#

really really thnks