HOC SiteDocumentation

Connect a payment integration

Install an integration package, store secrets, and invoke provider queries from lifecycles or pages.

1. Pick a package

Browse catalog packages under Website settings → Integrations or list them with get_integration_packages. Install a template (for example a sandbox card provider) with install_integration_package.

See Integrations.

2. Secrets and variables

Configure package variables (such as baseUrl) and store API keys with save_integration_secret. Map slots to secret ids in the package secretSlotRefs.

3. Define queries

Author integration queries on the package: HTTP method, URL template, and body bindings that read from the current entry or cart context. Test with test_integration_query before going live.

4. Call from the site

Typical patterns:

  • Lifecycle on an order entry — run a capture or refund query when status changes.
  • Page button — runIntegrationQuery (via data request wiring documented in integrations settings).

Review run history with get_integration_runs when debugging.