# Checkout & Payments

> Choose what checkout asks, offer cash on delivery and bank transfer, write your store policies, send pay links, and let shoppers sign in with a code.

Your store's checkout turns a cart into an order and asks the shopper how they want to pay. You decide which ways to pay are on, and Workstation records the money on the order's invoice like any other sale.

Checkout, payment, policy and sign-in settings live in **Commerce → Settings**. You need the `commerce.manage` permission to change them.

## How the money is recorded

Every store order is a normal [order](https://workstation.repzo.com/docs/commerce/orders). Money doesn't sit on the order itself:

1. The shopper places the order. It starts as **payment pending** and **unfulfilled**.
2. The order gets an [invoice](https://workstation.repzo.com/docs/commerce/invoices).
3. The payment is recorded on that invoice, when you confirm the cash or transfer arrived (or with **Mark as paid** on the order).
4. The order's payment status is calculated from its invoices, so it turns **Paid** on its own.

Because of this, accounting, tax (including ZATCA), loyalty points, and the **Order Paid** workflow trigger all work the same as for any invoice. Once an order has an invoice or a shipment, its payment and fulfillment statuses are calculated and can't be typed in by hand.

## Payment methods

Open **Commerce → Settings → Payments**. The methods are **Cash on delivery** and **Bank transfer**, which you confirm yourself once the money arrives.

Use the switch next to each method to turn it on or off. If no method is on, shoppers can't pay and pay links show a warning.

> **Note**
>
> Online card payments aren't available yet. Payment providers for the Middle East and North Africa are planned; until then, stores sell with cash on delivery and bank transfer.

### Cash on delivery

The shopper pays in cash when the order arrives. Click **Edit instructions** to set:

| Field | What it does |
|---|---|
| **Instructions for the customer** | Shown at checkout and on the thank-you page |
| **Only for orders up to** | Hides cash on delivery above this amount. Empty means no limit. |
| **Hide after this many refused deliveries** | Hides it for customers who refused or sent back this many cash-on-delivery parcels. Empty means never. |
| **Only in these cities** | A comma-separated list. Empty means everywhere. |

Shoppers who don't qualify simply don't see the option. Collecting the cash is covered in [Shipping & Delivery](https://workstation.repzo.com/docs/online-store/shipping-and-delivery#cash-on-delivery).

### Bank transfer

The shopper transfers the amount to your bank account and quotes the order number. Click **Add bank details** and fill in:

- **Account holder** and **Bank** (required);
- **IBAN** or **Account number** (at least one);
- **SWIFT / BIC** (optional);
- **Instructions for the customer**.

The shopper sees the amount, your bank details, and the order number as the **Payment reference** on the thank-you page. The details stay there after a reload. When the transfer arrives, record the payment on the order's invoice. Use **Create invoice** on the order if it doesn't have one yet. See [Orders](https://workstation.repzo.com/docs/commerce/orders#create-an-invoice-from-an-order).

## What checkout asks for

Open **Commerce → Settings → Checkout**. Each store has its own card, and changes show on the store as soon as you click **Save**. You don't need to publish the store again.

| Setting | Choices |
|---|---|
| **Customer contact** | **Email or phone number** (the shopper picks), **Email only**, or **Phone number only**. Order updates go to this contact. |
| **Company name** | **Don't include**, **Optional** or **Required**. |
| **Phone number for delivery** | **Don't include**, **Optional** or **Required**. Shoppers who pick up in store are never asked. |
| **Postal code** | **Ask** or **Don't ask**. It's only asked in countries that use postal codes. |
| **Region or state** | **Only where needed** or **Every country**. Countries with a list of regions, such as US states or UAE emirates, always ask. |

Full name and address are always asked when an order is delivered. Checkout checks these rules again when the order is placed, so a required field can't be skipped.

The look of checkout, the order note, the consent checkbox and custom questions are still set in the [store builder](https://workstation.repzo.com/docs/online-store/store-builder). Stores set up before this tab existed keep what their checkout section said until you save here.

## Store policies

Open **Commerce → Settings → Policies** to write the store's **Return and refund policy**, **Privacy policy**, **Terms of service**, **Shipping policy** and **Contact information**. Each policy has its own page on the store, such as `/policies/refund-policy`, and the footer and checkout policy links open it.

1. Click a policy.
2. Write it, or click **Start from a template**. The template is filled in from your store: its name, your workspace phone, your [return rules](https://workstation.repzo.com/docs/online-store/returns-and-order-edits) and your [delivery options](https://workstation.repzo.com/docs/online-store/shipping-and-delivery).
3. Replace anything in [square brackets], such as your email address. Shoppers see whatever you leave.
4. If your store is in English and Arabic, switch languages at the top and write both. A language you leave empty shows the store's main language.
5. Click **Save**. The policy is live straight away. **View on store** opens it, and **Remove** takes it off the store.

> **Caution**
>
> Templates are a starting point, not legal advice. Check your policies against the laws where you sell.

A policy written here replaces a store page with the same address. AI assistants and the [store assistant](https://workstation.repzo.com/docs/online-store/ai-shopping) read these policies when they answer shoppers, and the store's sitemap lists them.

## What shoppers see at checkout

The checkout page has three steps on one page:

1. **Contact**: an email, a phone number, or either one, depending on your [checkout settings](#what-checkout-asks-for). The default checkout also has a box to agree to news and offers.
2. **Delivery**: the address and the **Shipping method**. The address fields follow the country, like on Shopify: a **State** list for the US, **Province** for Canada, **Emirate** for the UAE and **Governorate** for Egypt, and a postal code only where the country uses one (marked "optional" where it isn't needed; the UAE and Qatar have none). Changing the country clears the address. Only the countries you deliver to are offered, and where you price delivery by city, shoppers pick their city from your list (see [Shipping zones](https://workstation.repzo.com/docs/online-store/shipping-and-delivery#what-shoppers-see)). Delivery options appear once the address is in. They come from your [shipping zones](https://workstation.repzo.com/docs/online-store/shipping-and-delivery). If shipping is set up but no zone covers the address, the order is refused with "We don't deliver to this address yet".
3. **Payment**: the methods that fit this order. Payment methods are checked again whenever the address, delivery option, or discounts change. For example, cash on delivery appears or disappears with the city and the total.

The **Order summary** shows the items, discounts, shipping, taxes, and total. Shoppers can enter a **Discount code** there. See [Discounts](https://workstation.repzo.com/docs/online-store/discounts).

The design of the checkout, thank-you, sign-in, and account pages, and extra fields such as an order note, gift message, or custom question, are set in the [store builder](https://workstation.repzo.com/docs/online-store/store-builder).

When the platform has Cloudflare Turnstile set up, checkout and sign-in show a Turnstile check to stop bots.

### Prices that change during checkout

Shoppers are never charged more than the total they saw. If a price, discount, delivery rate or exchange rate goes up while they're on the checkout page, **Complete order** stops and shows "Your total changed to …". The order summary updates, and pressing **Complete order** again places the order at the new total. If the total went down, the order goes through at the lower total.

### Continue on another device

Below the policy links, **Continue on another device** gives the shopper a link to the same checkout. On a phone it opens the share sheet (WhatsApp, Messages and so on); on a computer it shows the link with a **Copy** button. Opening the link moves the cart to that device, with the items, discount codes, contact details and address. The link works for 30 days. Opening it isn't counted as a click on an abandoned checkout email.

### How long carts last

A shopper's cart stays in their browser for 30 days after their last visit. Carts that never become an order are removed after a while without activity: after 30 days if the shopper never entered an email or phone number, and after 90 days if they did. Those carts also disappear from **Abandoned checkouts** at that point. Removing a cart wipes the shopper's name, contact details and address from it. Carts that became orders are kept.

### How long stock is held

Cash-on-delivery and bank-transfer orders hold their stock with no time limit, until the order is invoiced or canceled.

Stores sell stock from the locations picked in the site's **Sell stock from** setting. See [Sites](https://workstation.repzo.com/docs/online-store/sites).

## Pay links

A pay link is a page where a customer pays an order or invoice without signing in. Use it for orders taken over the phone, in the [Inbox](https://workstation.repzo.com/docs/operations/inbox), or on WhatsApp.

1. Open a native order or an invoice that still has money due.
2. Click **Pay link**. The link is created the first time and the same link comes back after that.
3. Click **Copy link**, **Send on WhatsApp**, or **Open**.

An order without an invoice is billed once when its first pay link is made. On orders, the button needs `orders.update` and `invoices.create`, and your workspace needs the Commerce module.

The pay page (`/pay/<token>`) shows the amount due and a summary, in English or Arabic. The customer can:

- see your bank details under **Other ways to pay**;
- choose **Pay on delivery** when cash on delivery is on and the order meets your rules.

If the amount paid doesn't match or the invoice is already paid, the customer is told the payment was received and is never asked to pay again. Your team reviews it.

AI agents with the **Take orders** capability can send pay links with the `send_payment_link` function. See [AI Agents](https://workstation.repzo.com/docs/operations/ai-agents).

## Shopper sign-in

Shoppers sign in with a 6-digit code instead of a password. A code works for 10 minutes and allows 5 tries, and each email or number can ask for 5 codes an hour. A signed-in session lasts 30 days.

Open **Commerce → Settings → Sign-in**. Each store has its own card:

| Channel | How it works |
|---|---|
| **Email** | Always on. Codes come from your store's name through your email settings. |
| **WhatsApp** | Pick a connected **WhatsApp number** and an approved **Template**, then click **Turn on WhatsApp codes**. The template must be an authentication template, or a utility template whose only variable is the code. Connect a number in Inbox settings first. |
| **Text message (SMS)** | Shoppers with a phone number from your store's country get the code by text message, up to 200 codes a day. Only shown as available when the platform has SMS set up. |

When WhatsApp or SMS is on, shoppers can type a phone number instead of an email.

### Shopper accounts

Signed-in shoppers open **Account** on your store (`/account`) to see:

- **Orders**: each order placed with the email or phone they signed in with, with a link to its status page;
- **Addresses**: up to 20 saved addresses, with one default. At checkout, signed-in shoppers can pick a saved address or tick to save a new one.

Guest checkout always works. A shopper who later signs in with the same email or phone finds their earlier orders there. The thank-you page also offers **Create an account**, which sends a code to the order's own email or phone in one tap.

Shoppers and their orders are [Contacts](https://workstation.repzo.com/docs/sales/contacts) and orders in Workstation, so your team sees them under **Commerce → Customers**.

> **From the CLI**
>
> Payment methods and sign-in options can also be set from the CLI with `repzo store payments` and `repzo store sign-in`. This requires the next CLI release. See [Build a store from the CLI](https://workstation.repzo.com/docs/developers/online-store/cli#payments).

## Related pages

- [Shipping & Delivery](https://workstation.repzo.com/docs/online-store/shipping-and-delivery)
- [Abandoned Checkouts](https://workstation.repzo.com/docs/online-store/abandoned-checkouts)
- [Markets](https://workstation.repzo.com/docs/online-store/markets)
- [Returns & Order Edits](https://workstation.repzo.com/docs/online-store/returns-and-order-edits)
- [Orders](https://workstation.repzo.com/docs/commerce/orders)
- [Invoices](https://workstation.repzo.com/docs/commerce/invoices)
- [Payments](https://workstation.repzo.com/docs/commerce/payments)
