Langsung ke konten utama
POST
/
v3
/
stores
/
{store_id}
/
public
/
checkout
Create a public checkout order
curl --request POST \
  --url https://api.scalev.com/v3/stores/{store_id}/public/checkout \
  --header 'Content-Type: application/json' \
  --header 'X-Scalev-Storefront-Api-Key: <x-scalev-storefront-api-key>' \
  --data '
{
  "customer_name": "<string>",
  "customer_email": "jsmith@example.com",
  "payment_method": "bank_transfer",
  "items": [
    {
      "type": "variant",
      "variant_id": 2,
      "quantity": 50
    }
  ],
  "customer_phone": "<string>",
  "shipping_address": "<string>",
  "shipping_province": "<string>",
  "shipping_city": "<string>",
  "shipping_subdistrict": "<string>",
  "shipping_postal_code": "<string>",
  "shipping_location_id": 123,
  "address": "<string>",
  "location": "<string>",
  "location_id": 123,
  "postal_code": "<string>",
  "sub_payment_method": "<string>",
  "courier_service_id": 123,
  "warehouse_unique_id": "<string>",
  "courier_aggregator_code": "<string>",
  "discount_code_code": "<string>",
  "notes": "<string>"
}
'
{
  "id": 123,
  "secret_slug": "<string>",
  "public_order_url": "<string>",
  "payment_url": "<string>",
  "order_id": "<string>",
  "status": "<string>",
  "payment_status": "<string>",
  "gross_revenue": "<string>",
  "product_price": "<string>",
  "shipping_cost": "<string>",
  "pg_payment_info": {},
  "payment_method": "bank_transfer",
  "orderlines": [
    {}
  ],
  "business": {},
  "is_probably_spam": true,
  "mark_as_spam_by": "<string>",
  "draft_time": "2023-11-07T05:31:56Z",
  "paid_time": "2023-11-07T05:31:56Z",
  "transfer_time": "2023-11-07T05:31:56Z",
  "transferproof_url": "<string>",
  "chat_message": "<string>",
  "customer_id": 123,
  "discount_code_id": 123,
  "discount_code_code": "<string>",
  "handler_id": 123,
  "page": {},
  "scalev_fee": "<string>",
  "payment_fee": "<string>",
  "net_payment_revenue": "<string>",
  "net_revenue": "<string>",
  "product_discount": "<string>",
  "shipping_discount": "<string>",
  "other_income": "<string>",
  "other_income_name": "<string>",
  "unique_code_discount": "<string>",
  "discount_code_discount": "<string>",
  "discount_code_applied_to": "<string>",
  "status_history": [
    {}
  ],
  "payment_status_history": [
    {}
  ],
  "sub_payment_method": "<string>",
  "epayment_provider": "<string>",
  "payment_account_holder": "<string>",
  "payment_account_number": "<string>",
  "shipment_status_history": [
    {}
  ],
  "shipment_status": "<string>",
  "shipment_receipt": "<string>",
  "courier_service": {},
  "variants": {},
  "bundle_price_options": {},
  "final_variants": {},
  "payment_expiration_at": "2023-11-07T05:31:56Z",
  "affiliate_business_id": 123,
  "affiliate_code": "<string>",
  "affiliate_source": "<string>",
  "store_custom_domain": {},
  "store": {},
  "destination_address": {},
  "customer": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.scalev.com/llms.txt

Use this file to discover all available pages before exploring further.

Header

X-Scalev-Storefront-Api-Key
string
wajib

Publishable storefront public API key for the target store.

X-Scalev-Guest-Token
string<uuid>

Browser-safe guest cart token returned by the first guest-cart response when no token is sent. Send it on later guest-cart and public checkout calls to keep the same cart after reloads.

Parameter Path

store_id
string
wajib

Store unique_id.

Body

application/json
customer_name
string
wajib
Maximum string length: 200
customer_email
string<email>
wajib
Maximum string length: 254
payment_method
string
wajib

Storefront payment method code selected by the buyer.

Contoh:

"bank_transfer"

items
object[]

Optional direct item source. If supplied, direct items create the order. If X-Scalev-Guest-Token references a guest cart, that cart is cleared after successful order creation. If omitted, the guest cart referenced by X-Scalev-Guest-Token creates the order.

Required array length: 1 - 50 elements
customer_phone
string | null
Maximum string length: 20
shipping_address
string | null
shipping_province
string | null
shipping_city
string | null
shipping_subdistrict
string | null
shipping_postal_code
string | null
shipping_location_id
address
string | null
usang
location
string | null
usang
location_id
postal_code
string | null
usang
sub_payment_method
string | null
courier_service_id
integer | null
warehouse_unique_id
string | null
courier_aggregator_code
string | null
discount_code_code
string | null
notes
string | null

Respons

Public checkout order

id
integer
wajib
secret_slug
string
wajib
public_order_url
string<uri> | null
wajib
payment_url
string<uri> | null
wajib
order_id
string
wajib
status
string
wajib
payment_status
string | null
wajib
gross_revenue
wajib
product_price
wajib
shipping_cost
wajib
pg_payment_info
object
wajib

Buyer-facing payment gateway payload. Manual methods such as bank_transfer and cod can return an empty object. Virtual account methods expose provider reference and account details under the provider's payment_method object. QRIS responses expose QR data or a QR image payload. E-wallet, card, and invoice methods may expose provider actions or hosted provider URLs.

payment_method
string
wajib
Contoh:

"bank_transfer"

orderlines
object[]
wajib
business
object
is_probably_spam
boolean | null
mark_as_spam_by
string | null
draft_time
string<date-time> | null
paid_time
string<date-time> | null
transfer_time
string<date-time> | null
transferproof_url
string | null
chat_message
string | null
customer_id
integer | null
discount_code_id
integer | null
discount_code_code
string | null
handler_id
integer | null
page
object
scalev_fee
payment_fee
net_payment_revenue
net_revenue
product_discount
shipping_discount
other_income
other_income_name
string | null
unique_code_discount
discount_code_discount
discount_code_applied_to
string | null
status_history
object[]
payment_status_history
object[]
sub_payment_method
string | null
epayment_provider
string | null
payment_account_holder
string | null
payment_account_number
string | null
shipment_status_history
object[]
shipment_status
string | null
shipment_receipt
string | null
courier_service
object
variants
object
bundle_price_options
object
final_variants
object
payment_expiration_at
string<date-time> | null
affiliate_business_id
integer | null
affiliate_code
string | null
affiliate_source
string | null
store_custom_domain
object
store
object
destination_address
object
customer
object