sayren Docs
결제

결제 내역 상세 조회

결제 건 하나의 시도 이력과 환불 이력을 함께 돌려준다. 스코프 `settlement:r`. - `attempts`는 결제창 호출 순서다. 실패한 시도도 남는다. - `refunds`는 **실패한 환불 요청도** 남긴다. 같은 금액이 두 번 환불되지 않았는지 셀러가 확인할 수 있어야 한다. - `merchantId`는 가맹점 식별자 지문이다(토스 clientKey, 포트원 Store ID). 비밀 값은 어떤 필드에도 없다.

GET
/v1/payments/{paymentId}

결제 건 하나의 시도 이력과 환불 이력을 함께 돌려준다. 스코프 settlement:r.

  • attempts는 결제창 호출 순서다. 실패한 시도도 남는다.
  • refunds는 실패한 환불 요청도 남긴다. 같은 금액이 두 번 환불되지 않았는지 셀러가 확인할 수 있어야 한다.
  • merchantId는 가맹점 식별자 지문이다(토스 clientKey, 포트원 Store ID). 비밀 값은 어떤 필드에도 없다.
AuthorizationBearer <token>

userToken(계정 스코프) 또는 storeToken(스토어 스코프)

In: header

Path Parameters

paymentId*string

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}