# Site d’exemple · Sample website **Français.** Une page de réservation complète sur votre propre site, par l’API de réservation de CrenoSync (https://crenosync.ca/developpeurs). HTML et JavaScript simples, sans cadriciel ni compilation. 1. Le propriétaire de l’entreprise fait une clé dans **Paramètres › API** du portail CrenoSync. Il y inscrit l’adresse de votre site (par exemple `https://www.example.ca`) et la page de retour (`https://www.example.ca/reservation/merci.html`). 2. Dans `config.js`, mettez l’adresse d’API (`https://{entreprise}.crenosync.ca/api/v1`) et la **clé publiable** (`cs_pk_…`). Jamais la clé secrète : elle ne va que sur un serveur. 3. Servez le dossier depuis le site inscrit. Pour un essai local : inscrivez `http://localhost:8000` et `http://localhost:8000/merci.html`, puis lancez `php -S localhost:8000` dans le dossier. Faites vos essais sur une entreprise d’essai de la préproduction (`{entreprise}.staging.crenosync.ca`), jamais sur l’horaire réel d’une entreprise. `index.html` choisit l’activité, la date, le groupe et l’heure, montre le prix, retient l’heure pendant que le visiteur entre ses coordonnées, puis passe la commande : réservée tout de suite, confirmée par un code envoyé par courriel, ou payée sur la page sécurisée de CrenoSync. Après le paiement, le visiteur revient à `merci.html`, qui lit l’identifiant de la commande et le jeton de retour après `#`, les retire de l’adresse, et affiche la réservation. Les pages sont en français ; mettez `lang="en"` sur `` pour l’anglais. **English.** A complete booking page on your own website, through the CrenoSync booking API (https://crenosync.ca/en/developers). Plain HTML and JavaScript, no framework or build step. 1. The business's owner makes a key under **Settings › API** in the CrenoSync portal, and registers your website there (for instance `https://www.example.ca`) and the return page (`https://www.example.ca/booking/merci.html`). 2. In `config.js`, put the API address (`https://{business}.crenosync.ca/api/v1`) and the **publishable key** (`cs_pk_…`). Never the secret key: it belongs on a server only. 3. Serve the folder from the registered website. For a local try: register `http://localhost:8000` and `http://localhost:8000/merci.html`, then run `php -S localhost:8000` in the folder. Try it on a test business on staging (`{business}.staging.crenosync.ca`), never on a business's real schedule. `index.html` picks the activity, the date, the group and the time, shows the price, holds the time while the visitor types their details, then checks out: booked at once, confirmed with an emailed code, or paid on CrenoSync's secure page. After paying, the visitor comes back to `merci.html`, which reads the checkout's ID and return token after `#`, takes them out of the address, and shows the booking. The pages are in French; put `lang="en"` on `` for English.