카드 결제창에서 간편결제 서비스를 선택해서 결제할 수 있습니다.
간편결제 서비스에서 결제 수단을 조합해서 사용하면 결제 응답 객체가 조금씩 달라집니다. 아래 토스페이 사용 예시를 통해 확인해보세요.
결제 수단 | 설명 | 예시 |
---|---|---|
신용·체크 카드 | 고객이 간편결제 서비스에 등록한 카드 | |
충전식 결제 수단 | 고객이 금액을 충전해서 사용하는 결제 수단으로 간편결제 서비스에 등록한 계좌 혹은 현금성 포인트 | 토스페이에 연결된 계좌, 카카오페이머니 등 |
*적립식 결제 수단 | 고객이 간편결제사에서 제공하는 결제·서비스를 이용해서 적립된 포인트, 쿠폰, 즉시할인 금액으로 카드나 충전식 결제 수단과 조합해서 사용 | 토스포인트, 카카오페이포인트 등 |
* 적립식 결제 수단은 카드 혹은 충전식 결제 수단과 조합해서 사용할 수 있습니다.
easyPay
: 간편결제 결제 정보를 담은 객체입니다.
amount
: 간편결제 결제 수단에 등록된 카드, 계좌 중 하나로 결제한 금액입니다.provider
: 간편결제 결제 수단 정보입니다.discountAmount
: 간편결제 결제 수단의 적립 포인트나 쿠폰 등을 사용해서 즉시 할인된 금액입니다.* 아래 예시에서는 토스페이 포인트를 사용해 결제하는 Case 2, 4, 5에서 사용됩니다.
토스페이에 등록된 카드로 15,000원을 결제하면 전체 결제 금액 totalAmount
는 카드로 결제한 금액인 card.amount
와 동일합니다.
간편결제 결제 정보를 나타내는 easyPay
객체에서는 provider
필드로 결제 수단인 토스페이
만 확인하면 됩니다.
{
"mId": "tosspayments",
"version": "2022-06-08",
"paymentKey": "",
"status": "DONE",
"transactionKey": "",
"lastTransactionKey": "",
"orderId": "",
"orderName": "토스 티셔츠 주문",
"requestedAt": "2022-06-08T15:40:09+09:00",
"approvedAt": "2022-06-08T15:40:49+09:00",
"useEscrow": false,
"cultureExpense": false,
"card": {
"company": "농협",
"number": "123456******7890",
"installmentPlanMonths": 0,
"isInterestFree": false,
"interestPayer": null,
"approveNo": "21974757",
"useCardPoint": false,
"cardType": "신용",
"ownerType": "개인",
"acquireStatus": "READY",
"receiptUrl": "https://dashboard.tosspayments.com/sales-slip?transactionId=KAgfjGxIqVVXDxOiSW1wUnRWBS1dszn3DKcuhpm7mQlKP0iOdgPCKmwEdYglIHX&ref=PX",
"amount": 15000
},
"virtualAccount": null,
"transfer": null,
"mobilePhone": null,
"giftCertificate": null,
"cashReceipt": null,
"discount": null,
"cancels": null,
"secret": null,
"type": "NORMAL",
"easyPay": {
"provider": "토스페이",
"amount": 0,
"discountAmount": 0
},
"country": "KR",
"failure": null,
"isPartialCancelable": true,
"receipt": {
"url": "https://dashboard.tosspayments.com/sales-slip?transactionId=KAgfjGxIqVVXDxOiSW1wUnRWBS1dszn3DKcuhpm7mQlKP0iOdgPCKmwEdYglIHX&ref=PX"
},
"currency": "KRW",
"totalAmount": 15000,
"balanceAmount": 15000,
"suppliedAmount": 13636,
"vat": 1364,
"taxFreeAmount": 0,
"method": "간편결제"
}
토스페이에 등록된 카드로 10,000원을 결제하고 토스포인트에서 5,000원을 사용해 총 15,000원을 결제한 경우입니다.
- 토스페이에 연결된 카드로 결제한 금액:
card.amount
- 토스포인트로 결제한 금액:
easyPay.discountAmount
전체 결제 금액 totalAmount
은 두 금액을 합친 값과 같습니다. 따라서 card
와 easyPay
객체를 둘 다 확인해야 합니다.
{
"mId": "tosspayments",
"version": "2022-06-08",
"paymentKey": "",
"status": "DONE",
"transactionKey": "",
"lastTransactionKey": "",
"orderId": "",
"orderName": "토스 티셔츠 주문",
"requestedAt": "2022-06-08T15:35:26+09:00",
"approvedAt": "2022-06-08T15:35:56+09:00",
"useEscrow": false,
"cultureExpense": false,
"card": {
"company": "토스뱅크",
"number": "123456******7890",
"installmentPlanMonths": 0,
"isInterestFree": false,
"interestPayer": null,
"approveNo": "21706400",
"useCardPoint": false,
"cardType": "체크",
"ownerType": "개인",
"acquireStatus": "READY",
"receiptUrl": "https://dashboard.tosspayments.com/sales-slip?transactionId=AeOk8BZTMZWYXxBz%2F31ez5kqL50HsZohWP7%2BjbYL8YMyuF5DPvmuKGhneTFw6y5&ref=PX",
"amount": 10000
},
"virtualAccount": null,
"transfer": null,
"mobilePhone": null,
"giftCertificate": null,
"cashReceipt": null,
"discount": null,
"cancels": null,
"secret": null,
"type": "NORMAL",
"easyPay": {
"provider": "토스페이",
"amount": 0,
"discountAmount": 5000
},
"country": "KR",
"failure": null,
"isPartialCancelable": true,
"receipt": {
"url": "https://dashboard.tosspayments.com/sales-slip?transactionId=AeOk8BZTMZWYXxBz%2F31ez5kqL50HsZohWP7%2BjbYL8YMyuF5DPvmuKGhneTFw6y5&ref=PX"
},
"currency": "KRW",
"totalAmount": 15000,
"balanceAmount": 15000,
"suppliedAmount": 13636,
"vat": 1364,
"taxFreeAmount": 0,
"method": "간편결제"
}
토스페이에 연결된 계좌로 결제하면 전체 결제 금액 totalAmount
는 계좌로 결제한 금액인 easyPay.amount
와 동일합니다. 즉 easyPay
객체만 확인하면 됩니다.
{
"mId": "tosspayments",
"version": "2022-06-08",
"paymentKey": "",
"status": "DONE",
"transactionKey": "",
"lastTransactionKey": "",
"orderId": "",
"orderName": "토스 티셔츠 주문",
"requestedAt": "2022-06-08T15:35:26+09:00",
"approvedAt": "2022-06-08T15:35:56+09:00",
"useEscrow": false,
"cultureExpense": false,
"card": null,
"virtualAccount": null,
"transfer": null,
"mobilePhone": null,
"giftCertificate": null,
"cashReceipt": null,
"discount": null,
"cancels": null,
"secret": null,
"type": "NORMAL",
"easyPay": {
"provider": "토스페이",
"amount": 15000,
"discountAmount": 0
},
"country": "KR",
"failure": null,
"isPartialCancelable": true,
"receipt": {
"url": "https://dashboard.tosspayments.com/sales-slip?transactionId=55A8NEcd6B%2Ffn1%2BCv528D8RffIYBW0lYRBOLYMi9C%2BV0xy%2FqDqorTfjZPH%2BPyKU&ref=PX"
},
"currency": "KRW",
"totalAmount": 15000,
"balanceAmount": 15000,
"suppliedAmount": 13636,
"vat": 1364,
"taxFreeAmount": 0,
"method": "간편결제"
}
토스페이에 연결된 계좌로 15,000원을 결제하고 토스포인트에서 5,000원을 사용해 총 15,000원을 결제한 경우입니다.
- 토스페이에 연결된 계좌로 결제한 금액:
easyPay.amount
- 토스포인트로 결제한 금액:
easyPay.discountAmount
전체 결제 금액 totalAmount
는 두 금액을 합친 값과 같습니다. 즉 easyPay
객체만 확인하면 됩니다.
{
"mId": "tosspayments",
"version": "2022-06-08",
"paymentKey": "",
"status": "DONE",
"transactionKey": "",
"lastTransactionKey": "",
"orderId": "",
"orderName": "토스 티셔츠 주문",
"requestedAt": "2022-06-08T15:35:26+09:00",
"approvedAt": "2022-06-08T15:35:56+09:00",
"useEscrow": false,
"cultureExpense": false,
"card": null,
"virtualAccount": null,
"transfer": null,
"mobilePhone": null,
"giftCertificate": null,
"cashReceipt": null,
"discount": null,
"cancels": null,
"secret": null,
"type": "NORMAL",
"easyPay": {
"provider": "토스페이",
"amount": 10000,
"discountAmount": 5000
},
"country": "KR",
"failure": null,
"isPartialCancelable": true,
"receipt": {
"url": "https://dashboard.tosspayments.com/sales-slip?transactionId=55A8NEcd6B%2Ffn1%2BCv528D8RffIYBW0lYRBOLYMi9C%2BV0xy%2FqDqorTfjZPH%2BPyKU&ref=PX"
},
"currency": "KRW",
"totalAmount": 15000,
"balanceAmount": 15000,
"suppliedAmount": 13636,
"vat": 1364,
"taxFreeAmount": 0,
"method": "간편결제"
}
토스포인트로 15,000원을 결제하면 전체 결제 금액 totalAmount
는 easyPay.discountAmount
와 동일합니다. 즉 easyPay
객체만 확인하면 됩니다.
{
"mId": "tosspayments",
"version": "2022-06-08",
"paymentKey": "",
"status": "DONE",
"transactionKey": "",
"lastTransactionKey": "",
"orderId": "",
"orderName": "토스 티셔츠 주문",
"requestedAt": "2022-06-08T15:35:26+09:00",
"approvedAt": "2022-06-08T15:35:56+09:00",
"useEscrow": false,
"cultureExpense": false,
"card": null,
"virtualAccount": null,
"transfer": null,
"mobilePhone": null,
"giftCertificate": null,
"cashReceipt": null,
"discount": null,
"cancels": null,
"secret": null,
"type": "NORMAL",
"easyPay": {
"provider": "토스페이",
"amount": 0,
"discountAmount": 15000
},
"country": "KR",
"failure": null,
"isPartialCancelable": true,
"receipt": {
"url": "https://dashboard.tosspayments.com/sales-slip?transactionId=55A8NEcd6B%2Ffn1%2BCv528D8RffIYBW0lYRBOLYMi9C%2BV0xy%2FqDqorTfjZPH%2BPyKU&ref=PX"
},
"currency": "KRW",
"totalAmount": 15000,
"balanceAmount": 15000,
"suppliedAmount": 13636,
"vat": 1364,
"taxFreeAmount": 0,
"method": "간편결제"
}