Langsung ke konten utama
POST
/
v3
/
stores
/
{store_id}
/
customers
/
me
/
checkout
/
summary
Compute checkout summary
curl --request POST \
  --url https://api.scalev.com/v3/stores/{store_id}/customers/me/checkout/summary \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "items": [
    {
      "type": "variant",
      "variant_id": 2,
      "quantity": 50
    }
  ],
  "cart_id": 123,
  "location_id": 123,
  "postal_code": "<string>",
  "shipping_cost": "<string>",
  "courier_service_id": 123,
  "warehouse_unique_id": "<string>",
  "courier_aggregator_code": "<string>",
  "shipping_option": {
    "courier_service_id": 123,
    "warehouse_unique_id": "<string>",
    "courier_aggregator_code": "<string>"
  },
  "selected_shipping_option": {
    "courier_service_id": 123,
    "warehouse_unique_id": "<string>",
    "courier_aggregator_code": "<string>"
  },
  "payment_method": "bank_transfer"
}
'
{
  "product_price": "<string>",
  "shipping_cost": "<string>",
  "other_income": "<string>",
  "other_income_name": "<string>",
  "gross_revenue": "<string>"
}

Otorisasi

Authorization
string
header
wajib

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Parameter Path

store_id
string
wajib

Store unique_id.

Body

application/json
items
object[]

Optional direct item source. If supplied, these items are used for the checkout summary. Otherwise cart_id selects the authenticated customer's active cart.

Required array length: 1 - 50 elements
cart_id

Authenticated customer cart ID to use when items is omitted.

location_id
postal_code
string
shipping_cost

Optional compatibility value. Customer checkout summary recomputes the authoritative shipping cost from the selected courier service, warehouse, payment method, destination, and cart items.

courier_service_id
warehouse_unique_id
string | null
courier_aggregator_code
string | null
shipping_option
object
selected_shipping_option
object
payment_method
string

Storefront payment method code selected by the buyer.

Contoh:

"bank_transfer"

Respons

Checkout summary

product_price
wajib
shipping_cost
wajib
other_income
wajib
other_income_name
string | null
wajib
gross_revenue
wajib