Skip to content
BaxPayDevelopers

In-store integration

Accounting & ERP sync

Sync your BaxPay product catalog with accounting software. Merchants connect from the Business dashboard under Developers → Accounting — not under POS Connections.

Accounting links are ERP integrations. They are separate from till / pump Connections (ECR, FORECOURT, …). Use Accounting for catalog push/pull; use Connections for in-store payment credentials (bxc_…).

Ways to connect

ModeMerchant experienceBest for
OAuthClick Connect Pennylane / QuickBooks / Sage, log in, approve BaxPayDirect vendor APIs
WebhookProvide a catalog callback URL; receive signed catalog.sync POSTsMiddleware or custom ERP

OAuth uses BaxPay’s platform app with each vendor. Merchants authorize access to their company; they do not register their own OAuth client ID in BaxPay.

Dashboard flow

  1. Open Developers → Accounting → Connect accounting.
  2. Pick the software (or Custom webhook).
  3. For OAuth vendors, open the connection and click Connect (Pennylane, QuickBooks, or Sage).
  4. After approval, use Sync catalog (BaxPay → ERP) or Import from ERP (ERP → BaxPay).
  5. Or push from Products → Export → Push to ERP (hits webhooks and OAuth links).

Webhook delivery

When BaxPay pushes a catalog snapshot to your callback:

HeaderValue
X-BaxPay-Eventcatalog.sync
X-BaxPay-Livemodetrue or false
X-BaxPay-Formatbaxpay.catalog.v1, pennylane.products.v1, quickbooks.items.v1, or sage.products.v1
X-BaxPay-Vendorgeneric, pennylane, quickbooks, or sage
X-BaxPay-Signature-V2t=<unix seconds>,v1=<HMAC-SHA256 of "<t>.<raw body>"> with your connection callbackSecret: verify this one
X-BaxPay-Timestamp, X-BaxPay-Event-IdThe signing time; a unique id per push for deduplication
X-BaxPay-SignatureLegacy: HMAC-SHA256 hex of the raw body only

Verify signatures like webhooks. Respond with 2xx within 10 seconds.

Full payload schema: Products → ERP catalog sync.

With your API key

A custom webhook link, and pushing the catalog to it, also work with your bx_ API key, so a middleware can set itself up. Create the link as an ERP connection with the callback URL:

curl -X POST https://sandbox-api.baxpay.com/v1/connections \
  -H "Authorization: Bearer $BAXPAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "systemType": "ERP",
    "label": "Custom ERP",
    "callbackUrl": "https://yourapp.com/hooks/baxpay"
  }'
{
  "success": true,
  "data": { "connectionId": "f8a5882f-…", "credential": "bxc_…", "callbackSecret": "whsec_…" }
}

Keep callbackSecret: it signs every push. Then push the catalog to all active links:

curl -X POST https://sandbox-api.baxpay.com/v1/products/export/push-erp \
  -H "Authorization: Bearer $BAXPAY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
{
  "success": true,
  "data": {
    "pushed": 1,
    "results": [{ "connectionId": "f8a5882f-…", "label": "Custom ERP", "vendor": "generic", "format": "baxpay.catalog.v1", "ok": true }]
  }
}

The platform must have accounting adapters switched on; otherwise creating the link answers 403.

Dashboard API

OAuth links (Pennylane, QuickBooks, Sage) need a person to approve access, so they are managed with a dashboard login, not an API key:

MethodPathNotes
POST/merchant-integrationsCreate an accounting link (systemType: "ERP", label, erpVendor, optional callbackUrl)
POST/merchant-integrations/{id}/erp/oauth/startBegin OAuth; returns authorizationUrl
GET/integrations/erp/oauth/callbackVendor redirect (public)
POST/merchant-integrations/{id}/erp/syncPush catalog via the vendor API
POST/merchant-integrations/{id}/erp/importPull products into BaxPay (upsert by SKU)
GET/merchant-integrations/{id}/erp/accountsThe vendor's chart of accounts
PUT/merchant-integrations/{id}/erp/account-mapMap BaxPay revenue / VAT to those accounts
PUT/merchant-integrations/{id}/erp/settingsSync options, such as automatic sync
DELETE/merchant-integrations/{id}/erp/oauthDisconnect OAuth tokens

Scheduled OAuth sync runs about every 6 hours unless disabled on the connection.