---
updatedAt: 2026-06-01T10:09:47.000Z
agentTools:
  projectIndex: https://docs.sodagift.com/llms.txt
---

# Create a new order

Creates a single-item order, charged against your account balance.

Common `400` error codes: `account_balance_insufficient`, `invalid_request`, `invalid_phone_number_format`. A `500` with `order_retry_needed` means a temporary concurrency conflict — the request can be safely retried (use `external_reference_id` to make retries idempotent).


# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "SodaGift Biz API",
    "description": "API for sending gifts and rewards worldwide.\n\n**Base URLs**\n- Sandbox: `https://biz-sandbox-api.sodagift.com`\n- Production: `https://biz-api.sodagift.com`\n\nAll requests must include your API key in the `SODA-API-KEY` header. Sandbox keys are prefixed with `sodagift_test_`, production keys with `sodagift_live_`.\n",
    "version": "1.0.0",
    "contact": {
      "name": "Support Team",
      "email": "support@sodagift.com",
      "url": "https://sodagift.com/help"
    }
  },
  "servers": [
    {
      "url": "https://biz-sandbox-api.sodagift.com",
      "description": "Sandbox server"
    }
  ],
  "tags": [
    {
      "name": "Orders",
      "description": "Operations related to orders"
    }
  ],
  "security": [
    {
      "api_key": []
    }
  ],
  "components": {
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "SODA-API-KEY",
        "in": "header",
        "description": "Your API key, issued from Settings > Developer Settings in the SodaGift for Biz dashboard. Requests with a missing or invalid key receive a `401` response with an empty body.\n"
      }
    },
    "schemas": {
      "OrderId": {
        "type": "integer",
        "description": "ID of the created order"
      },
      "OrderItemId": {
        "type": "integer",
        "description": "ID of the created order item"
      },
      "OrderStatus": {
        "type": "string",
        "description": "Condition of your order.\n\n- `COMPLETED`: Payment settled and the order is being (or has been) fulfilled.\n- `PAYMENT_PENDING`: The order is waiting for payment to be settled.\n- `PAYMENT_EXPIRED`: Payment was not completed in time and the order will not be fulfilled.\n- `CANCELLED`: The order was cancelled.\n",
        "enum": [
          "COMPLETED",
          "CANCELLED",
          "PAYMENT_PENDING",
          "PAYMENT_EXPIRED"
        ],
        "example": "COMPLETED"
      },
      "OrderItemStatus": {
        "type": "string",
        "description": "Condition of your order item.\n\n- `PENDING`: The item has not been delivered to the recipient yet (e.g. issuing in progress, or waiting for the recipient to enter their delivery information).\n- `COMPLETED`: The item has been issued and delivered.\n- `CANCELLED`: The item was cancelled.\n",
        "enum": [
          "PENDING",
          "COMPLETED",
          "CANCELLED"
        ],
        "example": "COMPLETED"
      },
      "AppliedExchangeRate": {
        "type": "object",
        "properties": {
          "rate": {
            "type": "number",
            "format": "float",
            "description": "Exchange rate applied at time of order"
          },
          "currency": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string",
                "description": "Source currency"
              },
              "to": {
                "type": "string",
                "description": "Target currency"
              }
            }
          }
        }
      },
      "DeliveryMethod": {
        "type": "string",
        "description": "This determines how the voucher will be delivered to the recipient.",
        "enum": [
          "TEXT",
          "EMAIL",
          "LINK",
          "DIRECT_SHIPPING",
          "CODE"
        ],
        "example": "EMAIL"
      },
      "RecipientForRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of recipient to whom the products will be delivered."
          },
          "phone_number": {
            "type": "string",
            "description": "Recipient's phone number. Required for the `TEXT` delivery method.\n\nKorean and Japanese numbers are normalized before they are checked, so the country code and separators are optional. For a Korean product, `01012345678`, `010-1234-5678`, `1012345678`, `821012345678` and `+82 10-1234-5678` are all accepted and stored as `01012345678`.\n\nA Korean number must still be a valid mobile number once normalized: 10 or 11 digits beginning with `01`. Anything else, a landline for example, is rejected with `invalid_phone_number_format`.\n\nFor other countries, enter the number in the local format of the product's country.\n"
          },
          "email": {
            "type": "string",
            "description": "Recipient's email address. Required for the `EMAIL` delivery method.\n\nDo not send this field with any other delivery method. In particular, omit it for `LINK` orders: you deliver the link yourself, so SodaGift never uses the address.\n"
          },
          "address": {
            "type": "object",
            "description": "Address information for the recipient (required for 'DIRECT SHIPPING' delivery method)",
            "properties": {
              "line1": {
                "type": "string",
                "description": "First line of the address (e.g., street name and number)"
              },
              "line2": {
                "type": "string",
                "description": "Second line of the address (e.g., apartment, suite, unit, building)"
              },
              "locality": {
                "type": "string",
                "description": "City or locality of the recipient (equivalent to 'city')"
              },
              "administrative_area": {
                "type": "string",
                "description": "State, province, or region (equivalent to 'state')"
              },
              "postal_code": {
                "type": "string",
                "description": "ZIP or postal code"
              }
            }
          }
        }
      },
      "SenderForRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "example": "Jane Doe",
            "description": "The name you want to convey to the recipient."
          },
          "email": {
            "type": "string",
            "example": "sender@sodagift.com",
            "description": "The email address that will be used as replyTo when 'EMAIL' delivery method is selected."
          }
        }
      },
      "TotalPriceCharged": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "format": "float",
            "description": "Amount charged",
            "example": 50
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "applied_exchange_rate": {
            "$ref": "#/components/schemas/AppliedExchangeRate",
            "description": "Omitted when no currency conversion was applied."
          }
        }
      },
      "Currency": {
        "type": "string",
        "enum": [
          "USD",
          "KRW",
          "CAD",
          "AUD",
          "GBP",
          "SGD",
          "PHP",
          "JPY",
          "INR",
          "IDR",
          "EUR",
          "MYR",
          "THB",
          "TWD",
          "VND",
          "CNY",
          "HKD"
        ]
      },
      "Price": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "format": "float",
            "description": "Amount charged",
            "example": 100
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          }
        }
      },
      "V1_OrderCreateSingleRequest": {
        "type": "object",
        "required": [
          "item",
          "delivery"
        ],
        "properties": {
          "item": {
            "required": [
              "id"
            ],
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "ID of the product you wish to order. Please refer to the availability field in the response from the [GET v1/products](https://docs.sodagift.com/reference/getproducts-1) API. Orders can only be placed for products with an availability status of 'ON_SALE'.",
                "example": 5000
              }
            }
          },
          "delivery": {
            "type": "object",
            "required": [
              "method"
            ],
            "properties": {
              "method": {
                "description": "Specifies how the voucher will be delivered to the recipient.\n\n  - `TEXT`: The voucher is sent to the recipient via SMS. The sender must provide the recipient's phone number.\n\n  - `EMAIL`: The voucher is sent via email to the recipient. Typically, the sender must provide the recipient's email address.\n\n  - `LINK`: The sender receives a secure voucher link and is responsible for delivering it to the recipient through their own channel. This link allows the recipient to enter their own information and redeem the gift. The link can be retrieved through the order query APIs: [`Get a list of orders`](https://docs.sodagift.com/reference/getorders-1) or [`Get details of a single order`](https://docs.sodagift.com/reference/getorderbyid-1), via the `order_item.delivery.link` field in the response.\n\n  - `DIRECT_SHIPPING`: The sender directly provides the recipient's complete physical shipping address during order creation. Unlike the 'Recipient Provided Flow' described below, this method requires the sender to input and validate the shipping address at the time of order creation.\n\n  - `CODE`: The voucher is issued directly without delivering to a recipient. No recipient or sender information is required. The issued voucher code (value, pin, url) can be retrieved through the order query API via the `order_item.delivery.code` field.\n\nNote: In recipient-provided flows, the recipient is asked to enter their own delivery information through a secure link. This behavior is determined by the product's `recipient_info_provided_by` field (see [`Get product catalog`](https://docs.sodagift.com/reference/getproducts-1)).\n",
                "$ref": "#/components/schemas/DeliveryMethod",
                "nullable": false
              },
              "recipient": {
                "$ref": "#/components/schemas/RecipientForRequest"
              },
              "sender": {
                "$ref": "#/components/schemas/SenderForRequest"
              }
            }
          },
          "note": {
            "type": "string",
            "maxLength": 150,
            "example": "Additional notes you would like to enter",
            "nullable": true
          },
          "message": {
            "type": "string",
            "maxLength": 2000,
            "example": "Congratulation Sodagift!",
            "nullable": true
          },
          "external_reference_id": {
            "type": "string",
            "description": "Idempotency key. Use this field to safely retry order creation and prevent accidental duplicate orders. If an order with the same value already exists within your account, no new order is created — the API returns the existing order with a `200` response. If not provided, this behavior is not enforced.\n\nThe value must be an alphanumeric string (letters and numbers only) between 1 and 100 characters in length. This field is returned in the order creation response and order retrieval.\n",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "^[a-zA-Z0-9]+$",
            "nullable": true
          }
        }
      },
      "V1_OrderCreateSingleResponse": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/OrderId"
          },
          "status": {
            "$ref": "#/components/schemas/OrderStatus"
          },
          "external_reference_id": {
            "type": "string",
            "description": "Value entered when creating an order"
          },
          "order_item": {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/components/schemas/OrderItemId"
              },
              "status": {
                "$ref": "#/components/schemas/OrderItemStatus"
              },
              "price": {
                "$ref": "#/components/schemas/Price"
              },
              "transaction_fee_rate": {
                "type": "number",
                "nullable": true,
                "description": "Transaction fee rate applied to this order item. A value of 0.05 represents a 5% fee. Mutually exclusive with discount."
              },
              "discount": {
                "type": "object",
                "nullable": true,
                "description": "Discount applied to this order item. Omitted when discount policy is EXEMPT. Mutually exclusive with transaction_fee_rate.",
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "Discount policy type (FIXED_RATE_BY_BRAND or MARGIN_SHARE)"
                  },
                  "rate": {
                    "type": "number",
                    "description": "Discount rate applied. A value of 0.1 represents a 10% discount."
                  }
                }
              }
            }
          },
          "total_price_charged": {
            "$ref": "#/components/schemas/TotalPriceCharged"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "description": "Standard error body returned by all endpoints (except `401`, which returns an empty body). See the [Errors guide](https://docs.sodagift.com/docs/errors) for the full list of error codes.\n",
        "properties": {
          "errorCode": {
            "type": "string",
            "description": "Machine-readable error code in snake_case (e.g. `account_balance_insufficient`).",
            "example": "invalid_request"
          },
          "message": {
            "type": "string",
            "description": "Human-readable description of the error.",
            "example": "Invalid request"
          }
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Missing or invalid API key. The response body is empty."
      },
      "UnhandledError": {
        "description": "An unexpected error occurred. If `errorCode` is `order_retry_needed`, the request can be safely retried.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "ResourceNotFound": {
        "description": "Request resource does not exist.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "InvalidRequest": {
        "description": "Occurs when an invalid request or value is passed. Check `errorCode` for more details.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "RateLimitExceeded": {
        "description": "Too many requests. The API allows up to 10 requests per second per API key. Check the `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` response headers, and wait 1 second before retrying.\n",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      }
    }
  },
  "paths": {
    "/v1/orders": {
      "post": {
        "operationId": "V1createOrder",
        "summary": "Create a new order",
        "description": "Creates a single-item order, charged against your account balance.\n\nCommon `400` error codes: `account_balance_insufficient`, `invalid_request`, `invalid_phone_number_format`. A `500` with `order_retry_needed` means a temporary concurrency conflict — the request can be safely retried (use `external_reference_id` to make retries idempotent).\n",
        "tags": [
          "Orders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1_OrderCreateSingleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Order created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1_OrderCreateSingleResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitExceeded"
          },
          "500": {
            "$ref": "#/components/responses/UnhandledError"
          }
        }
      }
    }
  }
}
```