设置网址模板后,您可以完成以下步骤,为您的空缺添加付款信息。
- 识别付费广告位
- 设置槽价格
- 设置预付款
- 设置违约金或取消费用
- 设置预付款
- 设置“需要提供信用卡”
1. 识别付费广告位
您可以使用服务 Feed 或空房情况 Feed 来定义价格。通过在服务级别定义价格,您可以将相应服务或餐厅内的所有空档设置为固定价格。而通过在可用性中定义价格,您可以为特定空档设置价格。例如,通过在空房情况一级设置价格或费用,可以处理以下情况:
- 价格在星期二会降低,在星期六会上调。
- 对于下午 5:00 至 7:00 之间的空房情况,不收取违约金。
- 对人数超过 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; }
No Show Fee 的定义
// 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
字段,如以下示例所示:
存款示例
说明:
`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; }
RequireCreditCard 的定义
// 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; }