Orders

Create an order

Authorize a new order for a customer.

post/orders

Request

Request body

amountnumber double required

Amount to authorize for the order in USD.

customer_idstring required

Unique identifier of the customer placing the order.

order_numberstring

Your internal order number.

po_numberstring

Purchase order number.

advance_requestedboolean

Whether to request an advance on this order.

sourcestring

Source channel creating the order.

metadataobject

Custom metadata to attach to the order.

Example request

{
  "amount": 1000,
  "customer_id": "X50sgfRd",
  "line_items": [
    {
      "name": "Widget A",
      "quantity": 2,
      "unit_price": 50,
      "sku": "ABC-123",
      "total_price": 100,
      "type": "product",
      "tax_amount": 8.5
    }
  ],
  "order_number": "5055",
  "po_number": "PO-555",
  "source": "checkout",
  "metadata": {
    "internal_ref": "ref-001"
  }
}

Response

An object representing an order.

idstring

Unique identifier for the order.

checkout_idstring

ID of the checkout session associated with this order.

numberstring

Order number identifier.

po_numberstring

Purchase order number associated with the order.

advance_requestedboolean

Whether an advance was requested for this order.

sourcestring

Source channel that created the order.

statusstring

Current status of the order.

amount_authorizednumber double

Total authorized amount for the order in USD.

amount_capturednumber double

Total captured amount for the order in USD.

amount_cancelednumber double

Total canceled amount for the order in USD.

amount_remainingnumber double

Remaining authorized amount available for capture in USD.

first_captured_atstring date-time nullable

Timestamp of the first capture event.

authorization_expires_atstring date-time

Timestamp when the authorization expires.

authorization_expiry_sourcestring

Source that determined the authorization expiry.

authorized_atstring date-time

Timestamp when the order was authorized.

updated_atstring date-time

Timestamp when the order was last updated.

Example response

{
  "id": "ORDlaE5wbg0",
  "checkout_id": "CHKabc123",
  "number": "ord_100001",
  "po_number": "PO-555",
  "source": "checkout",
  "status": "authorized",
  "amount_authorized": 1000,
  "amount_captured": 500,
  "amount_remaining": 500,
  "first_captured_at": "2024-01-15T10:00:00.000Z",
  "line_items": [
    {
      "name": "Widget A",
      "quantity": 2,
      "unit_price": 50,
      "sku": "ABC-123",
      "total_price": 100,
      "type": "product",
      "tax_amount": 8.5
    }
  ],
  "authorization_expires_at": "2024-02-15T10:00:00.000Z",
  "authorization_expiry_source": "system",
  "capture_events": [
    {
      "amount": 500,
      "idempotency_key": "capture-2024-001",
      "processed_at": "2024-01-15T10:00:00.000Z",
      "invoice_id": "INabc123"
    }
  ],
  "authorized_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-01-15T10:00:00.000Z",
  "customer": {
    "id": "X50sgfRd",
    "name": "Acme Corp",
    "remaining_credit": 5000
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.