Langsung ke konten utama
POST
/
v3
/
stores
/
{store_id}
/
public
/
orders
/
{secret_slug}
/
payment
Create a payment for a public storefront order
curl --request POST \
  --url https://api.scalev.com/v3/stores/{store_id}/public/orders/{secret_slug}/payment \
  --header 'X-Scalev-Storefront-Api-Key: <x-scalev-storefront-api-key>'
{
  "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>"
  }
}

Header

X-Scalev-Storefront-Api-Key
string
wajib

Publishable storefront public API key for the target store. Page public API keys are not accepted on Storefront public routes.

Parameter Path

store_id
string
wajib

Store unique_id.

secret_slug
string
wajib

Respons

Public storefront order with payment instructions

id
string<uuid>
wajib

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

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

payment_method
string
wajib
Contoh:

"bank_transfer"

orderlines
object[]
wajib
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