Orders

Create a new order

Changed on
post/orders

Request

  • Base URL: https://api.session.services
  • URL: https://api.session.services/orders
  • Auth: API key in header x-tenant-id

Request body

eventIdstring required

Unique identifier of the event for which to create the order

couponCodestring

Optional coupon code to apply discount to the order

returnUrlstring

Optional tenant-relative, same-tenant-origin, or explicitly approved native return URL. External web returns require returnDestinationKey.

returnDestinationKeystring

Registered checkout confirmation destination, fixed when the order is created.

idempotencyKeystring

Optional key that makes repeated order creation requests return the same order.

Example request

{
  "eventId": "evt_01jps5cgsenjrazw6wswmyspa3",
  "items": [
    {
      "quantity": 2,
      "admissionId": "adm_01jps5cgsee0xvapbk92e8eb4g",
      "sectionId": "sct_01jps5cgse0g3qj16kpq8t221r",
      "admission": {
        "id": "adm_01jps5cgsee0xvapbk92e8eb4g",
        "createdAt": "2026-10-17T08:46:46.697Z",
        "updatedAt": "2026-10-17T08:46:46.697Z",
        "sectionId": "sct_01jps5cgse0g3qj16kpq8t221r",
        "teamId": "tem_01jqpjksnsen9vprw95et60t2m",
        "promoterId": "pmt_01jqpjksnsen9vprw95et60t2m",
        "eventId": "evt_01jps5cgsenjrazw6wswmyspa3",
        "eventSlug": "test-event",
        "name": "Final Release",
        "subtitle": "Entry before 10pm",
        "description": "Early bird pricing with priority entry. Must present valid ID at gate.",
        "capacity": 100000,
        "limit": -1,
        "available": 70000,
        "sold": 20000,
        "reserved": 10000,
        "order": 0,
        "entryStartsAt": "2026-10-18T08:46:46",
        "entryEndsAt": "2026-10-19T08:46:46",
        "saleStartsAt": "2026-10-17T08:46:46",
        "saleEndsAt": "2026-10-19T08:46:46",
        "saleEndsBehavior": "SALE_ENDED",
        "price": {
          "base": 1000,
          "booking": 200,
          "currency": "AUD"
        },
        "visibility": "ALWAYS",
        "tenantId": "tnt_01jqpj2t2kfvmstt6f6tzkbaf2",
        "deleted": false,
        "orderPadded": "0000000000"
      },
      "section": {
        "id": "sct_01jps5cgse0g3qj16kpq8t221r",
        "createdAt": "2026-10-17T08:46:46.697Z",
        "updatedAt": "2026-10-17T08:46:46.697Z",
        "name": "General Admission",
        "capacity": 1000,
        "limit": -1,
        "available": 700,
        "sold": 200,
        "reserved": 100,
        "visibility": "ALWAYS",
        "location": {
          "id": "loc_01hk153x00eh99pagyydz03sbz",
          "googlePlaceId": "ChIJP3Sa8ziYEmsRUKgyFmh9AQM",
          "createdAt": "2026-10-17T08:46:46.696Z",
          "updatedAt": "2026-10-17T08:46:46.696Z",
          "name": "Watson's EQ",
          "address": "The, Entertainment Quarter, 1 Bent St, Moore Park NSW 2021, Australia",
          "city": "Moore Park",
          "state": "New South Wales",
          "postcode": "2021",
          "country": "Australia",
          "latitude": -33.8944593,
          "longitude": 151.2252255,
          "timeZone": "Australia/Sydney",
          "types": [
            "establishment",
            "point_of_interest",
            "stadium"
          ],
          "description": "Historic outdoor amphitheater known for summer concerts",
          "image": {
            "src": "https://assets.session.services/my-image.jpg",
            "alt": "My Image",
            "width": 1080,
            "height": 1080
          }
        },
        "promoterId": "pmt_01jqpjksnsen9vprw95et60t2m",
        "eventId": "evt_01jps5cgsenjrazw6wswmyspa3",
        "eventSlug": "test-event"
      },
      "id": "itm_01jps5cgsfwyxj0516571eaf17"
    }
  ],
  "couponCode": "TEST50",
  "returnUrl": "/orders",
  "channel": {
    "name": "tenant-web",
    "referrer": "https://sash.teams.mixmag.au/events/example-event",
    "utmSource": "instagram",
    "utmMedium": "social",
    "utmCampaign": "summer-launch",
    "deviceType": "MOBILE",
    "browser": "Chrome",
    "country": "Australia",
    "region": "Australia - New South Wales",
    "sessionId": "ses_01HX...",
    "anonymousId": "aid_01HX..."
  }
}

Response

OK

Example response

