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.
Stripe Checkout setup
Return the verified test Checkout Session ID (cs_test_…) from the store’s paid order.
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.
Use a Stripe test account and matching STRIPE_TEST_KEY, STRIPE_WEBHOOK_SECRET and STRIPE_ACCOUNT_ID. Set the webhook destination to your Airsurf instance.
docker compose exec -T api node dist/src/cli.js store-connect stripe "My store" STRIPE_TEST_KEY STRIPE_WEBHOOK_SECRET "$STRIPE_ACCOUNT_ID"
stripe listen --events refund.created,refund.updated,refund.failed,charge.refund.updated --forward-to "$AIRSURF_API_ORIGIN/webhooks/stripe/$AIRSURF_CONNECTION_ID"
Airsurf can send a full USD test refund after staff approval or a verified store cancellation under the refund policy. 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.
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
- Download the browser widget and serve the file from
/assets/airsurf-purchase.mjson your store. - Copy the markup into your paid order page. Replace
YOUR_LOCAL_PURCHASE_IDwith the store’s order ID for that page.
See the whole flow with a sample order at Northline Supply.