안녕하세요. 테스트키를 사용해서 부분취소 건 테스트중인데요,
2000원 결제 건이라 아래와 같이 1000원을 부분취소해서 응답을 받으면 cancel_available_amount이 1000원이 남는데요,
{
“aid”: “A41817865b8c2c02caaf”,
“tid”: “T41817175b8c2c02caa6”,
“cid”: “TC0ONETIME”,
“status”: “PART_CANCEL_PAYMENT”,
“partner_order_id”: “abdsaf-adsgasdga-adfadsfad34”,
“partner_user_id”: “uassdlfjalsdf”,
“payment_method_type”: “MONEY”,
“item_name”: “생수”,
“quantity”: 2,
“amount”: {
“total”: 2000,
“tax_free”: 100,
“vat”: 100,
“point”: 0,
“discount”: 0,
“green_deposit”: 0
},
“approved_cancel_amount”: {
“total”: 1000,
“tax_free”: 100,
“vat”: 82,
“point”: 0,
“discount”: 0,
“green_deposit”: 0
},
“canceled_amount”: {
“total”: 1000,
“tax_free”: 100,
“vat”: 82,
“point”: 0,
“discount”: 0,
“green_deposit”: 0
},
“cancel_available_amount”: {
“total”: 1000,
“tax_free”: 0,
“vat”: 18,
“point”: 0,
“discount”: 0,
“green_deposit”: 0
},
“created_at”: “2023-03-20T17:19:35”,
“approved_at”: “2023-03-20T17:20:25”,
“canceled_at”: “2023-03-20T17:21:26”
}
이후에 아래와 같이 다시 동일한 request값으로 cancelAmount값만 500으로 입력하여 부분 취소를 또 다시 요청하면
cid=TC0ONETIME&tid=T41817175b8c2c02caa6&cancel_amount=500&cancel_tax_free_amount=100&payload=%EA%B3%A0%EA%B0%9D%EC%9D%B4+%EC%B7%A8%EC%86%8C%EB%A5%BC+%EC%9B%90%ED%95%A8
https://kapi.kakao.com/v1/payment/cancel에 대해 400 Bad Request 응답이 떨어집니다.
상세 error code는 {“msg”:“requested cancel amount is bigger than cancelable amount”,“code”:-710} 입니다.
처음 2000원에서 1000원을 취소하고 500원을 취소하는 건이라 취소 요청 금액이 cancelable amount 보다 크다는 error가 이해가 안되는데요, 제가 뭘 잘못한 걸까요?
감사합니다.