Langsung ke konten utama
POST
/
v3
/
pages
/
{page_unique_id}
/
checkout
/
summary
Compute an HTML Mode checkout summary
curl --request POST \
  --url https://api.scalev.com/v3/pages/{page_unique_id}/checkout/summary \
  --header 'Content-Type: application/json' \
  --header 'X-Scalev-Page-Api-Key: <x-scalev-page-api-key>' \
  --data '
{
  "items": [
    {
      "type": "product",
      "quantity": 1,
      "variant_unique_id": "variant_x7f2a9",
      "bundle_price_option_unique_id": "bundle_price_option_p4k8q2"
    }
  ],
  "destination": {
    "address": "Jl. Kopi No. 1",
    "subdistrict_id": 3171010,
    "postal_code": "10510"
  },
  "payment_method": "bank_transfer"
}
'
{
  "product_price": "<string>",
  "shipping_cost": "<string>",
  "other_income": "<string>",
  "other_income_name": "<string>",
  "gross_revenue": "<string>"
}

Header

X-Scalev-Page-Api-Key
string
wajib

Publishable page public API key for the page_unique_id path page. Storefront public API keys are not accepted on page-scoped public routes.

Parameter Path

page_unique_id
string
wajib

Public page unique ID.

Contoh:

"page_540f48019f525f41"

Body

application/json

HTML Mode checkout summary payload. Pass the option returned by shippingOptions as shipping_option when the checkout contains physical items.

items
object[]
Minimum array length: 1
destination
object

Buyer destination submitted by an HTML Mode page.

payment_method
string
Contoh:

"bank_transfer"

shipping_option
object

Respons

HTML Mode checkout summary

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