Getting Started
First Payment
Executing your first end-to-end payment creation and settlement on Testnet.
Follow this hands-on guide to execute an end-to-end payment creation and settlement on Testnet using either the Stellar CLI or the SplitPay web application.
Overview of the Payment Flow
Payment settlement in SplitPay occurs in two distinct operations:
create_payment: Initiates a pending payment record on-chain with payment ID, pool ID, payer address, and gross amount.settle_payment: Authenticated by payer or pool owner. Atomically transfers funds and disburses allocations according to active shares.
CLI Execution Recipe
CONTRACT="CCOXHXGFTYVRRCJ7U32QZJCWXDTNQLRMDS3IAGW5MGFEWOUEXNYYKLHF"# 1. Create a payment record (Payment ID: 1, Pool ID: 1, Amount: 1000000000 stroops = 100 XLM)stellar contract invoke \ --id "$CONTRACT" \ --source payer_account \ --network testnet \ -- \ create_payment \ --payment_id 1 \ --pool_id 1 \ --payer "<PAYER_STELLAR_ADDRESS>" \ --amount 1000000000# 2. Settle the payment atomicallystellar contract invoke \ --id "$CONTRACT" \ --source payer_account \ --network testnet \ -- \ settle_payment \ --payment_id 1Web Interface Execution
- Open http://splitpay.samkiel.dev/payments/new.
- Select your pool from the dropdown.
- Enter the gross amount (e.g. 50 XLM).
- Inspect the interactive breakdown table showing exact amounts per member.
- Click Sign & Settle Payment to authorize the two-step transaction with Freighter.
Verifying Resulting Distributions
Query the resulting immutable distribution receipt on-chain:
stellar contract invoke \ --id "$CONTRACT" \ --source payer_account \ --network testnet \ -- \ get_distributions \ --payment_id 1The contract returns a vector of Distribution structs indicating the exact amount transferred to each member.