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.

WooCommerce setup

Return the saved WooCommerce order ID as a string. Airsurf verifies its paid status.

For hosted Airsurf, connect through your store’s existing paid orders. Your team completes refunds in the payment provider and records them in Airsurf.

Start Airsurf and run this command in the Airsurf terminal. Keep provider credentials in the Airsurf server’s environment.

Create a WooCommerce REST key with Read permission. Store ck_…:cs_… as WOO_CREDENTIALS and put the exact HTTPS WordPress base URL into WOO_ALLOWED_BASE_URLS.

Airsurf terminal

docker compose exec -T api node dist/src/cli.js store-connect woocommerce "My store" WOO_CREDENTIALS "$WOO_BASE_URL"

Refund in WooCommerce and submit the refund ID. Airsurf verifies the WooCommerce record. 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,
  ownedPaidProviderOrder: findCustomersPaidOrderId,
});

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.