
设置网址模板后,您可以按以下步骤操作,为广告资源添加付款信息。
- 确定付费广告位
- 设置广告资源块价格
- 设置预付款
- 设置未到场或取消预订费用
- 设置存款
- 设置“需要提供信用卡”
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;
}违约金定义
// 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;
}Require Credit Card 的定义
// 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; }