POST
/
v1
/
order
curl --location --request POST 'https://api.stateset.network/v1/order' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
    "id": "1",
    "name": "Sample Order",
    "number": "12345",
    "customerID": "customer_001",
    "items": [
        {
            "productID": "product_001",
            "productName": "Product 1",
            "quantity": 2,
            "price": "20.00"
        },
        {
            "productID": "product_002",
            "productName": "Product 2",
            "quantity": 1,
            "price": "15.00"
        }
    ],
    "totalAmount": "55.00",
    "paymentStatus": "unpaid",
    "paymentMethod": {
        "type": "usdc",
        "wallet_address": "cosmos1abc123def456..."
    },
    "shippingStatus": "not shipped",
    "metadata": {
        "specialInstructions": "Leave at front door"
    }
}'

{
  "source": "<string>",
  "success": 123,
  "order": {}
}

Body

id
string

This is the ID of the order to be created.

name
string

This is the name of the order.

number
string

This is the number of the order.

source
string
required

This is the source of the order.

customerID
string

This is the ID of the customer who placed the order.

items
array

This is the list of items in the order.

totalAmount
string

This is the total amount of the order in USDC.

paymentStatus
string

This is the payment status of the order. Options: “unpaid”, “pending”, “paid”, “partially_paid”, “failed”

paymentMethod
object

The preferred payment method for this order.

shippingStatus
string

This is the shipping status of the order.

metadata
object

This is additional metadata related to the order.

Response

success
number

Indicates whether the call was successful. 1 if successful, 0 if not.

order
object

The created order object with all details including payment information.

Notes

  • Orders are created with paymentStatus: "unpaid" by default
  • To pay for an order after creation, use the Pay Order endpoint
  • All monetary amounts should be specified in USDC
  • StateSet Commerce Network uses native USDC - no bridging required
curl --location --request POST 'https://api.stateset.network/v1/order' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
    "id": "1",
    "name": "Sample Order",
    "number": "12345",
    "customerID": "customer_001",
    "items": [
        {
            "productID": "product_001",
            "productName": "Product 1",
            "quantity": 2,
            "price": "20.00"
        },
        {
            "productID": "product_002",
            "productName": "Product 2",
            "quantity": 1,
            "price": "15.00"
        }
    ],
    "totalAmount": "55.00",
    "paymentStatus": "unpaid",
    "paymentMethod": {
        "type": "usdc",
        "wallet_address": "cosmos1abc123def456..."
    },
    "shippingStatus": "not shipped",
    "metadata": {
        "specialInstructions": "Leave at front door"
    }
}'