Developer Docs

Web orders and online checkout with a public contract.

This documentation covers two things: Ordenlink's public web orders contract and how each organization can connect its own Square account to receive its own online payments.

Overview

What the public surface covers today

Ordenlink exposes a public contract for place ordering and online checkout. The business publishes its menu, the customer creates the order from a visible place and, if the flow is prepaid, pays via an online checkout connected to the business's own account.

POST/v1/public/tenants/{organizationId}/places/{code}/orders

Creates a web order for a published place.

GET/v1/public/orders/{orderId}

Queries the public status of a created order.

POST/v1/public/orders/{orderId}/payment-intent

Initiates an online checkout for an order that requires immediate payment.

  • Idempotency-Key is required when creating the order.
  • X-Order-Lookup-Token is required to query status or initiate a payment-intent.
  • The lookup token must be treated as a client secret.
  • The public integration does not expose private system routes or details.
Web orders

Recommended flow for place ordering and prepayment

When a place requires immediate payment, the integrator must create the order, request the payment-intent for the online tender method and then query the public status until seeing payment confirmation in the business's connected account.

1. Create the order

Create the public order with an Idempotency-Key. If the place works on prepay use paymentChoice pay_now; if the business allows later payment use pay_later.

2. Request payment intent

If the order requires immediate payment, request /payment-intent with the online tender method that organization has enabled for payment in that place.

3. Open hosted checkout

Use the URL or client secret returned by the provider to take the customer to the online checkout without exposing internal system logic.

4. Confirm status

After payment, query the public status endpoint and drive the interface with nextAction.

Create order

POST/v1/public/tenants/{organizationId}/places/{code}/orders

Initiate online payment

POST/v1/public/orders/{orderId}/payment-intent

Query status

GET/v1/public/orders/{orderId}
curl -i \
  -X POST "https://api.ordenlink.com/v1/public/tenants/org_123/places/mesa12/orders" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: create-order-20260424-0001" \
  --data-raw '{
    "items": [
      {
        "productId": "prod_123",
        "quantity": 1
      }
    ],
    "customerNote": "No onion",
    "paymentChoice": "pay_now",
    "source": "web_menu"
  }'
curl -i \
  -X POST "https://api.ordenlink.com/v1/public/orders/order_123/payment-intent" \
  -H "Content-Type: application/json" \
  -H "X-Order-Lookup-Token: public_lookup_token" \
  --data-raw '{
    "tenderMethod": "square_checkout"
  }'
curl -i \
  -X GET "https://api.ordenlink.com/v1/public/orders/order_123" \
  -H "X-Order-Lookup-Token: public_lookup_token"

Supported nextAction values

  • complete_payment
  • wait_for_kitchen
  • order_ready
  • completed
  • cancelled
Square sandbox

How an organization connects its own account for testing

Use Square Sandbox to validate the organization's OAuth connection, checkout initiation and payment confirmation before going to production.

Redirect URL

https://api.ordenlink.com/v1/payments/providers/square/callback

Notification URL

https://api.ordenlink.com/v1/payments/webhooks/square

Recommended events

  • payment.created
  • payment.updated

Sandbox checklist

  • The organization creates or uses its own Square app in Sandbox mode.
  • In Square OAuth, register Redirect URL: https://api.ordenlink.com/v1/payments/providers/square/callback
  • In Webhook subscriptions, register Notification URL: https://api.ordenlink.com/v1/payments/webhooks/square
  • Use API version 2026-01-22 and subscribe only to payment.created and payment.updated.
  • In Ordenlink > Settings > Payments, the organization enables Square and leaves mode as Sandbox.
  • Click Connect Square to authorize the business's own sandbox account and verify merchant and main location.
  • In Tender methods, enable Square Checkout and activate the Public / place context for that business.
  • Test a pay_now order on the public place and validate that the payment is confirmed in Ordenlink.
Square live

How an organization goes to production

When the sandbox flow is validated, the organization connects its real Square account to receive online payments in its own published places.

Production checklist

  • The organization switches its Square app to Production and registers the same public redirect and webhook URLs.
  • From Ordenlink, connect the real business account with Live mode.
  • Verify merchant, main location and that Square Checkout is enabled for Public / place in that organization.
  • Run a real low-value test to confirm that business is now receiving payments in its own account.
  • Check that the order moves to payment confirmed and that kitchen receives the order only after payment.

Recommendation: before announcing the channel as ready for customers, complete a real low-value test and verify that the payment settles in the business's own account and that the order changes to payment confirmed within Ordenlink.

Compatible channels

Where this public contract fits

This public surface is designed for ordering and checkout channels. The integrator controls its branded experience and Ordenlink receives the order in its operational flow.

Your own web menu

Your site or landing page can create web orders and redirect the customer to an online checkout without depending on the POS.

  • Ideal for own menus, QR ordering and table links.
  • Keeps the order connected to the Ordenlink operational flow.
  • Allows using Square Checkout as a hosted payment layer.

Online checkout

Ordenlink can initiate the online checkout for a public order and then confirm payment before sending to kitchen.

  • Works with web orders that require prepayment.
  • The business defines the available tender method by context.
  • The customer completes payment on an experience hosted by the provider.

Connected channels

Ecommerce, web apps or own channels can use the public API to create the order and query its status without touching private routes.

  • Built for branded channels, pickup and web ordering.
  • Use idempotency to protect retries.
  • Public status is queried with a secure lookup token.

Square is presented here only as a connection for each organization's own account. Ordenlink does not use a central shared payment account across different businesses.

Current scope

What is outside the public contract today

The public documentation shows only what's needed to integrate web ordering and online checkout. Internal platform configuration is outside this page.

Does not document internal credentials, secrets or private platform configuration.

Does not expose internal operation, kitchen or register fields within the public contract.

The open contract focuses on place ordering, public status and hosted online checkout.

Manual access tokens should not be entered in the Ordenlink UI to connect Square.

Open webhooks for third parties are not part of the public contract today.