I need help with payment integration
Hi, I am using nestjs for backend and react for frontend
now, I want to create some link using backend which I can give as response to frontend and it will pay using that link
after payment completes, I can fetch that record using wehook
is it possible?
39 Replies
⏳ 잠시만 기다려주세요! 곧 답변드리겠습니다
오류 문의일 경우 아래 정보를 미리 전달해주시면, 빠른 답변에 도움이 됩니다.
- 주문번호(orderId) :
- 문의 내용 :
(img를 함께 첨부해주시면 도움이됩니다)
* 계약관련 내용은 1544-7772로 문의주세요.
* 주말/공휴일에는 답변이 늦을 수 있어요.
@Ayaan can you help here ?
Yes,
so, I have backend in which I want to create a payment link that I can send back to frontend
and when user pay using that it should use webhook to update based on event type. is it possible ?
So, you want to make a link for making payment using the backend, right?
yes
Umm it is little bit unclear.
The link of payment means a shopping mall page?
like..
(korean image, sorry) like this, right?

yes, something like I have a product ,
frontend will request for buying a product
so backend will check that product in backend and create a payment link or checkout link
that frontend can redirect and complete payment
I've got it.
your "link" means checkout link right?
yes
so, that I can control how much needs to pay based on product price in db.
and product owner has a business number, right?
then actually you can to make a system
business number ?
it is possible
In korea - we have a business number -
payment will be collected on dashboard of toss payments correct
Both works
You can check it in dashboard
yes, but how I can create such link
We sent back to your backend server if payment happens
curl --request POST \
--url http://api.tosspayments.com/v1/payments \ --header 'Authorization: Basic dGVzdF9za19ZWjFhT3dYN0s4bUtXMEQ5TUVtVnlReHp2TlBHICsgOg==' \ --header 'Content-Type: application/json' \ --data '{"method":"카드","amount":15000,"orderId":"a4CWyWY5m89PNh7xJwhk1","orderName":"토스 티셔츠 외 2건","successUrl":"http://localhost:4242/success","failUrl":"http://localhost:4242/fail"}' I was tying this, but it throws timout error
--url http://api.tosspayments.com/v1/payments \ --header 'Authorization: Basic dGVzdF9za19ZWjFhT3dYN0s4bUtXMEQ5TUVtVnlReHp2TlBHICsgOg==' \ --header 'Content-Type: application/json' \ --data '{"method":"카드","amount":15000,"orderId":"a4CWyWY5m89PNh7xJwhk1","orderName":"토스 티셔츠 외 2건","successUrl":"http://localhost:4242/success","failUrl":"http://localhost:4242/fail"}' I was tying this, but it throws timout error
I've got it. You don't need to use this API.
okay, then ?
https://docs.tosspayments.com/guides/payment-widget/integration please refer this link
결제위젯 연동하기 | 토스페이먼츠 개발자센터
토스페이먼츠 결제위젯 연동 가이드입니다. 내 상점의 주문서 페이지에 최적의 주문서 UI를 연동하세요. 결제 연동하기 가장 편리한 로우코드(Low-code) 솔루션입니다.
you can use in-browser translator
yes, but it means, I am creating checkout link on frontend ?
sorry, I am not familiar with this.
so, steps will be
1. creating checkout using html
2. user will proceed and do payment
3. on success url page I will get response along with paymentKey
4. then what is approve payment ?
1. Not creating, You import and calling SDK in HTML.
then our SDK will redirect to your redirecturl
then you should call to approve payment API
In addition, https://docs.tosspayments.com/guides/international/index this link is also help understand Korea payment system
International Merchants Guide | 토스페이먼츠 개발자센터
Understand the features and flow of Korean card payments and integrate TossPayments.
@neerosity
I can't use
something like this ?
getting
Failed to connect to api.tosspayments.com port 443 after 151011 ms: Couldn't connect to server
You must allow firewall for communicating our API
방화벽 설정 | 토스페이먼츠 개발자센터
토스페이먼츠 API를 안전하게 사용할 수 있는 방화벽 설정을 알아봅니다. 방화벽은 외부의 신뢰할 수 없는 네트워크가 내부 네트워크에 접근하지 못하도록 하는 보안 시스템입니다. 특정 포트나 IP에서 들어오는 요청을 필터링하거나, 사용자 인증 요청, 프록시, 주소변환기능(NAT) 등의 방법이 있습니다.
not working, even if I turned off firewall
what card details i can enter for test payment
I dont get which step that you met the error
❤️ 기술문의 경험이 어떠셨나요?!
간단히 코멘트 남겨주세요! 제품 발전에 큰 힘이 됩니다.
the checkout page shows everything in korean? can I change it to english ?
Can you share me in image that you want to provide in eng?

신용/체크카드 - Credit/Debit Card
카드사 - Card Company
* 네이버페이 - Naver Pay (Easy Pay)
카드 재선택 - Reselect card company option
"네이버페이 결제에 카드와 포인트를 함께 사용할 수 없어요." - You cannot use card payment and point same time
카드 결제 - Card
포인트 결제 - Point
현금영수증 - Receipt for Tax refund
소득공제용(현금영수증카드) - For tax refund(or case of tax refund card)
발급번호를 입력해 주세요 - Please put the phone/card number that you want to take receive receipt
이메일(선택) - Email (Optional)
구매 내용에 동의하시면 다음 버튼을 눌러주세요. - If you agree the information in this page, please click "Next" button.
다음 - Next
I have translated for just texts
We only provide in Kor.
If you send parameter, you can see in Eng. But you can only choose MASTER, VISA, JCB, UNION .
Just note: if you send this option, maybe your UI is fixed to old ui(xpay), not new ui