Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
513 views
in Technique[技术] by (71.8m points)

java - How to show saved card page in stripe checkout-one-time-payments

I am using checkout-one-time-payments for stripe for subscription and one time payments.This is the demo link from stripe https://70p1h.sse.codesandbox.io/.

I am able to successfully collect payments for one time and subscription products . What I want to do now is to show a page that shows all the saved cards for the particular user if user has already made payment from stripe and then if user selects the pre saved card ,I want to move the customer direct to payment confirmation or failure. Dont want the user to re enter the card details and other info

I am using following code in backend for java

SessionCreateParams.Builder builder = new SessionCreateParams.Builder()

                

                .setSuccessUrl(createcheckoutSessionRequest.getSuccessUrl() + "?session_id={CHECKOUT_SESSION_ID}").setCancelUrl(createcheckoutSessionRequest.getFailureUrl())
                .addPaymentMethodType(PaymentMethodType.CARD)
                .setMode(product.getIsSubscriptionProduct() ? SessionCreateParams.Mode.SUBSCRIPTION
                        : SessionCreateParams.Mode.PAYMENT)

I am quite confused with all these docs ,I am not able to find the actual scenario in docs ,any help will be really appreciated. Thanks


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Using a customer's saved cards is not something that is currently supported by Checkout.

If you want to build this functionality yourself you'd have to do the following:


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...