Skip to main content
This is the wallet for native iOS apps. AgentcardWalletKit is a SwiftUI package: you pass it a wallet link and present it like any other view. It talks to the API natively, and only the card entry step runs in a secure web view.

Install (Swift Package Manager)

In Xcode, add the package:
Pin it at 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.
The response includes a 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.updated when the user adds a card
  • transaction.* 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 always 111111 and the test card is 4242 4242 4242 4242 with any future expiry and any CVC. No real money moves. Next: Connect users