JK
JK7mo ago

checkout url 에서 일시적인 오류

안녕하세요. toss payments api 연동 테스트중인데, 테스트 키를 써서 POST /v1/payments request 를 보내면 예상대로 200 response 를 받는데, response에 있는 checkout.url 을 사용해서 결제를 하려고 하면 스크린샷과 같이 일시적인 오류라고 뜹니다. checkout.url 은 다음과 같습니다. https://payment-gateway-sandbox.tosspayments.com/link/payment?urlToken=checkout-url-bd038018dfdb4a18b3a7dd527415ef911e0c6d408aaf40f6b420aec339d7a28b&sessionCreationApiVersion=V3&gtid=a240730b75cc8455b504d19ad17781810d8019d&flowMode=DEFAULT 여러번 시도해봤는데 계속 일시적인 오류라고 뜨는데 왜 그런지 알수있을까요?
No description
10 Replies
토스페이먼츠 BOT
⏳ 잠시만 기다려주세요! 곧 답변드리겠습니다
오류 문의일 경우 아래 정보를 미리 전달해주시면, 빠른 답변에 도움이 됩니다.
- 주문번호(orderId) : - 문의 내용 :
(img를 함께 첨부해주시면 도움이됩니다)
* 계약관련 내용은 1544-7772로 문의주세요. * 주말/공휴일에는 답변이 늦을 수 있어요.
Ayaan이안
Ayaan이안7mo ago
그렇게 호출하시면 안되고, 결제 SDK를 사용하셔야 합니다.
Ayaan이안
Ayaan이안7mo ago
연동하기 | 토스페이먼츠 개발자센터
토스페이먼츠의 간편한 결제 연동 과정을 한눈에 볼 수 있습니다. 각 단계별 설명과 함께 달라지는 UI와 코드를 확인해보세요.
Ayaan이안
Ayaan이안7mo ago
현재 불러오고 계신 checkout.url에서 기존에 제공되던 모달방식의 결제창은 https://docs.tosspayments.com/guides/v2/payment-window/integration 이 문서 참고해주세요.
카드/간편결제 통합결제창 연동하기 | 토스페이먼츠 개발자센터
토스페이먼츠 카드/간편결제 통합결제창을 연동하는 방법이에요. 구매자가 결제창에서 결제수단, 결제 정보를 선택한 뒤에 카드 또는 간편결제 앱으로 이동해요.
Kimoon Lee
Kimoon Lee7mo ago
/v1/payments request 를 어떻게 보내신것인지 확인부탁드립니다.
JK
JKOP7mo ago
widget 을 안쓰고 checkout url 을 바로 쓰려고 하는데요. 여기 영문 가이드 보면 Integrate hosted type 1번 옵션 따라 하고 있습니다. https://docs.tosspayments.com/en/integration-types#1-create-payments-api v1/payments request 는 그냥 postman 써서 authorization header 는 test key 쓰고, body 는 아래와 같이 테스트용 보냈습니다. { "orderId": "test-order-1", "orderName": "test order 1", "amount": 10000, "method": "CARD", "returnUrl": "https://google.com" } response 는 다음과 같습니다 { "mId": "tvivarepublica", "lastTransactionKey": null, "paymentKey": "tviva20240730181702f3jE0", "orderId": "test-order-1", "orderName": "test order 1", "taxExemptionAmount": 0, "status": "READY", "requestedAt": "2024-07-30T18:17:02+09:00", "approvedAt": null, "useEscrow": null, "cultureExpense": false, "card": null, "virtualAccount": null, "transfer": null, "mobilePhone": null, "giftCertificate": null, "cashReceipt": null, "cashReceipts": null, "discount": null, "cancels": null, "secret": "ps_GePWvyJnrKOOWvwK6xE6rgLzN97E", "type": "NORMAL", "easyPay": null, "country": "KR", "failure": null, "isPartialCancelable": true, "receipt": null, "checkout": { "url": "https://payment-gateway-sandbox.tosspayments.com/link/payment?urlToken=checkout-url-88d6d834ef0848828384345b02057f5416f3aad191664838a16b02e491a39c0f&sessionCreationApiVersion=V3&gtid=a2407309b07a306c5b64ca8b0593c41f57f3ed0&flowMode=DEFAULT" }, "currency": "KRW", "totalAmount": 10000, "balanceAmount": 10000, "suppliedAmount": 9091, "vat": 909, "taxFreeAmount": 0, "method": null, "version": "2022-11-16" }
Integration Types | 토스페이먼츠 개발자센터
Learn types of integrating Toss Payments into your website.
이실장
이실장7mo ago
아래 docs에 있는 샘플 request입니다. 파라미터 값들 확인해보세요
curl --request POST \
--url https://api.tosspayments.com/v1/payments \
--header 'Authorization: Basic dGVzdF'\
--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 dGVzdF'\
--header 'Content-Type: application/json' \
--data '{"method":"CARD","amount":15000,"orderId":"a4CWyWY5m89PNh7xJwhk1","orderName":"토스 티셔츠 외 2건","successUrl":"http://localhost:8080/success","failUrl":"http://localhost:8080/fail"}'
JK
JKOP7mo ago
successUrl 과 failUrl 로 바꾸니까 되네요. 저는 이 doc 을 보고 returnUrl 이 required 라고 해서 따라했는데요. doc 가 잘못된건가요? https://docs.tosspayments.com/en/api-guide#create-payment
Integrate Payment APIs | 토스페이먼츠 개발자센터
Learn how to integrate Toss Payments APIs
이실장
이실장7mo ago
우선 특정 파라미터에서만 먹히는 값입니다. success/failUrl로 사용해주세요
토스페이먼츠 BOT
❤️ 기술문의 경험이 어떠셨나요?!
간단히 코멘트 남겨주세요! 제품 발전에 큰 힘이 됩니다.

Did you find this page helpful?