#Pavan-payments
1 messages · Page 1 of 1 (latest)
@dreamy coyote hi! Yes those are still 'valid', they are two different ways to integrate and have fairly meaningful differences.
For the 1) point it's because you'd have to refactor the backend to create Subscription objects and change the frontend flow, by implementing https://stripe.com/docs/billing/subscriptions/elements.
For the 2) point it's that as it says, you have to build the error handling and such(e.g. read the error resolved from the promise returned from https://stripe.com/docs/js/payment_intents/confirm_card_payment and display it somewhere on your page, and so on).
All examples covered here right https://stripe.com/docs/billing/subscriptions/elements.
Just wondering is it so complex to implement Custom flow comparing with prebuilt flow ?
it is definitely more complex yes, hard to quantify since it depends on how many development resources you have/your own experience etc
I'd bias heavily towards using Checkout(the prebuilt flow) unless you really need to have a whitelabel payment page on your own site, you get a bunch of advantages with it(like Apple/Google Pay with no extra work, handles 3D Secure authentication flows, easier to add additional flows(like subscriptions) and new payment methods as your business grows, and so on).
The major use case for me to consider custom flow is because of limitations of Customer Portal. We have 2 products in a subscription and customer portal is not allowing me to update quantities. Which is why we are planning to move to custom flow instead of prebuilt checkout
Our use case is to support Create/Update/Cancel subscription and update payment details with multiple products, how to achieve this ?
@outer umbra
well you can use Checkout to create the subscription and then you own custom code to change the quantities, that's unrelated
Our use case is to support Create/Update/Cancel subscription and update payment details with multiple products, how to achieve this ?
you'd build a page/webapp with those options and then call the appropriate backend APIs (https://stripe.com/docs/billing/subscriptions/cancel or https://stripe.com/docs/billing/subscriptions/upgrade-downgrade etc )
While updating subscription in our page, we would like to show how much we are charging immediately and how much change in invoice amount from next billing cycle. Can we show that info easily ?
sure, https://stripe.com/docs/api/invoices/upcoming can be used for that (see https://stripe.com/docs/billing/subscriptions/prorations#preview-proration)
This is after update of subscription ? Before update is it possible to get this ?
yes you can get it before
you call the upcoming endpoint and it lets you pass various parameters describing the update you're about to make ; those docs cover it.
How to update customer's card details without using Customer Portal ?
the easiest way is to use Checkout! https://stripe.com/docs/payments/checkout/subscriptions/update-payment-details
or if you want a custom form then it's https://stripe.com/docs/payments/save-and-reuse to use a SetupIntent to add the card to the customer
Thanks @outer umbra . One last question i can ask in another thread if required. How stripe pass the card details securely if we are using Customflow ?
the Elements are iframes that are not on your own page so the card details are sent directly to us
This will be used in the middle of subscription right ?
it can be yes, you can create a SetupIntent and accept a card from the customer at any time you want