
بعد إعداد نموذج عنوان URL، يمكنك إضافة الدفعات إلى الفترات الزمنية من خلال إكمال الخطوات التالية.
- تحديد الفترات الزمنية المدفوعة
- تحديد أسعار الفترات الزمنية
- تحديد الدفعات المسبقة
- تحديد رسوم عدم الحضور أو الإلغاء
- تحديد الودائع
- تحديد "بطاقة الائتمان مطلوبة"
1- تحديد الفترات الزمنية المدفوعة
يمكنك تحديد الأسعار باستخدام خلاصة الخدمات أو خلاصة مدى التوفّر. من خلال تحديد السعر على مستوى الخدمة، يمكنك ضبط سعر ثابت لجميع الفترات الزمنية المتاحة في تلك الخدمة أو غرفة الطعام. في المقابل، من خلال تحديد السعر على مستوى مدى التوفّر، يمكنك ضبط السعر لفترة زمنية معيّنة. على سبيل المثال، يمكن معالجة الحالات التالية من خلال تحديد الأسعار أو الرسوم على مستوى مدى التوفّر:
- يتم خفض الأسعار أيام الثلاثاء وزيادتها أيام السبت.
- يتم تطبيق رسوم عدم الحضور على الفترات الزمنية المتاحة بين الساعة 5:00 مساءً والساعة 7:00 مساءً.
- يجب دفع ودائع للأحداث التي تضم أكثر من 6 أشخاص.
- تتطلب الحجوزات في غرفة معيّنة بطاقة ائتمان.
2- تحديد أسعار الفترات الزمنية
دفع مقدم
يُستخدم هذا الإعداد لتحديد أنّه يجب دفع مبلغ الخدمة بالكامل في وقت الحجز. يتم تحديد الدفع المسبق على مستوى مدى التوفّر من خلال الحقل payment في خلاصة Avaibility.
مثال على الدفع المسبق
{ "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 في خلاصة الخدمات كما هو موضّح في المثال التالي:
مثال على رسوم عدم الحضور أو الإلغاء
الوصف:
في المثال، يكون الشريك أو التاجر مخوّلاً تحصيل رسوم ثابتة بقيمة 25 دولارًا أمريكيًا كما هو موضّح في الحقل `no_show_fee.fee.price_micros` إذا لم يحضر صاحب الموعد. يمكن أيضًا تحصيل هذه الرسوم إذا ألغى المستخدم الموعد خلال 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;
}تعريف الإيداع
// 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;
}تعريف "بطاقة الائتمان مطلوبة"
// 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; }