neerosity
neerosity3y ago

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?
8 Replies
토스페이먼츠 BOT
⏳ 잠시만 기다려주세요! 곧 답변드리겠습니다
오류 문의일 경우 아래 정보를 미리 전달해주시면, 빠른 답변에 도움이 됩니다.
- 주문번호(orderId) : - 문의 내용 :
(img를 함께 첨부해주시면 도움이됩니다)
* 계약관련 내용은 1544-7772로 문의주세요. * 주말/공휴일에는 답변이 늦을 수 있어요.
neerosity
neerosityOP3y ago
@Ayaan can you help here ? 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 ? yes 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 yes so, that I can control how much needs to pay based on product price in db. business number ? payment will be collected on dashboard of toss payments correct yes, but how I can create such link 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 okay, then ? 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 ? I can't use
curl --request POST \
--url https://api.tosspayments.com/v1/payments \
--header 'Authorization: Basic dGVzdF9za196WExrS0V5cE5BcdtbzUwblgzbG1lYXhZRzVSOg==' \
--header 'Content-Type: application/json' \
--data '{"method":"CARD","amount":15000,"orderId":"a4CWyWY5m89PNh7xJwhk1","orderName":"토스 티셔츠 외 2건","successUrl":"http://localhost:8080/success","failUrl":"http://localhost:8080/fail"}'
curl --request POST \
--url https://api.tosspayments.com/v1/payments \
--header 'Authorization: Basic dGVzdF9za196WExrS0V5cE5BcdtbzUwblgzbG1lYXhZRzVSOg==' \
--header 'Content-Type: application/json' \
--data '{"method":"CARD","amount":15000,"orderId":"a4CWyWY5m89PNh7xJwhk1","orderName":"토스 티셔츠 외 2건","successUrl":"http://localhost:8080/success","failUrl":"http://localhost:8080/fail"}'
something like this ? getting Failed to connect to api.tosspayments.com port 443 after 151011 ms: Couldn't connect to server not working, even if I turned off firewall what card details i can enter for test payment
이실장
이실장3y ago
I dont get which step that you met the error
토스페이먼츠 BOT
❤️ 기술문의 경험이 어떠셨나요?!
간단히 코멘트 남겨주세요! 제품 발전에 큰 힘이 됩니다.
neerosity
neerosityOP3y ago
the checkout page shows everything in korean? can I change it to english ?
이실장
이실장3y ago
Can you share me in image that you want to provide in eng?
neerosity
neerosityOP3y ago
No description
이실장
이실장3y ago
We only provide in Kor. If you send
useInternationalOnly: true
useInternationalOnly: true
parameter, you can see in Eng. But you can only choose MASTER, VISA, JCB, UNION .

Did you find this page helpful?