웹도어
웹도어5mo ago

키인결제 시 "필수 파라미터가 누락되었습니다." 리턴

https://api.tosspayments.com/v1/payments/key-in 로 데이터 {"amount":"1000","orderId ":"MT242984757118","cardNumber":"1234123412341234","cardExpirationYear":"2029","cardExpirationMonth":"02","orderName":"AAAA","customerIdentityNumber":"810101","cardPassword":"10","cardInstallmentPlan":0,"customerEmail":"p_nac@naver.com","customerName":"\uD14C\uC2A4\uD130"} 를 보내는 경우 {"code":"INVALID_REQUEST","message":"필수 파라미터가 누락되었습니다."} 가 리턴됩니다. https://docs.tosspayments.com/guides/payment/key-in#%EC%B9%B4%EB%93%9C-%EB%B2%88%ED%98%B8-%EA%B2%B0%EC%A0%9C%ED%82%A4%EC%9D%B8-%EA%B2%B0%EC%A0%9C-api%EB%A1%9C-%EC%97%B0%EB%8F%99%ED%95%98%EA%B8%B0 키와 시크릿은 별도로 발급받은 항목으로도 해당 페이지에 있는 값으로도 되고 있지 않습니다. oXmlhttp.setRequestHeader "Content-Type", "application/json" oXmlhttp.setRequestHeader "CharSet", "UTF-8" oXmlhttp.setRequestHeader "Authorization", "Basic " 해당 인증값은 해당 페이지에 존재하는 시크릿키로 로 생성한 내용입니다. 어떤값이 빠졌는지 리턴이 되지 않아 진행이 안되고 있습니다. 해당 내용 확인 요청드립니다.
카드 번호 결제(키인 결제) API로 연동하기 | 토스페이먼츠 개발자센터
고객이 직접 카드 번호를 입력해서 결제할 수 있는 카드 번호 결제 API를 연동해보세요.
11 Replies
토스페이먼츠 BOT
⏳ 잠시만 기다려주세요! 곧 답변드리겠습니다
오류 문의일 경우 아래 정보를 미리 전달해주시면, 빠른 답변에 도움이 됩니다.
- 주문번호(orderId) : - 문의 내용 :
(img를 함께 첨부해주시면 도움이됩니다)
* 계약관련 내용은 1544-7772로 문의주세요. * 주말/공휴일에는 답변이 늦을 수 있어요.
이실장
이실장5mo ago
BadRequestError => Message: JSON parse error: Instantiation of [simple type, class im.toss.blitz.api.dto.request.PaymentKeyInRequest] value failed for JSON property orderId due to missing (therefore NULL) value for creator parameter orderId which is a non-nullable type; nested exception is com.fasterxml.jackson.module.kotlin.MissingKotlinParameterException: Instantiation of [simple type, class im.toss.blitz.api.dto.request.PaymentKeyInRequest] value failed for JSON property orderId due to missing (therefore NULL) value for creator parameter orderId which is a non-nullable type
at [Source: (org.springframework.util.StreamUtils$NonClosingInputStream); line: 1, column: 299] (through reference chain: im.toss.blitz.api.dto.request.PaymentKeyInRequest["orderId"])
Url => https://api.tosspayments.com/v1/payments/key-in
BadRequestError => Message: JSON parse error: Instantiation of [simple type, class im.toss.blitz.api.dto.request.PaymentKeyInRequest] value failed for JSON property orderId due to missing (therefore NULL) value for creator parameter orderId which is a non-nullable type; nested exception is com.fasterxml.jackson.module.kotlin.MissingKotlinParameterException: Instantiation of [simple type, class im.toss.blitz.api.dto.request.PaymentKeyInRequest] value failed for JSON property orderId due to missing (therefore NULL) value for creator parameter orderId which is a non-nullable type
at [Source: (org.springframework.util.StreamUtils$NonClosingInputStream); line: 1, column: 299] (through reference chain: im.toss.blitz.api.dto.request.PaymentKeyInRequest["orderId"])
Url => https://api.tosspayments.com/v1/payments/key-in
orderId값이 제대로 안넘어온 것 같아요 파라미터에 개행 등이 들어갔는지 확인해주세요
웹도어
웹도어OP5mo ago
다른값도 같이 안넘어가고 있는건가요? 아니면 orderId 만 안넘어가고 있는걸까요? 동일한 소스에서 https://api.tosspayments.com/v1/billing/authorizations/card 는 정상적으로 진행되고 있는데
이실장
이실장5mo ago
다 넘어오긴했어요. 그런데 제대로 안넘어온 것 같아요
웹도어
웹도어OP5mo ago
넵 일단 다시 확인해보도록 하겠습니다. 직접 넣어도 파라메터 누락으로 나오네요.
이실장
이실장5mo ago
방금시도한 주문번호는 어떤건가요
웹도어
웹도어OP5mo ago
asdasdasd1123 로 보냈습니다 {"amount":10000,"cardExpirationMonth":"02","cardExpirationYear":"2029","cardInstallmentPlan":0,"cardNumber":"1234123412341234","cardPassword":"10","customerIdentityNumber":"810101","orderId ":"asdasdasd1123","orderName":"AAAA"} 일단 OrderId 쪽 확인해서 한번은 통과됐습니다. json 만드는 함수중에 오타가 하나 있었던것 같습니다. 더 진행해보고 또 다른 문제가 생기면 다시 피드백 남기도록 하겠습니다
김차장
김차장5mo ago
"customerName": "박토스" 도 보내줘보세요 customerName 는 필수가 아니네요, json data 로만 보내시면 될거같습니다
웹도어
웹도어OP5mo ago
천천히 보다보니 orderId " 형식으로 띄어쓰기가 들어간 부분 확인되었습니다. 오타로 인해서 문의 드린것 같아 죄송하네요;; 변환 함수쪽에서 문제가 있을 줄이야;; 우선 카드번호랑 정상적으로 변경해서 테스트 해보고 안되는 부분 있으면 포스팅하도록 하겠습니다. 상담 감사드립니다 🙂
김차장
김차장5mo ago
"orderId ":"asdasdasd1123" 공백이 있었군요, 공유 감사합니다
토스페이먼츠 BOT
❤️ 기술문의 경험이 어떠셨나요?!
간단히 코멘트 남겨주세요! 제품 발전에 큰 힘이 됩니다.

Did you find this page helpful?