curl --location --request POST 'https://api.stateset.network/v1/order' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"name": "Premium Subscription Order",
"number": "ORD-2024-001",
"source": "web_checkout",
"customerID": "cust_123456",
"items": [
{
"product_id": "prod_premium_annual",
"quantity": 1,
"price": "150.00",
"name": "Premium Annual Subscription"
}
],
"totalAmount": {
"value": "150.00",
"denom": "ssusd"
},
"paymentStatus": "unpaid",
"paymentMethod": {
"type": "ssusd",
"wallet_address": "stateset1qypqxpq9qcrsszg2pvxq6rs0zqg3yyc5lzv7xu",
"chain": "stateset"
}
}'
{
"success": 1,
"order": {
"id": "order_1a2b3c4d5e6f",
"name": "Premium Subscription Order",
"number": "ORD-2024-001",
"source": "web_checkout",
"customerID": "cust_123456",
"items": [
{
"product_id": "prod_premium_annual",
"quantity": 1,
"price": "150.00",
"name": "Premium Annual Subscription"
}
],
"totalAmount": {
"value": "150.00",
"denom": "ssusd"
},
"paymentStatus": "unpaid",
"paymentMethod": {
"type": "ssusd",
"wallet_address": "stateset1qypqxpq9qcrsszg2pvxq6rs0zqg3yyc5lzv7xu",
"chain": "stateset"
},
"status": "pending",
"created_at": "2024-01-15T12:00:00Z"
}
}
This endpoint creates a new order.
curl --location --request POST 'https://api.stateset.network/v1/order' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"name": "Premium Subscription Order",
"number": "ORD-2024-001",
"source": "web_checkout",
"customerID": "cust_123456",
"items": [
{
"product_id": "prod_premium_annual",
"quantity": 1,
"price": "150.00",
"name": "Premium Annual Subscription"
}
],
"totalAmount": {
"value": "150.00",
"denom": "ssusd"
},
"paymentStatus": "unpaid",
"paymentMethod": {
"type": "ssusd",
"wallet_address": "stateset1qypqxpq9qcrsszg2pvxq6rs0zqg3yyc5lzv7xu",
"chain": "stateset"
}
}'
{
"success": 1,
"order": {
"id": "order_1a2b3c4d5e6f",
"name": "Premium Subscription Order",
"number": "ORD-2024-001",
"source": "web_checkout",
"customerID": "cust_123456",
"items": [
{
"product_id": "prod_premium_annual",
"quantity": 1,
"price": "150.00",
"name": "Premium Annual Subscription"
}
],
"totalAmount": {
"value": "150.00",
"denom": "ssusd"
},
"paymentStatus": "unpaid",
"paymentMethod": {
"type": "ssusd",
"wallet_address": "stateset1qypqxpq9qcrsszg2pvxq6rs0zqg3yyc5lzv7xu",
"chain": "stateset"
},
"status": "pending",
"created_at": "2024-01-15T12:00:00Z"
}
}
paymentStatus: "unpaid" by defaultcurl --location --request POST 'https://api.stateset.network/v1/order' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"name": "Premium Subscription Order",
"number": "ORD-2024-001",
"source": "web_checkout",
"customerID": "cust_123456",
"items": [
{
"product_id": "prod_premium_annual",
"quantity": 1,
"price": "150.00",
"name": "Premium Annual Subscription"
}
],
"totalAmount": {
"value": "150.00",
"denom": "ssusd"
},
"paymentStatus": "unpaid",
"paymentMethod": {
"type": "ssusd",
"wallet_address": "stateset1qypqxpq9qcrsszg2pvxq6rs0zqg3yyc5lzv7xu",
"chain": "stateset"
}
}'
{
"success": 1,
"order": {
"id": "order_1a2b3c4d5e6f",
"name": "Premium Subscription Order",
"number": "ORD-2024-001",
"source": "web_checkout",
"customerID": "cust_123456",
"items": [
{
"product_id": "prod_premium_annual",
"quantity": 1,
"price": "150.00",
"name": "Premium Annual Subscription"
}
],
"totalAmount": {
"value": "150.00",
"denom": "ssusd"
},
"paymentStatus": "unpaid",
"paymentMethod": {
"type": "ssusd",
"wallet_address": "stateset1qypqxpq9qcrsszg2pvxq6rs0zqg3yyc5lzv7xu",
"chain": "stateset"
},
"status": "pending",
"created_at": "2024-01-15T12:00:00Z"
}
}