CreateOrder method

The client requests to create an order.



Return value


// Request to create an order.
message CreateOrderRequest {
  // The order to create. (required)
  Order order = 1;

  // The parameters to be used if the payment is processed by the partner
  // (i.e. order.payment_information.payment_processed_by is equal to
  // PROCESSED_BY_PARTNER). (required if payment is processed by the partner)
  PaymentProcessingParameters payment_processing_parameters = 2;

  // Idempotency token for CreateOrder requests. (required)
  string idempotency_token = 3;

// Response for the CreateOrderRequest.
message CreateOrderResponse {
  // All line items in an order either fail or succeed together.
  // This means that if some of the items cannot be fulfilled, the entire
  // order must fail, the booking must not be made for any item, and the user
  // must not be charged.
  oneof result {
    // The order created.
    Order order = 1;

    // If creating an order fails, this field should reflect the business logic
    // error (e.g., slot has become unavailable or price has changed).
    OrderFailure order_failure = 2;