Cash Receipt API
in the doc you dont have registrationNumber
but in the API test but in the test https://docs.tosspayments.com/reference/test/v1/cash-receipts/POST. its set as a required feild... can you tell us what registrationNumber vaule should be please?
as currently im getting error :
{"orderId":"000000512","orderName":"Test payment product","amount":1005,"type":"\uc18c\ub4dd\uacf5\uc81c","customeridentitynumber":"mods2003@gmail.com"}
"{"code":"INVALID_REQUIRED_PARAM","message":"\ud544\uc218 \ud30c\ub77c\ubbf8\ud130\uac00 \ub204\ub77d\ub418\uc5c8\uc2b5\ub2c8\ub2e4."}"
11 Replies
⏳ 잠시만 기다려주세요! 곧 답변드리겠습니다
오류 문의일 경우 아래 정보를 미리 전달해주시면, 빠른 답변에 도움이 됩니다.
- 주문번호(orderId) :
- 문의 내용 :
(img를 함께 첨부해주시면 도움이됩니다)
* 계약관련 내용은 1544-7772로 문의주세요.
* 주말/공휴일에는 답변이 늦을 수 있어요.
Hi Neojack,
Seems you found the issue already.
Your request param value need to be UTF-8 encoded.
thanks but what about registrationNumber ?
the doc docs doesn't mention what this value should be for the receipt but you require it in the request
the error message is : 필수 파라미터가 누락되었습니다
registrationNumber was deprecated
but API test page covers all API version so it still shows registrationNumber
So, please use curl or any other REST API tools rather than that page.
ok understood.. so why the error is : 필수 파라미터가 누락되었습니다
only because of UTF-8 encoded?
필수 파라미터가 누락되었습니다 = a required parameter is missing ?
i'm using API verison 1.4 but still get the same above error
parameter "type" also the necessary one.
is the error still exist?
could you share the orderId of request again?
your previous request of "type" value seems was not encrypted with UTF-8.
as you shared here
{"orderId":"000000512","orderName":"Test payment product","amount":1005,"type":"\uc18c\ub4dd\uacf5\uc81c","customeridentitynumber":"mods2003@gmail.com"}
ok even using your example request still the same error
curl --request POST \
--url https://api.tosspayments.com/v1/cash-receipts \
--header 'Authorization: Basic dGVzdF9za196WExrS0V5cE5BcldtbzUwblgzbG1lYXhZRzVSOg==' \
--header 'Content-Type: application/json' \
--data '{"orderId":"WwnKs-woFdydrRMAKuemq","orderName":"토스 티셔츠 외 2건","amount":"10000","type":"소득공제","customerIdentityNumber":"01012345678"}'
{"code":"INVALID_REQUIRED_PARAM","message":"필수 파라미터가 누락되었습니다."}%
----
when we write the param in the log it convert in json format, so thats why you see the encode under json encoded
maybe you can check and share with me a request that gives correct response please?
You have mentioned that your API Version is 1.4
https://docs.tosspayments.com/reference
from this page, you can change the version reference
version 1.4, could you try with parameter "registrationNumber"?
코어 API | 토스페이먼츠 개발자센터
토스페이먼츠 API 엔드포인트(Endpoint)와 객체 정보, 파라미터, 요청 및 응답 예제를 살펴보세요.
customerIdentityNumber may valid from the version 07-27.
ah thanks ok i didnt see where to change docs api version before.. i will try again
❤️ 기술문의 경험이 어떠셨나요?!
간단히 코멘트 남겨주세요! 제품 발전에 큰 힘이 됩니다.