指定付款方式

payment-options

设置网址模板后,您可以按照以下步骤向空档添加付款方式。

  1. 确定付费空档
  2. 设置空档价格
    • 设置预付款
    • 设置违约金或取消费用
    • 设置押金
    • 设置“需要提供信用卡”

1. 确定付费空档

您可以使用 服务 Feed空闲状态 Feed 定义价格。如果在服务级别定义价格,则表示您将该服务或餐厅内的所有空闲状态空档都设置为固定价格。而如果在空闲状态级别定义价格,则表示您将特定空档的价格设置为固定价格。例如,以下情况可以通过在空闲状态级别设置价格或费用来处理:

  • 周二价格降低,周六价格上涨。
  • 下午 5 点到晚上 7 点之间的空闲状态需要支付违约金。
  • 人数超过 6 人的预订需要支付押金。
  • 预订特定房间需要提供信用卡。

2. 设置空档价格

预付款

此配置用于指定必须在预订时全额支付服务费用。预付款是在空闲状态级别通过 Avaibility Feed 的 payment 字段指定的。

预付款示例

{
  "availability": [{
    "merchant_id": "dining-A",
    "service_id": "reservation",
    "start_sec": 1535853600,
    "duration_sec": 2700,
    "spots_total": 2,
    "spots_open": 2,
    "resources": {
    "room_id": "A-dining-room",
    "room_name": "Wine Tasting Room",
    "party_size": 2,
    "prepayment": {
      "price_info": {
        "price": {
          "price_micros": 200000000,
          "currency_code": "USD"
        },
        "price_type": "PER_PERSON"
        }
      }
    }
  }]
}

空闲状态 Feed

message Availability {
  ...
  // Optional prepayment information for this availability. Prepayment is only
  // available through the Payment Redirect Add-on
  Prepayment prepayment = 20;
}

预付款定义

// A payment the user may be charged as part of their reservation.
message Prepayment {
  PriceInfo price_info = 1;
}

违约金或取消费用

如果用户未赴约或在取消时段后取消预订,则可能会被收取违约金或取消费用。如果未指定取消时段,则默认取消时段为相应空档的开始时间。

如需指定违约金,您应在服务 Feed 中添加 no_show_fee 字段,如以下示例所示:

违约金 / 取消费用示例

说明:
在示例中,如果 预约者未赴约,合作伙伴或商家有权收取固定费率的 费用,即 `no_show_fee.fee.price_micros` 字段中指定的 25 美元。如果用户在预约前 4 小时(14400 秒)内取消预约,也可能会被收取此费用, 如 `scheduling_rules.min_advance_online_canceling` 字段中指定的那样。
{
  "merchant_id": "merchant-1",
  "service_id": "service-2-b",
  "name": "Reservation",
  "description": "A dining reservation",
  "price": {
    "price_micros": 200000000,
    "currency_code": "USD"
  },
  "scheduling_rules": {
    "min_advance_online_canceling": 14400
  },
  "no_show_fee": {
    "fee": {
      "price_micros": 25000000,
      "currency_code": "USD"
    },
    "fee_type": "FIXED_RATE_DEFAULT"
  }
}

服务 Feed

message Service {
  ...
  // Defines a no show fee that may be charged to the user. Can be overridden
  // at the availability level. (optional)
  NoShowFee no_show_fee = 12;
}

空闲状态 Feed

message Availability {
  ...
  // Defines a no show fee that may be charged to the user. Overrides the
  // service no show fee if one was specified. Setting this to an empty
  // NoShowFee message removes any service-level no show fee. (optional)
  NoShowFee no_show_fee = 13;
}

违约金定义

// A fee that a user may be charged if they have made a booking but do not
// show up.
message NoShowFee {
  // The amount the user may be charged if they do not show up for their
  // reservation.
  Price fee = 1;

  // Defines how the fee is determined from the availability.
  PriceType fee_type = 3;
}

押金

押金用于收取初始费用,作为预订的要求。 押金可以在预订时收取,也可以在稍后收取。您可能需要定义在哪些条件下押金可以退还,以及何时可以 在线 取消预订

如需指定押金,您应在服务 Feed 中添加 deposit 字段,如以下示例所示:

押金示例

