#olli-prbutton

1 messages · Page 1 of 1 (latest)

feral tulip
#

hello, yes you can get a card PaymentMethod from PaymentRequest Button for subs

dense sparrow
#

is there docs on doing that? cant seem to find them

feral tulip
dense sparrow
#

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

feral tulip
#

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

dense sparrow
#

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

zinc depot
#

👋 @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?

dense sparrow
#

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

zinc depot
#

"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

Collect payment and address information from customers who use Apple Pay, Google Pay, and browser-saved cards with Payment Request APIs such as Microsoft Pay on Edge.

dense sparrow
#

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)?

zinc depot
#

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.

dense sparrow
#

got it! the payment method doesn't expire if it isn't attached right?

zinc depot
#

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