zilong
zilong2w ago

how to add card

how to add credit card with flutter
26 Replies
토스페이먼츠 BOT
⏳ 잠시만 기다려주세요! 곧 답변드리겠습니다
오류 문의일 경우 아래 정보를 미리 전달해주시면, 빠른 답변에 도움이 됩니다.
- 주문번호(orderId) : - 문의 내용 :
(img를 함께 첨부해주시면 도움이됩니다)
* 계약관련 내용은 1544-7772로 문의주세요. * 주말/공휴일에는 답변이 늦을 수 있어요.
이실장
이실장2w ago
Which product are you integrating?
zilong
zilongOP2w ago
mobile app using flutter
이실장
이실장2w ago
I mean our product. Can you share us the document that you are looking at?
zilong
zilongOP2w ago
결제위젯 Flutter SDK(Version 1) | 토스페이먼츠 개발자...
결제위젯 Flutter SDK를 추가하고 메서드를 사용하는 방법을 알아봅니다.
Kimoon Lee
Kimoon Lee2w ago
You can just follow the guide? do you have any issue?
zilong
zilongOP2w ago
I can't find the guide to add a credit card
Kimoon Lee
Kimoon Lee2w ago
You just add the payment widget, it includes a credit card method.
zilong
zilongOP2w ago
But does it save the credit card to the user's account? and then add the payment widget. I call the API /v1/brandpay/payments/methods/, does it show the newly added credit card in the payment widget?
Kimoon Lee
Kimoon Lee2w ago
If so you need to integrate brandpay with payment widget.
Kimoon Lee
Kimoon Lee2w ago
브랜드페이 연동하기 | 토스페이먼츠 개발자센터
결제위젯으로 편리하게 브랜드페이를 연동하세요. 브랜드페이는 자체 간편결제 시스템을 구축하는 결제 서비스예요.
Kimoon Lee
Kimoon Lee2w ago
and to do that, you need to make a contract with us for a brandpay
zilong
zilongOP2w ago
1 . How can we determine which card (the default one) is selected for payment when there are multiple saved cards? Is it based on the selectedMethodId field?: https://docs.tosspayments.com/reference/brandpay#secretkey%EB%A1%9C-%EA%B2%B0%EC%A0%9C%EC%88%98%EB%8B%A8-%EC%A1%B0%ED%9A%8C 2. Is there a way to automatically retrieve the selected payment card information? @Kimoon Lee
이실장
이실장2w ago
Are you only planning to use Brand Pay, or will you be integrating other payment methods as well? I can guide you based on that.
zilong
zilongOP2w ago
I’m running a WebView that loads an HTML file in Flutter, and I get the error: "null is not an object (evaluating 'history.state.tosspayments')". Does this mean I must host the file on a real server, or is there another way to fix it?
이실장
이실장2w ago
Are you working for Korea Company? I want to clearly understand which payment methods and products you need to integrate, so I can provide you with the right guidance.
zilong
zilongOP2w ago
1. yes 2. i use brandpay : https://docs.tosspayments.com/sdk/v2/js#brandpayaddpaymentmethod I want to add a card from any bank, but currently I only see the method brandpay.addPaymentMethod(), which only works in JavaScript (browser). I'm developing a Flutter app, so I tried using a inappWebView to load the HTML file that uses this JavaScript. However, I encountered this error: "null is not an object (evaluating 'history.state.tosspayments')" Is there any way to make this work in Flutter? Or do I have to host the HTML file on a real server for it to work?
토스페이먼츠 JavaScript SDK | 토스페이먼츠 개발자센터
토스페이먼츠 JavaScript SDK를 추가하고 메서드를 사용하는 방법을 알아봅니다.
No description
zilong
zilongOP2w ago
No description
zilong
zilongOP2w ago
but if i test only file html localhost. it work :
No description
No description
이실장
이실장2w ago
ok now i understand the problem. I'll summarize and let you know.
이실장
이실장2w ago
First, is it correct that we should look for the UI we provide like this?
No description
zilong
zilongOP2w ago
no it like
No description
Kimoon Lee
Kimoon Lee2w ago
what is the UI for selecting the card?
zilong
zilongOP2w ago
no i can add to card.It seems I’ve managed to make it work, but there’s one remaining issue: when I open the WebView, how can I detect when the user presses the back button so that I can close the WebView?
zilong
zilongOP2w ago
No description
Kimoon Lee
Kimoon Lee2w ago
What method you called to open this window?

Did you find this page helpful?