목차
고객이 간편결제에서 결제수단을 조합해서 사용하면 결제 응답 객체가 조금씩 달라집니다. 아래 토스페이 사용 예시를 확인해보세요.
결제수단 | 설명 | 응답 객체 금액 필드 | 예시 |
---|---|---|---|
신용·체크 카드 | 고객이 간편결제 서비스에 등록한 카드 | card.amount | 토스페이에 등록된 카드 |
충전식 결제수단 | 고객이 금액을 충전해서 사용하는 결제수단으로 간편결제 서비스에 등록한 계좌 혹은 현금성 포인트 | easyPay.amount | 토스페이에 연결된 계좌, 카카오페이머니 |
적립식 결제수단* | 고객이 간편결제사에서 제공하는 결제 서비스를 이용해서 적립된 포인트, 쿠폰, 즉시할인 금액으로 카드나 충전식 결제수단과 조합해서 사용 | easyPay.discountAmount | 토스포인트, 카카오페이포인트 |
* 적립식 결제수단은 카드 혹은 충전식 결제수단과 조합해서 사용할 수 있습니다.
토스페이에 등록된 카드로 15,000원을 결제하면 전체 결제 금액 totalAmount
는 카드로 결제한 금액인 card.amount
와 동일합니다.
{
"mId": "tosspayments",
"version": "2022-11-16",
"paymentKey": "",
"status": "DONE",
"lastTransactionKey": "",
"orderId": "",
"orderName": "토스 티셔츠 외 2건",
//...
"card": {
"issuerCode": "61",
"acquirerCode": "31",
"number": "123456******7890",
"installmentPlanMonths": 0,
"isInterestFree": false,
"interestPayer": null,
"approveNo": "21974757",
"useCardPoint": false,
"cardType": "신용",
"ownerType": "개인",
"acquireStatus": "READY",
"amount": 15000
},
"easyPay": {
"provider": "토스페이",
"amount": 0,
"discountAmount": 0
},
//...
"totalAmount": 15000
}
JSON
토스페이에 등록된 카드로 10,000원을 결제하고 토스포인트에서 5,000원을 사용해 총 15,000원을 결제합니다.
전체 결제 금액 totalAmount
은 card.amount
와 easyPay.discountAmount
의 합계입니다.
{
"mId": "tosspayments",
"version": "2022-11-16",
"paymentKey": "",
"status": "DONE",
"lastTransactionKey": "",
"orderId": "",
"orderName": "토스 티셔츠 외 2건",
//...
"card": {
"issuerCode": "61",
"acquirerCode": "31",
"number": "123456******7890",
"installmentPlanMonths": 0,
"isInterestFree": false,
"interestPayer": null,
"approveNo": "21706400",
"useCardPoint": false,
"cardType": "체크",
"ownerType": "개인",
"acquireStatus": "READY",
"amount": 10000
},
"easyPay": {
"provider": "토스페이",
"amount": 0,
"discountAmount": 5000
},
//...
"totalAmount": 15000
}
JSON
토스페이에 연결된 계좌로 결제하면 전체 결제 금액 totalAmount
는 계좌로 결제한 금액인 easyPay.amount
와 동일합니다. 즉 easyPay
객체만 확인하면 됩니다.
{
"mId": "tosspayments",
"version": "2022-11-16",
"paymentKey": "",
"status": "DONE",
"lastTransactionKey": "",
"orderId": "",
"orderName": "토스 티셔츠 외 2건",
//...
"card": null,
"easyPay": {
"provider": "토스페이",
"amount": 15000,
"discountAmount": 0
},
//...
"totalAmount": 15000
}
JSON
토스페이에 연결된 계좌로 15,000원을 결제하고 토스포인트에서 5,000원을 사용해 총 15,000원을 결제합니다.
전체 결제 금액 totalAmount
는 easyPay.amount
와 easyPay.discountAmount
의 합계입니다.
{
"mId": "tosspayments",
"version": "2022-11-16",
"paymentKey": "",
"status": "DONE",
"lastTransactionKey": "",
"orderId": "",
"orderName": "토스 티셔츠 외 2건",
//...
"card": null,
"easyPay": {
"provider": "토스페이",
"amount": 10000,
"discountAmount": 5000
},
//...
"totalAmount": 15000
}
JSON
토스포인트로 15,000원을 결제하면 전체 결제 금액 totalAmount
는 easyPay.discountAmount
와 동일합니다. 즉 easyPay
객체만 확인하면 됩니다.
{
"mId": "tosspayments",
"version": "2022-11-16",
"paymentKey": "",
"status": "DONE",
"lastTransactionKey": "",
"orderId": "",
"orderName": "토스 티셔츠 외 2건",
//...
"card": null,
"easyPay": {
"provider": "토스페이",
"amount": 0,
"discountAmount": 15000
},
//...
"totalAmount": 15000
}
JSON