sayren Docs
결제

결제 내역 상세 조회

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

GET
/v1/payments/{paymentId}

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

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

Authorization

accessToken
headerAuthorizationBearer <token>

Sayren 계정 토큰(로그인 토큰 또는 개인 액세스 토큰, RFC 9068 JWT)

Path Parameters

paymentId*string

Header Parameters

X-Store-Id*string

대상 상점 id. 토큰의 상점 범위 밖이면 403 STORE_NOT_GRANTED, 없으면 400 STORE_ID_REQUIRED다

Response Body

성공

application/json
  1. response
meta*
data*
error*|null
curl -X GET 'https://api.sayren.io/v1/payments/string' \  -H 'X-Store-Id: 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,    "heldRefundAmount": 0,    "provider": "tosspayments",    "method": "CARD",    "easyPayProvider": null,    "environment": "TEST",    "testPayment": true,    "pgTransactionId": "string",    "attemptId": "string",    "pgOrderId": null,    "attemptCount": 0,    "failCode": "string",    "failMessage": "string",    "paidAt": "string",    "createdAt": "string",    "cashReceiptStatus": null,    "refundableAmount": 0,    "merchantId": "string",    "attempts": [      {        "attemptId": "string",        "pgOrderId": null,        "sequence": 0,        "provider": "tosspayments",        "status": "string",        "method": "CARD",        "easyPayProvider": null,        "approvedMethod": "CARD",        "approvedEasyPayProvider": null,        "amount": 0,        "environment": "TEST",        "pgTransactionId": "string",        "failCode": "string",        "failMessage": "string",        "createdAt": "string",        "updatedAt": "string"      }    ],    "refunds": [      {        "refundId": "string",        "amount": 0,        "pointRefundAmount": 0,        "reason": "string",        "kind": "string",        "status": "string",        "failMessage": "string",        "requestedAt": "string",        "completedAt": "string"      }    ],    "cashReceipt": null  },  "error": null}