> ## Documentation Index
> Fetch the complete documentation index at: https://docs.starkfi.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create order

> Define a reusable checkout order. Payments linked to an order are treated as checkout and do not require KYC/KYB.

<Info>
  Orders represent **checkout** flows. When you register a payment with the order's `order_code`, StarkFi sets `executor_id` to `order_transaction` and **skips KYC/KYB** validation on transaction creation — regardless of payment method.

  Use [`POST /payment/register/intents-create-order`](/register-order-trasanction) with `order_code` to start checkout from a pre-created order.
</Info>

## Creating an order

```shellscript theme={null}
POST /order/create
```

<Steps>
  <Step title="Creating an order">
    Creating a fixed order 

    ## Request Body

    | Parameter                                 | Type    | Required | Description                                                                                       |
    | ----------------------------------------- | ------- | -------- | ------------------------------------------------------------------------------------------------- |
    | `executor_id`                             | string  | ✅        | Transaction executor type. Use `api_transaction` when request comes via API                       |
    | `from_currency_symbol`                    | string  | ✅        | Source currency code (e.g. `BRL`, `USD`)                                                          |
    | `amount_from`                             | string  | ✅        | Amount to be converted from source currency (e.g. `"150.00"`)                                     |
    | `to_currency_symbol`                      | string  | ✅        | Target currency code (e.g. `USDT`)                                                                |
    | `to_chain`                                | string  | ✅        | Destination blockchain network to receive the selected currency (e.g. `solana`)                   |
    | `on_ramp`                                 | boolean | ✅        | Set `true` for on-ramp flow, `false` for off-ramp                                                 |
    | `gateway_method`                          | string  | ✅        | Gateway processing method. Use `direct` for direct processing or `subs` for subscription payments |
    | `payment_method_allowed`                  | object  | ✅        | Object defining which payment methods are enabled                                                 |
    | `payment_method_allowed.pixcrypto`        | boolean |          | Enable PIX → Crypto payments                                                                      |
    | `payment_method_allowed.cardcrypto`       | boolean |          | Enable Card → Crypto payments                                                                     |
    | `payment_method_allowed.cardfiat`         | boolean |          | Enable Card → Fiat payments                                                                       |
    | `payment_method_allowed.cryptopix`        | boolean |          | Enable Crypto → PIX payments                                                                      |
    | `payment_method_allowed.crypto`           | boolean |          | Enable Crypto → Crypto payments                                                                   |
    | `order_items`                             | array   |          | List of items in the order                                                                        |
    | `order_items[].name`                      | string  |          | Product name                                                                                      |
    | `order_items[].description`               | string  |          | Product description                                                                               |
    | `order_items[].quantity`                  | number  |          | Quantity of the item                                                                              |
    | `order_items[].image_url`                 | string  |          | URL of the product image                                                                          |
    | `split_payment_config`                    | array   | ✅        | List of receivers for payment splitting                                                           |
    | `split_payment_config[].receiver_wallet`  | string  | ✅        | Wallet address to receive the funds                                                               |
    | `split_payment_config[].receiver_percent` | number  | ✅        | Percentage of the payment this wallet receives (0–100)                                            |
  </Step>

  <Step title="Request example">
    ```shellscript expandable theme={null}
    curl --request POST \
      --url https://api.starkfi.io/order/create \
      --header 'Content-Type: application/json' \
      --header 'x-api-key: <api_key>' \
      --data '{
      "executor_id": "api_transaction",
      "tenant_data": {
        "public_client_id": "cmngy66mw0000e6y0uowcbxgf",
        "webhook_url": "https://webhook.site/97b5142a-1cb7-4142-8306-3d98a93e9a79"
      },
      "payment_method_allowed": {
        "pixcrypto": true,
        "cardcrypto": true,
        "cardfiat": true,
        "cryptopix": true,
        "crypto": true
      },
      "order_items": [
        {
          "name": "Produto Teste",
          "description": "Descrição do produto",
          "quantity": 1,
          "image_url": "https://example.com/produto.png"
        }
      ],
      "split_payment_config": [
        {
          "receiver_wallet": "0x9b57847b69D0354837F7b723133B9dBCbefb4F9F",
          "receiver_percent": 100
        }
      ],
      "gateway_method": "direct",
      "from_currency_symbol": "BRL",
      "amount_from": "150.00",
      "to_currency_symbol": "USDT",
      "to_chain": "solana",
      "on_ramp": false
    }'
    ```
  </Step>

  <Step title="Expected response">
    ```json theme={null}
    {
        "statusCode": 200,
        "success": true,
        "status": "order_created",
        "message": "Order created successfully.",
        "data": {
            "order_id": "cmoly2p17000101nm1vglh3u5"
        }
    }
    ```
  </Step>
</Steps>

You can now make calls to register a transaction order using the returned `order_id`, as follows:

```shellscript theme={null}
curl --request POST \
  --url https://api.starkfi.io/payment/register/intents-create-order \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api_key>' \
  --data '{
	"order_code": "cmoly2p17000101nm1vglh3u5"
  },
```
