Skip to Content
Sayren 유저가이드
주문서

주문서 생성

POST
/storefront/v1/checkout

Authorization

headerAuthorizationBearer <JWT>

회원 accessToken

Header Parameters

x-cart-token*string

Request Body

application/json
  1. body
cartItemIds?array<string>
Items1 <= items
directItem?
fulfillmentMethod?string

이행 방식(이슈 #115). 모든 줄에 같은 방식을 적용하고, 상품 fulfillment.methods에 없는 줄이 있으면 400 FULFILLMENT_METHOD_NOT_ALLOWED다. 생략하면 줄마다 상품 허용 방식의 첫 값이다. 방문 수령(PICKUP)은 배송지·배송비가 없다

Value in"CARRIER""DIRECT""PICKUP""PROVIDED"
pickupLocationId?string

방문 수령 장소(GET /pickup-locations). 방식이 PICKUP이고 상점에 픽업 장소가 있으면 필수(400 PICKUP_LOCATION_REQUIRED), 없거나 쓰지 않는 장소면 400 PICKUP_LOCATION_NOT_FOUND. 다른 방식에 주면 400 PICKUP_LOCATION_NOT_APPLICABLE

Response Body

성공

application/json
  1. response
meta*
data*
error*|null
Example Request
curl -X POST 'https://api.sayren.io/storefront/v1/checkout' \
  -H 'x-cart-token: string' \
  -H 'Content-Type: application/json' \
  -d '{}'
Example Response201
{
  "meta": {
    "status": 201,
    "code": "OK",
    "message": "OK",
    "isSuccess": true
  },
  "data": {
    "checkoutId": "string",
    "currency": "KRW",
    "items": [
      {
        "lineId": "string",
        "productId": "string",
        "productName": "string",
        "thumbnailUrl": "http://example.com",
        "optionId": "string",
        "optionName": "string",
        "optionSelections": [],
        "customInputs": [],
        "stay": {
          "checkIn": "string",
          "checkOut": "string",
          "nights": [
            {
              "date": "string",
              "price": 0
            }
          ]
        },
        "quantity": 0,
        "unitPrice": 0,
        "totalPrice": 0,
        "fulfillment": {
          "type": "string",
          "requiresShipping": true,
          "method": "string"
        }
      }
    ],
    "amounts": {
      "productAmount": 0,
      "deliveryFee": 0,
      "totalAmount": 0,
      "couponDiscountAmount": 0,
      "deliveryDiscountAmount": 0,
      "pointAmount": 0
    },
    "points": null,
    "couponsEnabled": true,
    "additionalPayment": false,
    "orderPasswordRequired": false,
    "memberOrder": false,
    "delivery": {
      "baseFee": 0,
      "remoteSurcharge": 0,
      "remoteArea": "NONE",
      "remoteAreaLabel": "string",
      "bundleCount": 0,
      "freeByThreshold": true,
      "zipCode": "string"
    },
    "requiresShipping": true,
    "expiresAt": "string",
    "paymentOptions": [
      {
        "label": "string",
        "pgName": "string",
        "logoUrl": "string",
        "pg": "tosspayments",
        "method": "CARD"
      }
    ],
    "testPayment": true
  },
  "error": null
}