토스페이먼츠 결제 취소 웹훅 관련 문의드립니다.

, 소 Webhook .

.
1. 트 Webhook
2. 브 Webhook

츠 Webhook Event .
- PAYMENT_STATUS_CHANGED

, PAYMENT_STATUS_CHANGED Event .
https://docs.tosspayments.com/reference#payment-%EA%B0%9D%EC%B2%B4

"- - - " 된 Webhook .
org.springframework.web.server.ServerWebInputException: 400 BAD_REQUEST “Failed to read HTTP message”; nested exception is org.springframework.core.codec.DecodingException: JSON decoding error: Instantiation of [simple type, class ....] value failed for JSON property version due to missing (therefore NULL) value for creator parameter version which is a non-nullable type; nested exception is com.fasterxml.jackson.module.kotlin.MissingKotlinParameterException: Instantiation of [simple type, class ....] value failed for JSON property version due to missing (therefore NULL) value for creator parameter version which is a non-nullable type

at [Source: (io.netty.buffer.ByteBufInputStream); line: 1, column: 1624] (through reference chain: ....TossWebhookPayload[“data”]->....[“version”])


, PAYMENT_STATUS_CHANGED Event 츠 Json version field 어 Deserialize , version field 가 Notnull .
{
"data": {
    "mId": "tosspayments",
    "version": "2022-11-16", // Not null


의 Webhook version field ,
의 Webhook version field 아 Decode .

,
Webhook PAYMENT_STATUS_CHANGED Event version field 는 Notnull 만 Null와 Decode .
, 트 Webhook 브 Webhook .
version field 의 index 음 field .

브 Webhook , .
츠 API (Endpoint), , .
코어 API | 토스페이먼츠 개발자센터
Was this page helpful?