TossPay SDK v2 issue
Hello Toss Team !
I hope you're doing well.
I'm facing an issue with the v2 SDK. My goal is to load the v2 javascript file to open my checkout page.
I got my checkout url in the
https://api.tosspayments.com/v1/payments
api response.
But when I tried to load the javascript v2 lib, I got this error in my console:
I'm pretty sure that I don't refer the v1 documentation anywhere in my code, so I don't understand this issue.14 Replies
⏳ 잠시만 기다려주세요! 곧 답변드리겠습니다
오류 문의일 경우 아래 정보를 미리 전달해주시면, 빠른 답변에 도움이 됩니다.
- 주문번호(orderId) :
- 문의 내용 :
(img를 함께 첨부해주시면 도움이됩니다)
* 계약관련 내용은 1544-7772로 문의주세요.
* 주말/공휴일에는 답변이 늦을 수 있어요.
First, please check if you have imported the JS from https://js.tosspayments.com/v1/* at some point.
I just find the issue
And, if you're using React or Vue, please do not import the JS programatically, use our official React/Vue implementation that is available in npm
My core widget already had a PaymentWidget component
This often causes the browser-specific issue, so please refain it
If so, use V1 SDK for every your needs
okay, thank you but I can't find any documentation on how I can open a checkout url page. Do you know about it @Minsu Kim ?
because I already created the payment by api and I have all information related to the order (order_id, paymentKey, ...).
Payment APIs | 토스페이먼츠 개발자센터
The Payment APIs are essential to integrating Toss Payments, whether you are only using our APIs or our SDKs.
Use this API to create the payment, and open the URL that from checkout.url
just window.open() is fine
The payment had to be created by api in my spring app. I can't use this create payment method in the front
Yup
You should create the payment from your BE, and send only checkout.url to FE using AJAX
And, as soon as you receive the URL from BE to FE, open the URL with window.open() or location.assign()
Okay, I got it, so no need to use the js library for my usage ?
No you dont