Install (Swift Package Manager)
In Xcode, add the package:0.1.0 or later. The repository is private while the SDK is in early access, so ask us for an invite and we’ll add your GitHub account.
Create a wallet link (server side)
url. Hand it to your app. Links expire after 15 minutes by default (expires_in accepts 60 to 86400 seconds).
Present the wallet
AgentcardWalletSheet also accepts linkToken: if you’d rather pass the raw token than the URL.
Ask for a payment
Pass a pay intent to open the pay sheet instead of the wallet home.reference is required: it’s your stable id for this payment, and it’s what makes retries safe.
Webhooks you will receive
Treat the Swift events as UI signals and let your server trust webhooks:connected_card.updatedwhen the user adds a cardtransaction.*events when payments happen
When it fails
The sheet handles failures itself and tells the user what to do, so there is one case your code handles:.tokenExpired, which fires when the link or its session dies. Create a fresh wallet link and present the sheet again.
Sandbox behavior
With sandbox credentials, the connect code is always111111 and the test card is 4242 4242 4242 4242 with any future expiry and any CVC. No real money moves.
Next: Connect users