说明:
The `min_advance_online_canceling` `deposit.min_advance_cancellation_sec`定义了押金何时可以退还。 请注意,在示例中,押金可以单独指定取消时间,与退款条款分开。在这种情况下,用户最多可以在预约前 24 小时(86400 秒)在线取消服务。这样可确保商家直接收到任何延迟取消通知。不过,用户仍然可以在预约前 4 小时(14400 秒)内(通过与您或商家联系取消)获得押金退款,这将在结账时的条款和确认电子邮件中显示。
{
  "merchant_id": "merchant-1",
  "service_id": "service-2-b",
  "name": "Reservation",
  "description": "A dining reservation",
  "price": {
    "price_micros": 200000000,
    "currency_code": "USD"
  },
  "scheduling_rules": {
    "min_advance_online_canceling": 86400,
  },
  "deposit": {
    "deposit": {
      "price_micros": 25000000,
      "currency_code": "USD"
    },
    "min_advance_cancellation_sec": 14400,
    "deposit_type": "FIXED_RATE_DEFAULT"
  }
}

服务 Feed

message Service {
  ...
  // Defines how a deposit may be charged to the user. Can be overridden at the
  // availability level. (optional)
  Deposit deposit = 11;
}

空闲状态 Feed

message Availability {
  ...
  // Defines how a deposit may be charged to the user. Overrides the service
  // deposit if one was specified. Setting this to an empty Deposit message
  // removes any service-level deposit. (optional)
  Deposit deposit = 12;
}

押金定义

// A deposit that the user may be charged or have a hold on their credit card
// for.
message Deposit {
  // Deposit amount.
  Price deposit = 1;

  // Minimum advance cancellation for the deposit.
  int64 min_advance_cancellation_sec = 2;

  // Defines how the deposit is determined from the availability.
  PriceType deposit_type = 3;
}

需要提供信用卡

服务可能需要提供信用卡,作为验证身份的一种额外方式。不过,不应将此选项用于预付款、押金或违约金。如果需要这些用例,则应明确配置它们。要求提供信用卡通常会导致此服务的预订量大幅下降。

如需要求在结账时提供信用卡,您必须将 require_credit_card 字段设置为 REQUIRE_CREDIT_CARD_ALWAYS

需要提供信用卡”示例

{
  "merchant_id": "merchant-1",
  "service_id": "reservation",
  "name": "reservation",
  "description": "Food reservation",
  "require_credit_card": "REQUIRE_CREDIT_CARD_ALWAYS"
}

服务 Feed

message Service {
  ...
  // Indicates whether the user must provide a credit card in order to book this
  // service.
  // This value can be overridden at the availability level. (optional)
  RequireCreditCard require_credit_card = 13;
}

空闲状态 Feed

message Availability {
  ...
  // Indicates whether the user must provide a credit card in order to book this
  // availability slot.
  // If the value is not set, it is inherited from the service level if it's set
  // there. (optional)
  RequireCreditCard require_credit_card = 14;
}

“需要提供信用卡”定义

// Defines whether a credit card is required in order to book an appointment.
enum RequireCreditCard {
  // The credit card requirement is not explicitly specified and the
  // behaviour is identical to the one specified for CONDITIONAL.
  REQUIRE_CREDIT_CARD_UNSPECIFIED = 0;

  // Google will require a credit card for the booking if any of the following
  // conditions are met:
  // * the availability has a price and the prepayment_type is REQUIRED
  // * the no_show_fee is set
  // * the deposit field is set.
  REQUIRE_CREDIT_CARD_CONDITIONAL = 1;

  // A credit card is always required in order to book this availability
  // regardless of other field values.
  REQUIRE_CREDIT_CARD_ALWAYS = 2;
}

其他定义

价格范围定义

// Wrapper for a range of monetary amount treated as unbounded unless both
// values are set. At least one of min_amount and max_amount is required.
message PriceRange {
  // Minimum amount.
  Price min_price = 1;

  // Maximum amount. Should always be > min_price.
  Price max_price = 2;
}

价格信息定义

// Container for price details.
message PriceInfo {
  oneof price_options {
    Price price = 1;

    // The upper and/or lower bound
    PriceRange price_range = 2
        ;
  }

  // Defines how price or price range is applied (per person or fixed)
  PriceType price_type = 3;
}

价格类型定义

// Defines how a total price is determined from an availability.
enum PriceType {
  // The price is for a fixed amount. This is the default value if the field is
  // not set.
  //
  // Examples:
  //   $50 deposit to reserve a table; $20 no show fee for a yoga class
  FIXED_RATE_DEFAULT = 0;

  // The price specified is per person, and the total price is calculated
  // according to the party size specified in Resources as price_micros *
  // party_size. A PER_PERSON price must be accompanied by a party size in the
  // availability resources. If it is not, a party size of one is used.
  //
  // Examples:
  //   $10 each for tickets to a museum
  PER_PERSON = 1;
}