Airsurf For AI agents

Connect your store.

Choose your checkout, then add Airsurf to your existing order page. The standard hosted version is free and needs no payment card.

Square setup

Use a completed Square payment from your verified server record. Keep the Square payment ID and your stored order items.

Create a workspace to get the connection ID and a scoped server key. Your checkout stays where it is.

Set customer request windows

Enter days after payment. Leave blank for unlimited time or use 0 to turn off a request type.

Process the refund in Square. Record the full refund ID in Airsurf after it succeeds. Read the payment documentation.

Add the route to your store

Mount the handler as a POST route on your store’s server. Return the order only when the signed-in customer owns it and payment was confirmed on the server.

Set STORE_ORIGIN, AIRSURF_API_ORIGIN, AIRSURF_STOREFRONT_KEY and AIRSURF_CONNECTION_ID in server secrets. Add canSubmitRequest if your app must check live fulfillment rules such as dispatch.

Download the server handler

Storefront server example

import { managePurchaseRoute } from './airsurf-manage-purchase.mjs';

export const POST = managePurchaseRoute({
  storeOrigin: process.env.STORE_ORIGIN,
  apiOrigin: process.env.AIRSURF_API_ORIGIN,
  storefrontKey: process.env.AIRSURF_STOREFRONT_KEY,
  connectionId: process.env.AIRSURF_CONNECTION_ID,
  currentUser: getSignedInCustomer,
  ownedPaidOrder: findCustomersPaidOrder,
});

Verified paid order returned by your server

{
  "externalId": "order_42",
  "paymentId": "capture_42",
  "currency": "usd",
  "totalMinor": 1000,
  "paidAt": "2026-01-15T12:00:00Z",
  "items": [
    {
      "id": "mug",
      "name": "Ridge Camp Mug",
      "quantity": 1
    }
  ]
}

Using a server language besides Node.js? Mount your own route using the same store session and the HTTP API.

Make it look like your store

Preview the button, then add it to a paid order page where the customer is signed in.

Interactive preview

  1. Download the browser widget and serve the file from /assets/airsurf-purchase.mjs on your store.
  2. Copy the markup into your paid order page. Replace YOUR_LOCAL_PURCHASE_ID with the store’s order ID for that page.

Order page markup

See the whole flow with a sample order at Northline Supply.