{
  "order": {
    "id": "ord_01jps5cgsfgve5b5g2666kyryh",
    "createdAt": "2026-10-17T08:46:46.697Z",
    "updatedAt": "2026-10-17T08:46:46.697Z",
    "status": "PENDING",
    "payment": {
      "method": "FREE",
      "source": "APPLEPAY",
      "brand": "VISA",
      "last4": "4242",
      "stripeId": "pi_1234567890abcdef",
      "stripeClientSecret": "pi_1234567890abcdef_secret_xyz",
      "stripeCustomerSessionClientSecret": "cuss_1234567890abcdef_secret_xyz",
      "stripeAccountId": "acct_1234567890abcdef",
      "airwallexId": "int_hkdmr7v9rg1j8donpkmv96",
      "airwallexClientSecret": "eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MDAwMDAwMDAsImV4cCI6MTcwMDAwMzYwMCwiaW50ZW50X2lkIjoiaW50X2hrZG1yN3Y5cmcxajhkb25wa212OTYifQ.K8vLx2nPzQHdR5mT1wYcBfJkLmNpS3xG7aE9dH4qZvM",
      "airwallexCustomerId": "cus_hkdmrhkh8he4j3kvela",
      "airwallexCustomerClientSecret": "eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MDAwMDAwMDAsImV4cCI6MTcwMDAwMzYwMCwiY3VzdG9tZXJfaWQiOiJjdXNfaGtkbXJoa2g4aGU0ajNrdmVsYSJ9.abc123"
    },
    "items": [
      {
        "id": "itm_01jps5cgsfwyxj0516571eaf17",
        "kind": "ADMISSION",
        "quantity": 2,
        "admissionId": "adm_01jps5cgsee0xvapbk92e8eb4g",
        "sectionId": "sct_01jps5cgse0g3qj16kpq8t221r",
        "admission": {
          "id": "adm_01jps5cgsee0xvapbk92e8eb4g",
          "createdAt": "2026-10-17T08:46:46.697Z",
          "updatedAt": "2026-10-17T08:46:46.697Z",
          "sectionId": "sct_01jps5cgse0g3qj16kpq8t221r",
          "teamId": "tem_01jqpjksnsen9vprw95et60t2m",
          "promoterId": "pmt_01jqpjksnsen9vprw95et60t2m",
          "eventId": "evt_01jps5cgsenjrazw6wswmyspa3",
          "eventSlug": "test-event",
          "name": "Final Release",
          "subtitle": "Entry before 10pm",
          "description": "Early bird pricing with priority entry. Must present valid ID at gate.",
          "capacity": 100000,
          "limit": -1,
          "available": 70000,
          "sold": 20000,
          "reserved": 10000,
          "order": 0,
          "entryStartsAt": "2026-10-18T08:46:46",
          "entryEndsAt": "2026-10-19T08:46:46",
          "saleStartsAt": "2026-10-17T08:46:46",
          "saleEndsAt": "2026-10-19T08:46:46",
          "saleEndsBehavior": "SALE_ENDED",
          "price": {
            "base": 1000,
            "booking": 200,
            "currency": "AUD"
          },
          "visibility": "ALWAYS",
          "tenantId": "tnt_01jqpj2t2kfvmstt6f6tzkbaf2",
          "deleted": false,
          "orderPadded": "0000000000"
        },
        "section": {
          "id": "sct_01jps5cgse0g3qj16kpq8t221r",
          "createdAt": "2026-10-17T08:46:46.697Z",
          "updatedAt": "2026-10-17T08:46:46.697Z",
          "name": "General Admission",
          "capacity": 1000,
          "limit": -1,
          "available": 700,
          "sold": 200,
          "reserved": 100,
          "visibility": "ALWAYS",
          "location": {
            "id": "loc_01hk153x00eh99pagyydz03sbz",
            "googlePlaceId": "ChIJP3Sa8ziYEmsRUKgyFmh9AQM",
            "createdAt": "2026-10-17T08:46:46.696Z",
            "updatedAt": "2026-10-17T08:46:46.696Z",
            "name": "Watson's EQ",
            "address": "The, Entertainment Quarter, 1 Bent St, Moore Park NSW 2021, Australia",
            "city": "Moore Park",
            "state": "New South Wales",
            "postcode": "2021",
            "country": "Australia",
            "latitude": -33.8944593,
            "longitude": 151.2252255,
            "timeZone": "Australia/Sydney",
            "types": [
              "establishment",
              "point_of_interest",
              "stadium"
            ],
            "description": "Historic outdoor amphitheater known for summer concerts",
            "image": {
              "src": "https://assets.session.services/my-image.jpg",
              "alt": "My Image",
              "width": 1080,
              "height": 1080
            }
          },
          "promoterId": "pmt_01jqpjksnsen9vprw95et60t2m",
          "eventId": "evt_01jps5cgsenjrazw6wswmyspa3",
          "eventSlug": "test-event"
        },
        "price": {
          "net": 1200,
          "total": 1200,
          "gross": 1200,
          "base": 1000,
          "booking": 200,
          "currency": "AUD"
        }
      }
    ],
    "fees": [
      {
        "id": "fee_01jps5cgsgamykd6kh2t738qkh",
        "createdAt": "2026-10-17T08:46:46.697Z",
        "reason": "Gateway Fee",
        "amount": -30,
        "currency": "AUD",
        "requestId": "att_sgpdz4v2ph1axmdmdx8_m8w6qv",
        "kind": "GATEWAY"
      }
    ],
    "price": {
      "net": 500,
      "total": 1400,
      "gross": 2200,
      "base": 1000,
      "booking": 400,
      "sms": 200,
      "refunded": -700,
      "discount": -1000,
      "currency": "AUD"
    },
    "settlement": {
      "net": 500,
      "total": 1400,
      "gross": 2200,
      "base": 1000,
      "booking": 400,
      "sms": 200,
      "refunded": -700,
      "discount": -1000,
      "currency": "AUD",
      "exchangeRate": 1.4
    },
    "couponCode": {
      "id": "cod_01jps5cgsfzftw7hxcvr2wftk2",
      "name": "TEST50",
      "couponId": "cpn_01jps5cgsfzs1ksqaet5hba8ac"
    },
    "customer": {
      "id": "cus_01jps5cgsf4pn2a32eamppnap1",
      "firstName": "Test",
      "lastName": "User",
      "email": "test@session.services",
      "phone": "+61411111111"
    },
    "timeline": [
      {
        "id": "tln_01jps5cgsfgve5b5g2666kyryh",
        "createdAt": "2026-10-17T08:46:46.697Z",
        "status": "SUCCESSFUL",
        "kind": "ORDER_COMPLETED",
        "description": "Order was created successfully",
        "author": "System",
        "userId": "usr_01jps5cgsd4tzjghtnt45qnhn0",
        "externalId": "ses:01234567-89ab-cdef-0123-456789abcdef:Delivery"
      }
    ],
    "refunds": [
      {
        "id": "rfd_01jps5cgsfgve5b5g2666kyryh",
        "request": {
          "idempotencyKey": "refund_12345_customer_request"
        },
        "status": "PENDING",
        "acceptedAt": "2026-10-17T08:46:46.697Z",
        "failedAt": "2026-10-17T08:46:46.697Z",
        "failure": {
          "reason": "Insufficient funds for refund",
          "message": "The refund could not be processed."
        },
        "price": {
          "currency": "AUD",
          "total": 1200,
          "items": 1200
        },
        "reason": "CUSTOMER_REQUEST",
        "note": "Customer requested refund due to schedule conflict",
        "items": [
          {
            "orderItemId": "itm_01jps5cgsfwyxj0516571eaf17",
            "quantity": 2,
            "amount": 1200,
            "ticketIds": [
              "tkt_01jps5cgsg0s32w2pr73vbccde"
            ]
          }
        ],
        "tickets": {
          "cancelRequested": true,
          "cancelled": true,
          "cancelledCount": 2
        },
        "gateway": {
          "provider": "STRIPE",
          "refundId": "re_1234567890abcdef",
          "idempotencyKey": "rfd_01jps5cgsfgve5b5g2666kyryh"
        },
        "actor": {
          "type": "USER",
          "userId": "usr_01jps5cgsd4tzjghtnt45qnhn0"
        },
        "metadata": {
          "supportTicket": "#12345"
        },
        "notification": {
          "requested": true,
          "sentAt": "2026-10-17T08:46:46.697Z"
        },
        "createdAt": "2026-10-17T08:46:46.697Z"
      }
    ],
    "offers": [
      {
        "kind": "SMS_DELIVERY",
        "label": "SMS ticket delivery",
        "price": {
          "amount": 200,
          "currency": "AUD"
        }
      }
    ],
    "customerId": "cus_01jps5cgsf4pn2a32eamppnap1",
    "createdBy": {
      "id": "cus_01jps5cgsf4pn2a32eamppnap1",
      "firstName": "Test",
      "lastName": "User",
      "email": "test@session.services",
      "phone": "+61411111111"
    },
    "promoterId": "pmt_01jqpjksnsen9vprw95et60t2m",
    "event": {
      "id": "evt_01jps5cgsenjrazw6wswmyspa3",
      "name": "Test Event",
      "slug": "test-event",
      "location": "Watson's EQ",
      "locationAddress": "The, Entertainment Quarter, 1 Bent St, Moore Park NSW 2021, Australia",
      "locationLatitude": -33.8944593,
      "locationLongitude": 151.2252255
    },
    "payoutIds": [
      "pay_01HQXYZ"
    ],
    "eventId": "evt_01jps5cgsenjrazw6wswmyspa3",
    "checkoutUrl": "https://example.com/checkout/ord_1234567890",
    "returnUrl": "/orders",
    "channel": {
      "name": "tenant-web",
      "referrer": "https://sash.teams.mixmag.au/events/example-event",
      "utmSource": "instagram",
      "utmMedium": "social",
      "utmCampaign": "summer-launch",
      "deviceType": "MOBILE",
      "browser": "Chrome",
      "country": "Australia",
      "region": "Australia - New South Wales",
      "sessionId": "ses_01HX...",
      "anonymousId": "aid_01HX..."
    },
    "reservedAt": "2026-10-17T08:46:46.738Z"
  }
}

Changes

    • info

      added the new optional request property

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status