Create

Create Payment

POST /api/payments

Access Permissions

Role
Description
ADMIN

관리자

MANAGER

CS 담당자

SELLER

판매자

Request Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Request Body

Name
Type
Description

orderID

Long

주문아이디

totalPrice

Integer

총 주문 금액

paymentMethod

String

결제수단

method

Enum

결제방식 (신용카드,페이결제,계좌이체 등)

Response

{
  "status": 200,
  "data": {
    "orderId": 98765,
    "userId": 12345,
    "state": "결제완료",
    "totalPrice": 42500,
    "paymentKey": "String", // 토스페이먼츠에서 응답한 paymentKey
    "amount": "Number", // 토스페이먼츠에서 응답한 amount
    "payment_method": "CREDIT_CARD",
    "responseDate": 
    [	
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "successUrl": window.location.origin + "/success.html",
      "failUrl": window.location.origin + "/fail.html",
      "customerEmail": "customer123@gmail.com",
      "customerName": "김토스",
      "customerMobilePhone": "01012341234",
    ]
  },
  "error": null,
  "timeStamp": "2024-09-27 12:00:00"
}

Last updated