# Create a new order

Endpoint: POST /order
Version: 2.0.0
Security: Ed25519

## Security:

  - `Ed25519` (unknown)
    apiKey in header Authorization

## Header parameters:

  - `X-API-Key-ID` (string, required)
    32-character Base58 credential ID returned after public-key registration.

  - `X-API-Timestamp` (string, required)
    Unix timestamp in seconds; tolerance is ±300 seconds.

  - `X-API-Nonce` (string, required)
    16 cryptographically random bytes encoded as unpadded Base64URL; fresh on every attempt.

  - `Digest` (string, required)
    SHA-256= followed by standard padded Base64 of SHA-256 of exact request body bytes. Required even for an empty body; included in the signing string.

  - `Authorization` (string, required)
    Use `Ed25519 signature="BASE64_SIGNATURE"`, where BASE64_SIGNATURE is the standard padded Base64 signature. See /docs/en/4-authorization for the exact signing string.

## Request fields (application/json):

  - `client_reference` (string)
    Client Reference

  - `request_id` (string, required)
    request id (unique)

  - `order_desc` (string)
    Order description

  - `currency` (string)
    Order currency (USD, EUR, GBP, CAD, SGD, AUD)

  - `amount` (string, required)
    Order amount. The minimum is greater than 0.1 for crypto acquiring; fiat payment methods require at least 16.

  - `merchant_alias` (string)
    customized merchant alias (optional)

  - `expires_in` (integer)
    Time to live in seconds (e.g., 3600 for 1 hour, 0 for default order expires time)

  - `success_url` (string)
    Success redirect Url

  - `failure_url` (string)
    Failure redirect Url

  - `pay_methods` (array)
    Enabled payment modes for this order (optional, inherits from merchant config if not specified)

  - `email` (string)
    Payer email (optional)

## Response 200 fields (application/json):

  - `client_reference` (string)

  - `request_id` (string)

  - `order_id` (string)
    Order id

  - `checkout_url` (string)
    Checkout url

  - `token` (string)
    Token

## Response 401:

  - `401` (unknown)
    Authentication failed: invalid/disabled credential, signature, timestamp, nonce or digest.

## Response 403:

  - `403` (unknown)
    Authenticated credential lacks permission or the client IP is not allowed.

