#olli-prbutton
1 messages · Page 1 of 1 (latest)
is there docs on doing that? cant seem to find them
ah so the paymentmethod event returns an object which contains a payment method, which i can then save client/server side?
well, attach to a customer
correct, it will return a PaymentMethod and you attach it to a Customer server-side, then create a Subscription on that Customer and that new PaymentMethod you just attached
what do i do with the total? do i set pending to true to not charge them, or do i just not confirm the payment (which would be the first payment amount im assuming)?
^ found out how to provide order details, so this should be fine
👋 @feral tulip had to hop off, but I can step in! Just give me minute to catch up
"found out how to provide order details, so this should be fine" -> Do you have everything figured out then?
i still dont know how i should handle the authorisation. do i just not collect the funds i get authorised for from gpay / apply pay, and then charge the payment method when needed?
for a bit of context, my company is a startup that has partnered with stripe. we manage payment and subscription infrastructure. we integrate with multiple payment gateways including stripe and paypal. we provide the option to have us manage the subscription billing fully (where we make the charge requests) or let the gateway manage it. i need to make sure i can save that payment method that is provided and use it either for a stripe managed subscription or future payments initiated via connect (standard accounts). idk if that makes sense or not
"i still dont know how i should handle the authorisation. do i just not collect the funds i get authorised for from gpay / apply pay, and then charge the payment method when needed?" -> Just want to check - are you actually calling confirmCardPayment like our docs (https://stripe.com/docs/stripe-js/elements/payment-request-button#html-js-complete-payment)? The call to confirmcardPayment is what's actually authorizing + capturing the funds. If you don't want to do that, you don't have to
so just to confirm, i just pass the payment method data from ev.paymentmethod for the server to handle + attach/store the method, and then it can either create the subscription with stripe or take the first payment(s)?
Yup! You want to take the ev.paymentmethod and send that to your server to attach it to the customer, and then you can use it with a subscription.
got it! the payment method doesn't expire if it isn't attached right?
No, it doesn't expire - but if it isn't attached it can only be used once. After it's been used in a payment it'll then be consumed and can't be used again