hyo
hyo2mo ago

현금 영수증 발행 취소 시 에러

테스트 키로 현금 영수증 발행 취소 테스트 진행 중인데, COMMON_ERROR 일시적인 오류가 발생했습니다. 잠시 후 다시 시도해주세요. 이런 에러가 발생하고 있습니다. 어떤 오류인지 확인 부탁드립니다.
14 Replies
토스페이먼츠 BOT
⏳ 잠시만 기다려주세요! 곧 답변드리겠습니다
오류 문의일 경우 아래 정보를 미리 전달해주시면, 빠른 답변에 도움이 됩니다.
- 주문번호(orderId) : - 문의 내용 :
(img를 함께 첨부해주시면 도움이됩니다)
* 계약관련 내용은 1544-7772로 문의주세요. * 주말/공휴일에는 답변이 늦을 수 있어요.
Kimoon Lee
Kimoon Lee2mo ago
테스트 에서는 현금영수증이 발행되거나 취소 되지 않습니다. 라이브에서 테스트 해주세요.
hyo
hyoOP2mo ago
현금 영수증 발행 테스트는 테스트 키로는 응답이 잘오던데, 실제로 발행되는게 아니라서 취소가 안된다는 말씀이신건가요?
Kimoon Lee
Kimoon Lee2mo ago
아 API 응답에 에러나 나는건가요?
hyo
hyoOP2mo ago
네네
Kimoon Lee
Kimoon Lee2mo ago
취소때 사용하신 receiptkey 알려주세요.
hyo
hyoOP2mo ago
GvaE2lKMZ7DLJOpm5QrlDgOY0wNpp5rPNdxbWnYzqR4gA6Xy 입니다
김차장
김차장2mo ago
orderId 변경해서 아래 내용대로 테스트해보세요
curl --request POST \
--url https://api.tosspayments.com/v1/cash-receipts \
--header 'Authorization: Basic dGVzdF9za196WExrS0V5cE5BcldtbzUwblgzbG1lYXhZRzVSOg==' \
--header 'Content-Type: application/json' \
--data '{"amount":15000,"orderId":"a4CWyWY5m89PNh7xJ12341234whk1","orderName":"토스 티셔츠 외 2건","customerIdentityNumber":"01012341234","type":"소득공제"}'
{"receiptKey":"pd12AjJexmnRQoOaPz8L5eJzybNYwz3y47BMw6vl0gkYqDNE","orderId":"a4CWyWY5m89PNh7xJ12341234whk1","orderName":"토스 티셔츠 외 2건","type":"소득공제","issueNumber":"160001476","receiptUrl":"https://dashboard.tosspayments.com/receipts/cash-receipt/a4CWyWY5m89PNh7xJ12341234whk1/tvivarepublica?ref=PX","businessNumber":"","transactionType":"CONFIRM","amount":15000,"taxFreeAmount":0,"issueStatus":"IN_PROGRESS","failure":null,"customerIdentityNumber":"01012341234","requestedAt":"2025-07-03T11:56:53+09:00"}

curl --request POST \
--url https://api.tosspayments.com/v1/cash-receipts/pd12AjJexmnRQoOaPz8L5eJzybNYwz3y47BMw6vl0gkYqDNE/cancel \
--header 'Authorization: Basic dGVzdF9za196WExrS0V5cE5BcldtbzUwblgzbG1lYXhZRzVSOg=='
{"receiptKey":"c_pd12AjJexmnRQoOaPz8L5eJzybNYwz3y47BMw6vl0gkYqDNE","orderId":"a4CWyWY5m89PNh7xJ12341234whk1","orderName":"토스 티셔츠 외 2건","type":"소득공제","issueNumber":"160001476","receiptUrl":"https://dashboard.tosspayments.com/receipts/cash-receipt/a4CWyWY5m89PNh7xJ12341234whk1/tvivarepublica?ref=PX","businessNumber":"","transactionType":"CANCEL","amount":15000,"taxFreeAmount":0,"issueStatus":"IN_PROGRESS","failure":null,"customerIdentityNumber":"01012341234","requestedAt":"2025-07-03T11:58:01+09:00"}
curl --request POST \
--url https://api.tosspayments.com/v1/cash-receipts \
--header 'Authorization: Basic dGVzdF9za196WExrS0V5cE5BcldtbzUwblgzbG1lYXhZRzVSOg==' \
--header 'Content-Type: application/json' \
--data '{"amount":15000,"orderId":"a4CWyWY5m89PNh7xJ12341234whk1","orderName":"토스 티셔츠 외 2건","customerIdentityNumber":"01012341234","type":"소득공제"}'
{"receiptKey":"pd12AjJexmnRQoOaPz8L5eJzybNYwz3y47BMw6vl0gkYqDNE","orderId":"a4CWyWY5m89PNh7xJ12341234whk1","orderName":"토스 티셔츠 외 2건","type":"소득공제","issueNumber":"160001476","receiptUrl":"https://dashboard.tosspayments.com/receipts/cash-receipt/a4CWyWY5m89PNh7xJ12341234whk1/tvivarepublica?ref=PX","businessNumber":"","transactionType":"CONFIRM","amount":15000,"taxFreeAmount":0,"issueStatus":"IN_PROGRESS","failure":null,"customerIdentityNumber":"01012341234","requestedAt":"2025-07-03T11:56:53+09:00"}

curl --request POST \
--url https://api.tosspayments.com/v1/cash-receipts/pd12AjJexmnRQoOaPz8L5eJzybNYwz3y47BMw6vl0gkYqDNE/cancel \
--header 'Authorization: Basic dGVzdF9za196WExrS0V5cE5BcldtbzUwblgzbG1lYXhZRzVSOg=='
{"receiptKey":"c_pd12AjJexmnRQoOaPz8L5eJzybNYwz3y47BMw6vl0gkYqDNE","orderId":"a4CWyWY5m89PNh7xJ12341234whk1","orderName":"토스 티셔츠 외 2건","type":"소득공제","issueNumber":"160001476","receiptUrl":"https://dashboard.tosspayments.com/receipts/cash-receipt/a4CWyWY5m89PNh7xJ12341234whk1/tvivarepublica?ref=PX","businessNumber":"","transactionType":"CANCEL","amount":15000,"taxFreeAmount":0,"issueStatus":"IN_PROGRESS","failure":null,"customerIdentityNumber":"01012341234","requestedAt":"2025-07-03T11:58:01+09:00"}
hyo
hyoOP2mo ago
현금영수증 취소 시에는 receiptKey 만 path 에 추가해서 post 쏘면 되는 걸로 아는데 orderId 가 필요한건가요?
Kimoon Lee
Kimoon Lee2mo ago
/v1/cash-receipts/{receiptKey}/cancel 이거를 post로 쏘신게 맞나요? 혹시 저희 테스트 페이지 이용하신거면 실제 curl 이나 postman 등으로 보내보세요.
김차장
김차장2mo ago
요청부터 새로 생성하시라는 의미였어요
hyo
hyoOP2mo ago
아 post 요청 할 때 path 에 receiptKey 값은 잘 넣어서 보냈지만 data 값이 없다 보니까 NULL 로 보내고 있어서 생긴 문제였나보네요 post data 있을 때만 curl data 에 넣도록 하니 잘 됩니다
김차장
김차장2mo ago
확인감사합니다
토스페이먼츠 BOT
❤️ 기술문의 경험이 어떠셨나요?!
간단히 코멘트 남겨주세요! 제품 발전에 큰 힘이 됩니다.

Did you find this page helpful?