Payment API 문서 - f-lab-edu/at_ticket GitHub Wiki


Payment API 문서

version 1.0.0-SNAPSHOT

결제 확인

Request

POST /payments/ HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 87
Host: localhost:8080

{
  "paymentId" : "imp_221562613272",
  "reservationId" : 1000,
  "amount" : 3000
}

Request Fields

Path Type Description

paymentId

String

결제 ID

reservationId

Number

예약 ID

amount

Number

가격

Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 156

{
  "code" : 200,
  "message" : "요청에 성공하셨습니다.",
  "data" : {
    "paymentId" : "imp_221562613272",
    "orderId" : "IMP355"
  }
}

Response Fields

Path Type Description

code

Number

결과코드

message

String

결과 메세지

data.paymentId

String

결제 ID

data.orderId

String

주문 ID

결제 취소

Request

Request

POST /payments/cancel HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 309
Host: localhost:8080

{
  "paymentId" : "imp_221562613272",
  "orderId" : "IMP355",
  "amount" : 3000.0,
  "taxFree" : 100.0,
  "reason" : null,
  "refundHolder" : null,
  "refundTel" : null,
  "refundBank" : null,
  "refundAccount" : "null",
  "linkedPlatform" : "I_AM_PORT",
  "impKey" : null,
  "impSecret" : null
}

Request Fields

Path Type Description

paymentId

String

결제 ID

orderId

String

주문 ID

amount

Number

금액

taxFree

Number

면세 금액

reason

String

취소 사유

refundHolder

String

환불계좌 예금주

refundTel

String

환불계좌 예금주 연락처

refundBank

String

환불계좌 은행

refundAccount

String

환불계좌 계좌번호

linkedPlatform

String

결제 연동 타입

impKey

String

API

impSecret

String

비밀 키

Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 75

{
  "code" : 200,
  "message" : "조회된 데이터가 없습니다."
}

Response Fields

Path Type Description

code

Number

결과코드

message

String

결과 메세지

data.paymentId

String

결제 ID

data.orderId

String

주문 ID

Version 1.0.0-SNAPSHOT
Last updated 2023-10-22 13:49:35 +0900

⚠️ **GitHub.com Fallback** ⚠️