결제 내역 상세 조회
결제 건 하나의 시도 이력과 환불 이력을 함께 돌려준다. 스코프 `settlement:r`. - `attempts`는 결제창 호출 순서다. 실패한 시도도 남는다. - `refunds`는 **실패한 환불 요청도** 남긴다. 같은 금액이 두 번 환불되지 않았는지 셀러가 확인할 수 있어야 한다. - `merchantId`는 가맹점 식별자 지문이다(토스 clientKey, 포트원 Store ID). 비밀 값은 어떤 필드에도 없다.
결제 건 하나의 시도 이력과 환불 이력을 함께 돌려준다. 스코프 settlement:r.
attempts는 결제창 호출 순서다. 실패한 시도도 남는다.refunds는 실패한 환불 요청도 남긴다. 같은 금액이 두 번 환불되지 않았는지 셀러가 확인할 수 있어야 한다.merchantId는 가맹점 식별자 지문이다(토스 clientKey, 포트원 Store ID). 비밀 값은 어떤 필드에도 없다.
Authorization
bearer userToken(계정 스코프) 또는 storeToken(스토어 스코프)
In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/v1/payments/string"{ "meta": { "status": 200, "code": "OK", "message": "OK", "isSuccess": true }, "data": { "paymentId": "string", "orderId": "string", "orderName": "string", "customerName": "string", "status": "APPROVED", "amount": 0, "refundedAmount": 0, "provider": "tosspayments", "method": "CARD", "environment": "TEST", "testPayment": true, "pgTransactionId": "string", "attemptId": "string", "attemptCount": 0, "failCode": "string", "failMessage": "string", "paidAt": "string", "createdAt": "string", "refundableAmount": 0, "merchantId": "string", "attempts": [ { "attemptId": "string", "sequence": 0, "provider": "tosspayments", "status": "string", "method": "CARD", "approvedMethod": "CARD", "amount": 0, "environment": "TEST", "pgTransactionId": "string", "failCode": "string", "failMessage": "string", "createdAt": "string", "updatedAt": "string" } ], "refunds": [ { "refundId": "string", "amount": 0, "reason": "string", "kind": "string", "status": "string", "failMessage": "string", "requestedAt": "string", "completedAt": "string" } ] }, "error": null}결제 내역 조회 GET
PG에 오간 결제를 건 단위로 조회한다. 스코프 `settlement:r`. - 주문 목록과 다르다. **주문이 만들어지지 않은 결제도 나온다**(카드 거절, 결제창 이탈, 승인 결과 확인 중). - 한 결제 건에 시도가 여럿일 수 있다(거절 뒤 다른 PG로 재시도). 응답의 `provider`·`method`·`pgTransactionId`는 승인한 시도의 값이고, 승인이 없으면 마지막 시도의 값이다. - `status`는 환불까지 반영한다. 부분 환불은 `PARTIALLY_REFUNDED`, 전액 환불은 `REFUNDED`다. - `method`는 **실제 결제수단**이다. PG가 보고한 수단을 쓰고, 모르면 주문서에서 요청한 수단으로 대신한다. - 테스트 결제는 기본으로 빠진다. `includeTest=true`면 포함한다. - 기간 기준은 결제 시작 시각이고 최대 92일이다. 생략하면 최근 30일이다.
상품 이미지 업로드 POST
다음