Overview
TheregisterAndInvokeIntent() method registers an intent and invokes it in a single call. The user approves via passkey once, and you immediately get payment tokens back.
Best for: instant “Buy Now” flows where the AI doesn’t need to store a mandate for later.
Internally this calls
registerIntent() then invokeIntent() in sequence. The passkey prompt fires once.Method Signature
Parameters
Return Value
Example
When to Use
| Scenario | Use |
|---|---|
| One-time instant purchase | ✅ registerAndInvokeIntent() |
| Recurring / scheduled purchases | ❌ Use registerIntent() + invokeIntent() separately |
| Need to store mandate for later | ❌ Use registerIntent() separately |
| ”Buy Now” button | ✅ registerAndInvokeIntent() |
Error Handling
| Code | Cause | Resolution |
|---|---|---|
PASSKEY_REJECTED | User declined the passkey prompt | Allow retry |
PASSKEY_UNAVAILABLE | Device doesn’t support WebAuthn | Inform user |
CARD_NOT_FOUND | Card ID is invalid or removed | Refresh card list |
MANDATE_VIOLATION | Invalid params | Check amount/merchant |
Next Steps
Browser Automation
Execute checkout with payment tokens
Register Intent
For recurring / deferred purchases