
設定網址範本後,請完成下列步驟,為預訂時段新增付款方式。
- 找出付費廣告位置
- 設定空位價格
- 設定預付款
- 設定逾時未到或取消費用
- 設定訂金
- 設定必須提供信用卡資訊
1. 找出付費廣告位置
你可以使用服務動態饋給或空房動態饋給定義價格。在服務層級定義價格,表示該服務或餐廳內的所有可預訂時段都將採用固定價格。而定義預訂情形的價格,則是為特定時段設定價格。舉例來說,在供應情形層級設定價格或費用,可處理下列情況:
- 週二價格較低,週六價格較高。
- 下午 5 點至 7 點的預訂時段會收取逾時未到費用。
- 如果人數超過 6 位,必須預付訂金。
- 預訂特定房型時必須提供信用卡。
2. 設定版位價格
預付款
這項設定用於指定服務金額必須在預訂時全額支付。預付款是在供應情形層級,透過 Avaibility 動態饋給的 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" } } } }] }
供應情形動態饋給
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; }
逾時未到或取消預約費用
如果使用者未依約出現,或在取消期限過後取消預訂,則可能需要支付逾時未到或取消費用。 如未指定取消期,系統會預設為該時段的開始時間。
如要指定逾時未到費用,請在服務動態饋給中加入 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" } }
服務動態消息
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;
}供應情形動態饋給
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; }
存款
訂金是預訂時必須支付的初始費用。 訂金可以在預訂當時或之後收取。你可能需要定義押金的退款條件,以及何時可線上取消預訂。
如要指定訂金,請在服務動態饋給中加入 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" } }
服務動態消息
message Service {
...
// Defines how a deposit may be charged to the user. Can be overridden at the
// availability level. (optional)
Deposit deposit = 11;
}供應情形動態饋給
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;
}Deposit 定義
// 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"
}服務動態消息
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;
}供應情形動態饋給
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; }