# Create order This page provides instructions on creating an order using the Kustom Checkout (KCO) API. ## Authentication Kustom uses HTTP Basic Auth for authentication. The required credentials are: * Username: A username associated with your Kustom Merchant ID. * Password: A unique password associated with the username. Authentication is done using Base64 encoding of `username:password`. **Important:** Never share your test or live credentials. ## Endpoints (URLs) Kustom's environments have different endpoints for testing and live purchases. All requests use HTTPS. Refer to the [API URLs](/contents/api/api-basics/api-urls) documentation for details. ## Create Order Request Use a POST request to the appropriate test endpoint + `/checkout/v3/orders` with the header `content-type: application/json`. ```json { "purchase_country": "SE", "purchase_currency": "SEK", "locale": "en-SE", "order_amount": 50000, "order_tax_amount": 4545, "order_lines": [ { "type": "physical", "reference": "19-402-USA", "name": "Yellow T-Shirt", "quantity": 5, "quantity_unit": "pcs", "unit_price": 10000, "tax_rate": 1000, "total_amount": 50000, "total_discount_amount": 0, "total_tax_amount": 4545 } ], "merchant_urls": { "terms": "https://www.example.com/terms.html", "checkout": "https://www.example.com/checkout.html?order_id={checkout.order.id}", "confirmation": "https://www.example.com/confirmation.html?order_id={checkout.order.id}", "push": "https://www.example.com/api/push?order_id={checkout.order.id}" } } ``` **Important:** The example provided is for UK (GB) and uses mock URLs. Refer to the [API reference](/contents/api/checkout) for complete details and other use cases. ## Create Order Response The response includes: * `order_id`: A unique ID generated by Kustom. * `html_snippet`: A string to render the Kustom Checkout iframe on your page. See the next step in the integration guide for how to use this. ```json { "order_id": "8cf27b55-53e8-6aba-9fb4-7c692e56ddee", "status": "checkout_incomplete", "purchase_country": "SE", "purchase_currency": "SEK", "locale": "en-SE", "billing_address": { "country": "SE" }, "customer": {}, "shipping_address": { "country": "SE" }, "order_amount": 50000, "order_tax_amount": 4545, "order_lines": [ ... ], "merchant_urls": { ... }, "html_snippet": "