This webhook is to notify Partners that a refund was executed, along with what items were refunded and whether they were discounted by the Partner.
You can set your webhook URL in Bbot Owner's Panel -> Manage API Access -> Items Refunded Webhook URL
No Response Needed
Unlike Checkout Started and Promo webhooks, this webhook doesn’t check for responses and does not allow the partner to interfere with completing the checkout.
Example Payload
{
"table_id": "b8032110-6bb9-4d7f-b875-75f8da64e356",
"event_type": "items_refunded",
"checkout_id": "df744d21-0a6b-444d-9f0b-39c9506af848",
"restaurant_id": "ecde3351-606c-4971-ab5a-792bccb0e5e2",
"prompts_to_guest": [
{
"size": "",
"text": "What is 2+2?",
"prompt_id": "bbot_0",
"prompt_type": "label"
},
{
"value": "",
"heading": "",
"prompt_id": "bbot_1",
"prompt_type": "textinput"
},
{
"prompt_id": 2,
"button_text": "Apply",
"prompt_type": "applybutton"
},
{
"size": "",
"text": "What is 2+2?",
"prompt_id": "bbot2_0",
"prompt_type": "label"
},
{
"value": "",
"heading": "",
"prompt_id": "bbot2_1",
"prompt_type": "textinput"
},
{
"prompt_id": 2,
"button_text": "Apply",
"prompt_type": "applybutton"
}
],
"fulfillment_method": "driver_delivery",
"cart_items_this_restaurant": [
{
"qty": 3,
"sku": "",
"mods": [
{
"sku": "",
"mods": [],
"tags": [],
"tax_cents": 8,
"menuItemId": "b80330d7-9abd-40f9-8c88-b006d4308267",
"pretax_cents": 92,
"name_for_owner": "Èclairs",
"menu_item_class": "addon",
"report_category": "other"
}
],
"tags": [],
"tax_cents": 98,
"menuItemId": "b80328d4-d5ff-4676-a224-22e7014a0d14",
"line_item_id": "38654715",
"pretax_cents": 1102,
"name_for_owner": "Ceviche",
"menu_item_class": "food",
"report_category": "food"
}
],
"cart_items_other_restaurants": [],
"cart_items_pretax_cents_this_restaurant": 3582,
"response": {
"discounts": None,
"prompts_to_guest": [
{
"size": "",
"text": "What is 2+2?",
"prompt_id": "bbot_0",
"prompt_type": "label"
},
{
"value": "",
"heading": "",
"prompt_id": "bbot_1",
"prompt_type": "textinput"
},
{
"prompt_id": 2,
"button_text": "Apply",
"prompt_type": "applybutton"
}
]
},
"orderitems_now": [
{
"orderitem_id": "b855f81a-7c5f-489e-a281-e8a6aadafca5",
"lineitem_id": "38654715",
"pretax_cents_now": 1194,
"tax_cents_now": 106,
"original_discount_cents": 0
},
{
"orderitem_id": "b855f3d0-1df3-4def-9b0a-82b548731b71",
"lineitem_id": "38654715",
"pretax_cents_now": 0,
"tax_cents_now": 0,
"original_discount_cents": 0
},
{
"orderitem_id": "b855d217-4c17-484a-95df-157e2299a21b",
"lineitem_id": "38654715",
"pretax_cents_now": 0,
"tax_cents_now": 0,
"original_discount_cents": 0
}
],
"service_charges_now": [
{
"id": "b855e302-d39f-49d5-a969-b4beee5d2c71",
"pretax_cents_now": 1008,
"tax_cents_now": 89
}
]
}
Attribute | Type | Description |
---|---|---|
event_type | string | The type of event that triggered this webhook call. In this case, always items_refunded |
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) |
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 |
prompts_to_guest | List:Prompt | Prompts to be displayed to the guest during checkout |
response | Response | The last response given to this webhook |
orderitems_now | List:OrderItems | The current state of items in the order |
service_charges_now | List:ServiceCharges |
Response Object
Prompt Object
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 |
Choice Object
Attribute | Type | Description |
---|---|---|
selected | boolean | Whether or not a choice is selected. |
contents | string | The label for the choice |
Discount Object
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. |
DiscountDistribution Object
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. |
OrderItem
Attribute | Type | Description |
---|---|---|
orderitem_id | string | The ID of the item in the order |
lineitem_id | string | The ID of the line item in the order |
pretax_cents_now | int | The current pretax cost of the item, post-refund |
tax_cents_now | int | The current tax amount of the item, post-refund |
original_discount_cents | int | The amount the item was discounted, pre-refund |
ServiceCharge
Attribute | Type | Description |
---|---|---|
id | string | The ID of the service charge |
pretax_cents_now | int | The pretax cost of the service charge, post-refund |
tax_cents_now | int | The tax amount of the service charge, post-refund |