Installation
react >= 18.
Setup
Wrap your app inDaimoSDKProvider:
Basic usage
- Create a session on your server (see Quickstart)
- Pass
sessionIdandclientSecretto<DaimoModal>
sessionId and clientSecret come from the session object returned by POST /v1/sessions.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
sessionId | string | - | Session ID from your backend (required) |
clientSecret | string | - | Client secret from your backend (required) |
defaultOpen | boolean | true | Whether the modal opens automatically on mount |
connectedWalletOnly | boolean | false | Skip chain/method selection, use only the connected wallet |
embedded | boolean | false | Render inline instead of as an overlay |
animate | boolean | true | Enable open/close animations |
maxHeight | number | - | Maximum height of the modal in pixels |
platform | "ios" | "android" | "other" | - | Platform hint for wallet deeplinks |
returnUrl | string | - | URL shown as a “return” link after completion |
returnLabel | string | - | Label for the return link |
Event handlers
| Handler | Fires when |
|---|---|
onPaymentStarted | User’s deposit transaction is detected |
onPaymentCompleted | Funds are delivered to the destination |
onOpen | Modal becomes visible |
onClose | Modal is dismissed |
Embedded mode
Setembedded to render the deposit flow inline instead of as an overlay modal: