Checkout

Official guide · English · Version 9c253d0cf11816df

The Checkout tab lets you configure how customers complete purchases. You can choose between a fully hosted checkout (managed within the platform) or an external cart sync that integrates with your existing e-commerce store. When using hosted checkout, you can add and manage multiple payment gateways.

Payment region

Available new payment options follow tenant currency: IRR/IRT offers Iranian gateways, while other currencies offer international gateways. Cash on delivery remains available where enabled. Dashboard and chatbot language do not change these options. Each gateway still requires plan access, valid merchant configuration and supported currency; changing currency does not create a merchant account or enable an unconfigured gateway.

Existing configured gateways remain visible for management. Orders, appointment deposits and in-progress payment verification keep their recorded currency after a tenant currency change.

Checkout Configuration

The main Checkout card contains the master toggle, mode selection, and store slug settings. Receiving money from your customers is separate from paying for your own DirectSale subscription in Billing.

Enable / Disable Checkout

The first option is a toggle switch to enable or disable the checkout feature entirely.

  • Enabled (blue): Customers can add products to cart and complete purchases through your storefront or chatbot.
  • Disabled (gray): The checkout functionality is hidden. Products can still be browsed, but customers cannot place orders.

Checkout Mode

When checkout is enabled, you choose between two modes:

Mode Description
Hosted Checkout The platform handles the entire checkout process. Customers complete their purchase on your storefront, and you configure payment gateways directly in the dashboard.
External Cart Sync Products selected in the chatbot or storefront are synced to your external e-commerce store (e.g., WooCommerce or a custom API), and the customer completes checkout on your own website.

Store Slug

The Store Slug field defines a URL-friendly identifier for your store. It accepts only lowercase letters, numbers, and hyphens.

  • In Hosted Checkout mode, use the actual checkout link created for the customer/cart; do not construct payment links from a guessed store URL. The slug does not allocate a permanent public storefront subdomain.
  • In External Cart Sync mode, the slug is still saved but is primarily used for internal identification.

How to Configure Basic Checkout Settings

  1. Navigate to Settings > Checkout.
  2. Toggle Enable Checkout to on.
  3. Select your preferred Checkout Mode (Hosted or External Cart Sync).
  4. Enter a Store Slug (e.g., my-store).
  5. Click Save Settings.

Hosted Checkout: Payment Gateways

When you select Hosted Checkout mode, a second card appears for managing your payment gateways. You can add multiple gateways and designate one as the default.

Supported Payment Gateways

Gateway Credentials Required Description
Cash on Delivery (COD) None Customers pay when the order is delivered. No API credentials needed.
Stripe Secret Key International credit and debit card processing. Requires a Stripe account and your secret API key (starts with sk_live_).
PayPal Client ID + Client Secret Global payment processor supporting PayPal balance, credit cards, and local payment methods. Requires your PayPal API credentials.
Square Access Token In-person and online payments. Requires a Square developer access token (starts with EAAAl).
Mollie API Key European payment processor supporting iDEAL, Bancontact, credit cards, and more. Requires a Mollie API key (starts with live_).
Bale Pay Dedicated payment bot token, bot username and wallet provider token Eligible Iranian hosted payments; use a separate payment bot, not your support bot.
Zarinpal / Zibal Merchant identifier Available for eligible Iranian payment configuration.
Pay.ir / IDPay Provider API key Available for eligible Iranian payment configuration.
SnappPay Merchant Client ID, Client Secret, Username and Password Eligible hosted product purchases; merchant approval and stage testing are required.

Additional installment/BNPL options may be shown for eligible merchants. They require their own provider contract and the exact credentials/endpoints requested by the form; availability is not approval for a merchant account.

Bale Pay setup and successful payment

  1. Confirm the tenant uses IRR or IRT and has the required checkout access.
  2. Create a dedicated Bale payment bot and obtain the required wallet provider token from the payment provider.
  3. Choose Bale Pay, enter the payment bot token, its username and provider token, then save. Never paste these credentials into Help or public content.
  4. Use Test Connection on the configured Bale Pay gateway and follow its result. Connection success is not a completed payment.
  5. Test the full customer checkout using the provider's supported test procedure. After returning from Bale, wait for the platform to verify payment and show the actual result.

Bale supports one webhook per bot, so reusing a support bot for payments can disrupt one of the integrations. Payments settle to the wallet associated with the configured provider token. Configuring this merchant gateway does not change the gateway that bills your DirectSale subscription.

If the customer returns to a waiting checkout page, inspect payment/order status before asking them to pay again. A return redirect or a customer screenshot alone does not prove settlement. In-progress payments retain their original currency context. Receipt/invoice availability and email delivery depend on successful verification and the relevant order/contact configuration.

SnappPay setup and settlement

Use the four credentials from the merchant portal's technical access section. The earlier Application ID and subscription key fields cannot connect to the Iranian merchant API. Register your API server IP and callback URL with SnappPay, then use the exact API origin supplied for your merchant environment. See the official merchant guide.

SnappPay appears for eligible product purchases after the provider checks the amount. The provider determines available credit and installment terms. Prices remain in the order's IRR/IRT currency; toman converts once to rials for the API. The result page waits for server confirmation of Verify and Settle and supports returning to the same order after closing the provider page. A waiting result does not mean the customer should create another payment.

Confirmed purchases post to a separate SnappPay receivable account. Record actual bank payouts as Treasury transfers after comparing the provider statement, and reconcile fees separately. Purchase confirmation is not a bank deposit. DirectSale subscription billing and appointment deposits do not use this option.

Provider cancellations and partial order changes are not automated here. Complete them in the merchant portal and reconcile the order and accounting records; changing a local order alone does not refund the provider payment. Merchant stage tests and the provider's required Cancel/Update integration are still required before this connection can be certified for production use.

Adding a Payment Gateway

  1. In the Payment Gateways card, click the Add button.
  2. A form will appear with a Gateway Type dropdown. Select the gateway you want to add.
  3. If the selected gateway requires credentials, fill in the required fields:
    • COD: No fields required.
    • Stripe: Enter your Secret Key.
    • PayPal: Enter your Client ID and Client Secret.
    • Square: Enter your Access Token.
    • Mollie: Enter your API Key.
    • Bale Pay: Enter the dedicated bot token, username and wallet provider token.
    • Iranian merchant gateways: Enter the merchant ID or API key requested by the selected provider.
  4. Click the Add Gateway button.
  5. The gateway will appear in the list. If it is the first gateway, it will automatically be set as the default.

Info: The first payment gateway you add is automatically set as the default. You can change the default at any time.

Managing Existing Gateways

Each configured gateway is displayed as a card showing the gateway name and its default status (if applicable).

Available Actions

Action Icon Description
Set as Default Star Makes this the default payment method shown to customers. Only available on non-default gateways.
Edit Credentials Pencil Opens an inline form to update the API keys or tokens for this gateway. Not available for COD (no credentials needed).
Remove X Deletes the gateway after a confirmation dialog.

Editing Gateway Credentials

  1. Click the Edit (pencil) icon on the gateway you want to update.
  2. An inline form will expand below the gateway name.
  3. Enter the new credentials. Leave fields blank to keep the existing values.
  4. Click Update to save, or Cancel to discard changes.

Setting the Default Gateway

  1. Click the Star icon on the gateway you want to make the default.
  2. The selected gateway will be marked with a "Default" badge and will be pre-selected for customers during checkout.

Removing a Gateway

  1. Click the X icon on the gateway you want to remove.
  2. Confirm the action in the dialog that appears.
  3. The gateway will be permanently removed.

Warning: Removing a payment gateway that is currently the default will require you to set a new default. Make sure you have at least one active gateway configured, or customers will not be able to complete purchases.


External Cart Sync

When you select External Cart Sync mode, the platform synchronizes the customer's cart to an external e-commerce system. A mode selection card appears where you choose between WooCommerce and Custom API integration.

Integration Type

Type Description
WooCommerce Automatic integration with your connected WooCommerce store. The platform creates orders directly in WooCommerce when customers check out.
Custom API Connect to any e-commerce platform by providing an API endpoint that accepts cart data.

WooCommerce Integration

If you have a WooCommerce connection set up (configured in the Integrations section), the platform can create orders directly in your WooCommerce store.

Prerequisites

  • A WooCommerce store connected via the Integrations section of the dashboard.
  • Products in your catalog must have matching externalProductId values that correspond to WooCommerce product IDs.

How It Works

The WooCommerce checkout flow follows three steps:

  1. Customer adds products to cart -- The chatbot or storefront collects the customer's product selections.
  2. Order is created in WooCommerce -- When the customer checks out, the platform creates a WooCommerce order with the selected items using your WooCommerce API connection.
  3. Customer completes payment -- The customer is directed to your WooCommerce store to complete payment using whatever payment methods you have configured there.

Configuration

  1. Select WooCommerce as the integration type.
  2. If a WooCommerce connection is detected, a green confirmation message will appear showing the connection name and store URL.
  3. Click Save Configuration to apply the settings.

Info: When using WooCommerce mode, you do not need to configure any additional API URLs or keys. The platform uses your existing WooCommerce connection automatically. No separate API configuration is needed.

If no WooCommerce connection is found, an amber warning will prompt you to set up a connection first in the Integrations section.


Custom API Integration

The Custom API option lets you connect to any e-commerce system by configuring an API endpoint.

How It Works

  1. Customer selects products -- Products are collected through the chatbot or storefront.
  2. Cart is sent to your API -- The platform sends a POST request to your Cart API URL with the cart contents.
  3. Your API processes the cart -- Your system creates a cart/order and returns a response.
  4. Customer is redirected -- The customer is redirected to your Checkout Page URL to complete payment.

Configuration Fields

Field Required Description
Cart API URL Yes The full URL of your API endpoint that accepts cart data (e.g., https://yourstore.com/api/cart). The platform will POST cart items to this URL.
API Key / Auth Token No An authentication token included in API requests. If your API requires authentication, provide the token here. The value is stored securely and masked after saving.
Checkout Page URL Yes The URL where customers are redirected after the cart is synced to complete their purchase (e.g., https://yourstore.com/checkout).
Product ID Field No Which product identifier field to use when sending cart data to your API.

Product ID Field Options

Option Description
External Product ID Uses the externalProductId field from your product catalog. Best for synced products that have matching IDs in your external store.
ID Uses the platform's internal product UUID. Best if your external system references products by the DirectSale product ID.
SKU Uses the product's SKU code. Best if your external system tracks products by SKU.
Slug Uses the product's URL slug. Best for systems that identify products by their URL-friendly name.

How to Configure Custom API

  1. Select Custom API as the integration type.
  2. Review the "How It Works" guide that explains the four-step flow.
  3. In the API Configuration card:
    1. Enter the Cart API URL (required).
    2. Optionally enter an API Key / Auth Token for authentication.
    3. Enter the Checkout Page URL (required).
    4. Select the appropriate Product ID Field from the dropdown.
  4. Click Save Configuration.

Warning: Make sure your Cart API URL is publicly accessible and can handle POST requests from the DirectSale servers. If your API requires IP whitelisting, contact support for the list of outgoing IP addresses.