This webhook is to notify Partners that a checkout has begun, and to allow Partners to stop the checkout from completing successfully
You can set your webhook URL in Bbot Owner's Panel -> Manage API Access -> Promo Webhook URL
Example Query from Bbot
{
"event_type": "checkout_beginning",
"restaurant_id": "ecde3351-606c-4971-ab5a-792bccb0e5e2",
"table_id": "b8032110-6bb9-4d7f-b875-75f8da64e356",
"fulfillment_method": "driver_delivery",
"checkout_id": "df744d21-0a6b-444d-9f0b-39c9506af848",
"cart_items_pretax_cents_this_restaurant": 3582,
"cart_items_this_restaurant": [
{
"mods": [
{
"mods": [],
"menuItemId": "b80330d7-9abd-40f9-8c88-b006d4308267",
"name_for_owner": "Èclairs",
"sku": "",
"pretax_cents": 92,
"tax_cents": 8,
"menu_item_class": "addon",
"tags": [],
"report_category": "other"
}
],
"menuItemId": "b80328d4-d5ff-4676-a224-22e7014a0d14",
"name_for_owner": "Ceviche",
"sku": "",
"pretax_cents": 1102,
"tax_cents": 98,
"menu_item_class": "food",
"tags": [],
"report_category": "food",
"line_item_id": "38654715",
"qty": 3
}
],
"cart_items_other_restaurants": [],
"checkout_attempt_id": "ba028461-e694-4f86-896b-7928d689d8db"
}
Attribute Type Description event_type string The type of event that triggered this webhook call. In this case, always checkout_beginning
restaurant_id string The ID of the restaurant table_id string The location ID fulfillment_method string The fulfillment method of the order checkout_id string The ID of this checkout cart_items_pretax_cents_this_restaurant int The total pretax amount of the checkout for this restaurant cart_items_this_restaurant List:CartItems A JSON of the items in the checkout for this restaurant cart_items_other_restaurants List:CartItems A JSON of the items in this checkout for other restaurants also associated with the Partner (you) checkout_attempt_id string The ID of this checkout attempt guest_id string ID of the guest, if available guest_email string email address of the guest, if available guest_email_is_verified boolean Whether we have verified the email address of the guest to be valid guest_phone string Phone number of the guest, if available guest_phone_is_verified boolean Whether we have verified the phone number of the guest to be valid guest_first_name string First name of guest, if available guest_last_name string Last name of guest, if available
Response to Bbot
{
"prompts_to_guest": [
{
"prompt_id": "example_bbot_0",
"prompt_type": "label",
"text": "This is a label",
"size": ""
},
{
"prompt_id": "example_bbot_1",
"prompt_type": "textinput",
"heading": "",
"value": ""
}
],
"discounts": [
{
"name_for_guest": "Just Because Discount",
"total_cents_to_add": -100,
}
],
"allow_checkout": True
}
Attribute Type Description prompts_to_guest List:Prompt Prompts to be displayed to the guest during checkout discounts List:Discount Discounts to be included in the checkout allow_checkout boolean Whether the checkout should be allowed to proceed. False if the checkout should be cancelled.
Attribute Type Description prompt_type string The type of prompt; label
, textinput
, multiselect_group
or applybutton
prompt_id string The ID of the prompt. Must be unique amongst all prompts, not just yours. text string The text of the prompt. Is only used for prompt_type
label
. size string The size of the prompt. Is only used for prompt_type
label
. value string The placeholder of the prompt. Is only used for prompt_type
textinput
. heading string The heading of the prompt. Is only used for prompt_type
textinput
. buttontext string The text of the prompt. Is only used for prompt_type
applybutton
. min_selectable int The minimum number of choices that must be selected. Is only used for multiselect_group
. max_selectable int The maximum number of choices that must be selected. Is only used for multiselect_group
. choices List:Choice The choices that may be selected. Is only used for multiselect_group
. Note: If min_selectable
and max_selectable
are both 1, the choices appear as a radio group, otherwise they appear as checkboxes
Attribute Type Description selected boolean Whether or not a choice is selected. contents string The label for the choice
Attribute Type Description total_cents_to_add int Total amount of the discount to be added. Must be negative. name_for_guest string Name of the discount to be displayed to the guest during checkout distribution_among_line_items List:DiscountDistribution How the discount is to be distributed among items in the cart. Optional.
Attribute Type Description cents_to_add int Amount of the discount to be added to this particular line item. Sum of all cents_to_add must add up to total_cents_to_add. Must be negative. line_item_id string ID of the item to be discounted.