Skip to content
SETSimple Easy Transactions
SET DocsSET Crypto API Suite and SET API referenceCurrent as of 2026-11-21 · wallet release 7d8a79fb
Browse: SET API

SET API · Accounting

Connect QuickBooks Online or Xero

POST/v1/accounting/connections

Key scope: write · Business accounts · Success: 201

Starts connecting QuickBooks Online or Xero. The answer is an authorizeUrl that the business's ledger owner opens and approves, once, within 30 minutes; the connection exists only after that approval. From then on, journal entries from syncFrom are posted to the ledger, each once.

Headers

Idempotency-Key string
Any unique string, so a retry runs once. See Idempotency.

Body

provider "quickbooks" | "xero"required
The ledger to connect. Any other value answers 400 provider_invalid.
syncFrom string
An ISO 8601 time: entries created from then are posted. Default: the start of SET Close's first period for a business that uses Close, otherwise now. Anything else answers 400 sync_from_invalid.
currency "usd" | "eur" | "gbp"
The ledger's home currency, usd by default. Entries in any other currency are skipped.

Notes

  • Accounting connections are switched on per deployment; when off, the call answers 403 accounting_connectors_off. Check GET /v1/capabilities (features.*).
  • Needs a key with the write scope.
  • Accounting connections are for a business account: a platform key gets 403 accounting_merchant_only.
  • If the chosen ledger is not set up on the deployment yet, the call answers 503 accounting_unavailable.
  • Open authorizeUrl as the business's ledger owner and approve; it works once, for 30 minutes. The ledger then sends the owner back to SET, which completes the connection.
  • One connection per business and mode: approving a new connection replaces the current one.
  • No customer or invoice is needed to start a connection.
  • The example was made with a sandbox key; the state in authorizeUrl is shown as a placeholder.
  • This example is a recorded run of SET's own code (wallet release e9b03447) with a sandbox key; ids and times are that run's.

Errors

  • 403 accounting_connectors_off
  • 403 accounting_merchant_only
  • 400 provider_invalid
  • 400 sync_from_invalid
  • 400 currency_invalid
  • 503 accounting_unavailable

All codes: Errors.