> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://docs.downpay.app/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Sesami Bookings Integration Setup

Take deposits on Sesami appointment bookings, automate payment collection around booking dates, and protect against no-shows by holding a deposit upfront.
---
---

###### On this page:

[Overview of the Integration](#1-overview-of-the-integration)
[Setting up Sesami with Downpay](#1-setting-up-sesami-with-downpay)
* [Installing and configuring Sesami](#2-installing-and-configuring-sesami)
* [Installing and configuring Downpay](#2-installing-and-configuring-downpay)
* [Advanced payment collection with Sesami Flows](#2-advanced-payment-collection-with-sesami-flows)
---
---

# Overview of the Integration

The Sesami and Downpay integration enables merchants to take deposits or defer payment for appointment bookings. This setup is ideal for services and businesses who want to charge their customers upon rendering their service.
---
---

[Jump to top](#6-on-this-page)

# Setting up Sesami with Downpay

This section guides you through the steps to integrate Sesami and Downpay, ensuring both apps work together seamlessly on your Shopify store.

## Installing and configuring Sesami
 
1. Install [Sesami](https://apps.shopify.com/sesami) from the Shopify App store and use their help guide to set up your [services](https://help.sesami.co/hc/en-us/articles/360037521993-How-do-I-set-up-my-Sesami-account).

## Installing and configuring Downpay

1. Install [Downpay](https://apps.shopify.com/downpay) from the Shopify App store *(if you don't already have it)*.
2. Create a [purchase option](https://docs.downpay.app/en/article/1dt4jnn/).
3. Check out our [getting started](https://docs.downpay.app/en/category/1qvdvm1/) guide for additional support.
---
---

## Advanced payment collection with Sesami flows

Sesami and Downpay work seamlessly together when placed on the same product template in your Shopify theme editor. 

Using [Sesami Flows,](https://sesami.dev/docs/sesami-flows/flows/) you can design workflows that automate Downpay payment collection.

### Sesami flow: Collecting remaining balance payment when customer checks in

1. Navigate to the Sesami App in your Shopify admin
2. Navigate to the `Flows` section of Sesami
3. Click `Create flow` and then click `Start from scratch` and use the following details:

#### Sesami flow configuration

Name: Whatever you wish to call the internal flow
Trigger: Customer checked in
Action: Webhook
Target: https://downpay.hypehound.app/graphql
When: Whenever you'd like the workflow to start

#### Webhook Template

For the Headers, you will need your Downpay API key which can be found in Downpay's `settings` page.

**Headers**
```
{"Content-Type":"application/json","Authorization":"Token yourdownpayapikey"}
```

**Body**

```
{"query":"mutation orderCollectPayment($input: OrderCollectPaymentInput!) { orderCollectPayment(input: $input) { clientMutationId errors { field message } orderPaymentStatus { createdAt orderId paymentReferenceId updatedAt}}}","operationName":"orderCollectPayment","variables":{"input":{"id":"{{OrderID}}"}}}
```

**Example**

![](https://storage.crisp.chat/users/helpdesk/website/81f235024a249800/screenshot2025-01-30at21216-pm_zfajo0.png)

### Sesami flow: Collect a partial no-show fee

1. Navigate to the Sesami App in your Shopify admin
2. Navigate to the `Flows` section of Sesami
3. Click `Create flow` and then click `Start from scratch` and use the following details:

#### Flow Configuration

Name: Whatever you wish to call the internal flow
Trigger: Customer checked in
Action: Webhook
Target: https://downpay.hypehound.app/graphql
When: Whenever you'd like the workflow to start

#### Webhook Template

**Headers**
```
{"Content-Type":"application/json","Authorization":"Token yourdownpayapikey"}
```
**Body**

|| Adjust the amount from 10.00 to whatever value is required so long as it does not exceed the total order balance due.

```
{"query":"mutation orderCollectPartialPayment($input: OrderCollectPartialPaymentInput!) { orderCollectPartialPayment(input: $input) { errors { field message } orderPaymentStatus { createdAt orderId }}}", "operationName":"orderCollectPartialPayment", "variables":{"input":{"id":"{{OrderID}}", "amount":{"amount":"10.00"}}}}
```

**Example**

![](https://storage.crisp.chat/users/helpdesk/website/81f235024a249800/screenshot2025-01-31at42621-pm_1dvo679.png)

[Jump to top](#6-on-this-page)
 ****