__check_auth to decide who can act and under what conditions.
Use a contract account when:
- You need custom authentication in the contract (passkeys/WebAuthn, hardware keys, or other signer checks).
- You need on chain rules such as spend caps, allow lists, or timelocks.
- You want the simplest path: one private key, fund the account, no extra contract code or infrastructure.
- You must interoperate with systems/tools that expect memos (for example, some exchanges require payments with memos from a G-address; contract account payments go through the Stellar Asset Contract as muxed transfers, so transfers from contracts are not supported by exchanges today).
- Simple Account example
- Complex Account example
- Contract authorization starter guide and Authorization fundamentals
- Choose a fee sponsorship approach: contract accounts can’t pay their own transaction fees