# Yatoon Booking Setup Guide

This guide is for salon owners installing Yatoon Appointment Booking on an existing WordPress site.

## Requirements

- WordPress 5.8 or newer
- PHP 7.4 or newer
- HTTPS enabled on the booking site
- Pretty permalinks enabled in WordPress
- A working WordPress email setup, preferably SMTP

## Basic Setup

1. Upload and activate the Yatoon plugin from **Plugins > Add New > Upload Plugin**.
2. Open **Yatoon Booking > Setup Wizard**.
3. Add business name, address, phone number, timezone, and booking hours.
4. Add at least one staff member in **Yatoon Booking > Staff**.
5. Add services in **Yatoon Booking > Services** and assign services to staff.
6. Create or edit a public booking page and add:

```text
[yatoon_booking]
```

Optional display shortcodes:

```text
[yatoon_service_menu]
[yatoon_catalog]
[yatoon_gallery]
[yatoon_customer_portal]
[yatoon_staff_portal]
```

## Local Mode

Use Local mode if the salon wants availability and bookings to run entirely inside WordPress.

1. Go to **Yatoon Booking > Settings > General**.
2. Set **Active Platform** to **Local**.
3. Configure business hours, closed dates, staff services, buffers, and minimum lead time.
4. Test at least one booking on the public booking page.

## Square Setup

Square sync is available in the Pro package.

1. Create or open a Square Developer application at `https://developer.squareup.com/apps`.
2. Copy the Square access token.
3. Copy the Square location ID for the salon.
4. Go to **Yatoon Booking > Settings > General**.
5. Set **Active Platform** to **Square**.
6. Paste the access token and location ID.
7. Choose **Sandbox** for testing or **Production** for the live salon.
8. Save settings and use **Test Connection** / **Sync Now**.
9. Confirm that Square staff and service variations are mapped correctly before taking public bookings.

## Square Payment Setup

Square online payments are available in the Pro package.

1. Confirm Square appointment sync works first.
2. In Square Developer Dashboard, use the same Square application and copy the matching Application ID, Access Token, and Location ID for Sandbox or Production.
3. In WordPress, go to Yatoon Settings > Payments.
4. Enable Square Online Payments.
5. Paste the Square Application ID.
6. Choose Deposit only or Full appointment amount.
7. Select payment methods: Card, Apple Pay, Google Pay, Cash App Pay, and/or Square Gift Card.
8. Set Square Seller Country, usually `US` for United States salons.
9. For Apple Pay, register the website domain in the Square application Apple Pay settings. Apple Pay requires HTTPS and Safari on a supported Apple device.
10. Test in Sandbox before switching to Production credentials.

Notes:

- Apple Pay and Google Pay buttons appear only when the browser, device, Square account, and domain setup support them.
- Cash App Pay is currently US-focused.
- Square Gift Card payments require an active Square gift card for the same Square seller.
- Yatoon verifies the Square payment server-side before saving the booking.

## Vagaro Setup

Vagaro sync is available in the Pro package.

1. Get the Vagaro API key and business ID from the Vagaro business account.
2. Go to **Yatoon Booking > Settings > General**.
3. Set **Active Platform** to **Vagaro**.
4. Save the API key and business ID.
5. Use **Test Vagaro Connection**.
6. Confirm staff, service, and availability mapping before publishing the booking page.

## Stripe Deposits

Stripe deposits and prepayment are available in the Pro package.

1. In Stripe, copy the publishable key and secret key.
2. Create a webhook endpoint using the webhook URL shown in Yatoon settings.
3. Copy the webhook signing secret.
4. Go to **Yatoon Booking > Settings > Deposit & Prepay**.
5. Enable deposits and enter the keys.
6. Test with Stripe test mode before switching to live keys.

## Twilio SMS

SMS reminders are available in the Pro package.

1. Create or open a Twilio account.
2. Copy the Account SID, Auth Token, and sender phone number.
3. Go to **Yatoon Booking > Settings > SMS Notifications**.
4. Enable customer confirmations, reminders, and optional admin alerts.
5. Send a test SMS before enabling SMS for customers.

## Google Calendar

Google Calendar sync is available in the Pro package.

1. Create a Google Cloud project.
2. Enable the Google Calendar API.
3. Create OAuth credentials.
4. Add the redirect URI shown in Yatoon settings.
5. Copy the client ID and client secret into Yatoon.
6. Click **Connect Google Calendar** and authorize the salon calendar.

## Pre-Launch Checklist

- Book one local test appointment.
- Book one multi-service appointment.
- Book one group appointment.
- Test Any Staff assignment.
- Cancel and reschedule from the manage booking link.
- Confirm email delivery.
- Confirm SMS delivery if enabled.
- Confirm Square/Vagaro/Google sync if enabled.
- Confirm staff portal access.
- Confirm the booking page on mobile.
