Checkout API

Endpoint untuk menghitung checkout dan mengambil quote pembayaran.

Checkout API digunakan untuk menghitung nilai checkout sebelum order dibuat.

Endpoint

http
POST /checkout/calculate
GET /checkout/quote

Scopes

EndpointScope
/checkout/calculatecheckout:read
/checkout/quotecheckout:read

Pada beberapa kondisi, endpoint quote juga dapat berkaitan dengan scope coupons:read jika menggunakan kupon.

Calculate Checkout

http
POST /wp-json/sejoli/v1/checkout/calculate

Parameter yang ditemukan:

ParameterTipeWajibKeterangan
product_idintegerYaID produk.
couponstringTidakKode kupon.
quantityintegerTidakJumlah pembelian. Default 1.

Contoh:

bash
curl -X POST \
  -H "Authorization: Bearer sejoliapi_xxxxxxxx_secret" \
  -H "Content-Type: application/json" \
  -d '{"product_id":123,"quantity":1,"coupon":"PROMO10"}' \
  "https://domain-anda.com/wp-json/sejoli/v1/checkout/calculate"

Checkout Quote

http
GET /wp-json/sejoli/v1/checkout/quote

Gunakan endpoint ini untuk mendapatkan estimasi checkout berdasarkan parameter yang didukung oleh controller.

Last updated Jul 6, 2026