Skip to main content
sendCalls([...]) settles N calls all-or-nothing in one transaction, authorized with a single signature. It is the EIP-5792-style alias of pay - same input shape, same Receipt - with the atomicity guarantee made explicit.

Quick example

The batch() builder

batch() is a pure, fluent builder that collects calls and enforces the size cap on build():
You can also pass an array directly to sendCalls([...]) - the builder is optional.

Native mechanism

The atomic unit is always the transaction; partial application is impossible at the protocol level - not enforced by retry logic in the SDK.

Size cap

MAX_BATCH_CALLS is 16. batch().build() and sendCalls directly both reject an oversized batch with BuckspayError("BATCH_TOO_LARGE"). Keep batches bounded so a single authorization entry stays within simulation and fee limits.

Parity invariant

A batch of one is byte-identical to the single-call entry produced by pay([call]). Batching adds a wrapper only for N > 1; it never changes the one-call path. This invariant is pinned by a regression golden so the core path cannot drift.
Throughput for independent payments. Settling many independent payments fast is a separate concern from atomic batching. The facilitator spreads independent calls across a pool of channel accounts with non-sequential nonces - transparently, with no API change to how you call pay.

Next

Sessions

Grant scoped session keys so users can pay within fixed limits without a root prompt per action.

Gas in token

Let users pay transaction fees in USDC instead of XLM.