Settle a Payment
Guides

Settle a Payment

Triggering atomic settlement to disburse funds to all pool members.

Execute atomic settlement to transfer assets and distribute proportional shares to all pool members.

Settlement Overview

Settling a payment executes the atomic fund transfer and distribution snapshot. The transaction must be authorized by the payment's payer.

Executing Settle Payment

CONTRACT="CCOXHXGFTYVRRCJ7U32QZJCWXDTNQLRMDS3IAGW5MGFEWOUEXNYYKLHF"
stellar contract invoke \
--id "$CONTRACT" \
--source payer \
--network testnet \
-- \
settle_payment \
--payment_id 1

What Happens During Execution

  1. Payer account is debited 500,000,000 stroops (50 XLM).
  2. Alice receives 300,000,000 stroops (30 XLM).
  3. Bob receives 200,000,000 stroops (20 XLM).
  4. Payment #1 status transitions to Settled (2).