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
    }
  ]
}
AttributeTypeDescription
event_typestringThe type of event that triggered this webhook call. In this case, always items_refunded
restaurant_idstringThe ID of the restaurant
table_idstringThe location ID
fulfillment_methodstringThe fulfillment method of the order
checkout_idstringThe ID of this checkout
cart_items_pretax_cents_this_restaurantintThe total pretax amount of the checkout for this restaurant
cart_items_this_restaurantList:CartItemsA JSON of the items in the checkout for this restaurant
cart_items_other_restaurantsList:CartItemsA JSON of the items in this checkout for other restaurants also associated with the Partner (you)
guest_idstringID of the guest, if available
guest_emailstringemail address of the guest, if available
guest_email_is_verifiedbooleanWhether we have verified the email address of the guest to be valid
guest_phonestringPhone number of the guest, if available
guest_phone_is_verifiedbooleanWhether we have verified the phone number of the guest to be valid
guest_first_namestringFirst name of guest, if available
guest_last_namestringLast name of guest, if available
prompts_to_guestList:PromptPrompts to be displayed to the guest during checkout
responseResponseThe last response given to this webhook
orderitems_nowList:OrderItemsThe current state of items in the order
service_charges_nowList:ServiceCharges

Response Object

AttributeTypeDescription
prompts_to_guestList:PromptThe full list of prompts_to_guest that was given to us previously by all Partners associated with the checkout, including any customer responses
discountsList:DiscountDiscounts included in the checkout

Prompt Object

AttributeTypeDescription
prompt_typestringThe type of prompt; label, textinput, multiselect_group or applybutton
prompt_idstringThe ID of the prompt. Must be unique amongst all prompts, not just yours.
textstringThe text of the prompt. Is only used for prompt_type label.
sizestringThe size of the prompt. Is only used for prompt_type label.
valuestringThe placeholder of the prompt. Is only used for prompt_type textinput.
headingstringThe heading of the prompt. Is only used for prompt_type textinput.
buttontextstringThe text of the prompt. Is only used for prompt_type applybutton.
min_selectableintThe minimum number of choices that must be selected. Is only used for multiselect_group.
max_selectableintThe maximum number of choices that must be selected. Is only used for multiselect_group.
choicesList: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

AttributeTypeDescription
selectedbooleanWhether or not a choice is selected.
contentsstringThe label for the choice

Discount Object

AttributeTypeDescription
total_cents_to_addintTotal amount of the discount to be added. Must be negative.
name_for_gueststringName of the discount to be displayed to the guest during checkout
distribution_among_line_itemsList:DiscountDistributionHow the discount is to be distributed among items in the cart. Optional.

DiscountDistribution Object

AttributeTypeDescription
cents_to_addintAmount 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_idstringID of the item to be discounted.

OrderItem

AttributeTypeDescription
orderitem_idstringThe ID of the item in the order
lineitem_idstringThe ID of the line item in the order
pretax_cents_nowintThe current pretax cost of the item, post-refund
tax_cents_nowintThe current tax amount of the item, post-refund
original_discount_centsintThe amount the item was discounted, pre-refund

ServiceCharge

AttributeTypeDescription
idstringThe ID of the service charge
pretax_cents_nowintThe pretax cost of the service charge, post-refund
tax_cents_nowintThe tax amount of the service charge, post-refund