Skip to main content
POST
/
v3
/
stores
/
{store_id}
/
customers
/
me
/
checkout
Create an authenticated customer checkout order
curl --request POST \
  --url https://api.scalev.com/v3/stores/{store_id}/customers/me/checkout \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "payment_method": "bank_transfer",
  "items": [
    {
      "type": "variant",
      "variant_id": 2,
      "quantity": 50
    }
  ],
  "cart_id": 123,
  "address_id": 123,
  "address": "<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": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "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": [
    {
      "quantity": 123,
      "product_name": "<string>",
      "item_type": "<string>",
      "variant_option1_value": "<string>",
      "variant_option2_value": "<string>",
      "variant_option3_value": "<string>",
      "variant_price": "<string>"
    }
  ],
  "business": {
    "username": "<string>",
    "contact_email": "<string>",
    "aff_code": "<string>",
    "logo": "<string>"
  },
  "is_probably_spam": true,
  "draft_time": "2023-11-07T05:31:56Z",
  "paid_time": "2023-11-07T05:31:56Z",
  "transfer_time": "2023-11-07T05:31:56Z",
  "transferproof_url": "<string>",
  "handler_phone": "<string>",
  "chat_message": "<string>",
  "customer_id": 123,
  "discount_code_code": "<string>",
  "page": {
    "slug": "<string>"
  },
  "product_discount": "<string>",
  "shipping_discount": "<string>",
  "other_income": "<string>",
  "other_income_name": "<string>",
  "unique_code_discount": "<string>",
  "discount_code_discount": "<string>",
  "status_history": [
    {}
  ],
  "sub_payment_method": "<string>",
  "epayment_provider": "<string>",
  "payment_account_holder": "<string>",
  "payment_account_number": "<string>",
  "shipment_status_history": [
    {
      "timestamp_source": "<string>",
      "status": "<string>",
      "description": "<string>"
    }
  ],
  "shipment_receipt": "<string>",
  "courier_service": {
    "name": "<string>",
    "courier": {
      "name": "<string>"
    }
  },
  "variants": {},
  "bundle_price_options": {},
  "payment_expiration_at": "2023-11-07T05:31:56Z",
  "store_custom_domain": {
    "full_url": "<string>"
  },
  "store": {
    "name": "<string>",
    "payment_accounts": [
      {
        "id": 123,
        "account_holder": "<string>",
        "account_number": "<string>",
        "method": "<string>",
        "financial_entity": {
          "id": 123,
          "name": "<string>",
          "code": "<string>"
        }
      }
    ],
    "custom_domain": {
      "full_url": "<string>"
    },
    "days_of_payment_processing": 123,
    "is_auto_expire": true,
    "auto_expire_days": 123,
    "is_show_whatsapp": true,
    "is_show_download_invoice": true
  },
  "destination_address": {
    "name": "<string>",
    "phone": "<string>",
    "address": "<string>",
    "subdistrict": "<string>",
    "city": "<string>",
    "province": "<string>"
  },
  "customer": {
    "email": "<string>"
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

store_id
string
required

Store unique_id.

Body

application/json
payment_method
string
required

Customer checkout payment method code selected by the buyer.

Example:

"bank_transfer"

items
object[]

Optional direct item source. If supplied, direct items create the order. If cart_id is also supplied, the referenced cart is cleared after successful order creation.

Required array length: 1 - 50 elements
cart_id

Authenticated customer cart ID. Used as the order source when items is omitted. When items is also supplied, the cart is only cleared after successful order creation.

address_id
address
string
location_id
postal_code
string
sub_payment_method
string | null
courier_service_id
warehouse_unique_id
string | null
courier_aggregator_code
string | null
discount_code_code
string | null
notes
string | null

Response

Customer checkout order

id
string<uuid>
required

Canonical UUIDv7 order primary key returned by the partitioned orders table.

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

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. SingaPay payments use normalized keys such as payment_url, deeplink_url, qr_string, qr_image_url, va_number, and va_name.

payment_method
string
required
Example:

"bank_transfer"

orderlines
object[]
required
business
object
is_probably_spam
boolean | null
draft_time
string<date-time> | null
paid_time
string<date-time> | null
transfer_time
string<date-time> | null
transferproof_url
string | null
handler_phone
string | null
chat_message
string | null
customer_id
integer | null
discount_code_code
string | null
page
object
product_discount
shipping_discount
other_income
other_income_name
string | null
unique_code_discount
discount_code_discount
status_history
object[]
sub_payment_method
string | null
epayment_provider
string | null

E-payment provider. Possible values include xendit, duitku, midtrans, ipaymu, and singapay.

payment_account_holder
string | null
payment_account_number
string | null
shipment_status_history
object[]
shipment_receipt
string | null
courier_service
object
variants
object
bundle_price_options
object
payment_expiration_at
string<date-time> | null
store_custom_domain
object
store
object
destination_address
object
customer
object