search

No results found

API Reference chevron_right Sandbox Order
science TESTING

Sandbox Order

Endpoint untuk testing order tanpa memotong saldo. Gunakan endpoint ini untuk menguji integrasi API sebelum go-live.

warning

Catatan: Transaksi sandbox tidak akan memotong saldo dan tidak akan mengirim produk. Gunakan hanya untuk testing.

POST /v1/order/sandbox

Request Body

Parameter Type Description
ref_id Required string ID referensi unik.
items Required array Daftar item (min 1).
items[].product_id Required integer ID produk (products.id).
items[].variant_id Required integer ID varian (product_variants.id). Harus milik product_id di atas.
items[].quantity Required integer Jumlah item (min 1).
items[].note Optional string Data tujuan bila diperlukan (mis. User ID|Server).

Example Request

curl --request POST \
                  --url https://sekalipay.com/api/v1/order/sandbox \
                  --header 'X-APIKEY: YOUR_API_KEY' \
                  --header 'Content-Type: application/json' \
                  --data '{
                    "ref_id": "TEST-001",
                    "items": [
                      {
                        "product_id": 10,
                        "variant_id": 123,
                        "quantity": 1
                      }
                    ]
                  }'

Response Sample

200 OK
{
                  "status": true,
                  "message": "Order berhasil dibuat (sandbox)",
                  "transaction_id": 99999,
                  "payment_service": "QRIS_CUSTOM",
                  "amount": 15000,
                  "fee_flat": 0,
                  "fee_percentage": 0.7,
                  "total_fee": 105,
                  "total_bayar": 15105,
                  "items": [ /* ... */ ]
                }
chat_bubble Feedback