@swype-org/deposit) opens Blink’s hosted deposit flow in a modal iframe overlay. On mobile viewports (480px or narrower), the iframe renders full-screen for an app-like experience. The SDK handles the signer call, iframe lifecycle, passkey/WebAuthn delegation, and completion detection via postMessage.
Install
JavaScript
React hook
status, result, error, displayMessage, and isActive values, plus requestDeposit, focus, and close actions. It manages the Deposit lifecycle and cleans up on unmount.
Prebuilt deposit button
You don’t have to design your own button. The SDK shipsBlinkDepositButton, a prebuilt Blink-branded button — a black pill with a “Deposit stablecoins / In a Blink” label and USDC/USDT coin marks. It is self-contained (inline styles, data-URI icons, no CSS imports) and fills the width of its container.
onClick to requestDeposit yourself, and pass disabled or loading to reflect your app’s state. Its branding is intentionally fixed; if you need a custom look, keep building your own button as shown above. See the BlinkDepositButton reference for the full props table.
Configuration
Full widget vs. one tap
By default the hosted flow can open with the full widget — a deposit options entry screen that offers deposit addresses (pay from an exchange or any wallet) alongside Blink’s one-tap deposit. SetenableFullWidget: false to skip it and send every user straight to the Blink one-tap flow.
The full widget only appears when both your SDK config and your Blink merchant account have it enabled. If it is disabled on your merchant account, the hosted flow stays in one-tap mode regardless of this option — contact Blink to change your account configuration.
Custom signer function
If you need full control over the HTTP call to your signer (custom headers, auth tokens, different HTTP method), pass a function instead of a URL:Deposit request fields
| Field | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | USD amount to deposit (> 0). |
chainId | number | Yes | Destination chain ID. Dynamic per user. For example, 8453 for Base or 792703809 for Solana. |
address | string | Yes | Destination wallet address. For the web SDK this can be an EVM address or a Solana address, depending on the destination chain. |
token | string | Yes | Destination token identifier. Use an EVM token contract address on EVM chains or an SPL mint address on Solana. |
callbackScheme | string | null | No | Always null for browser integrations. Reserved for native app deep links. |
reference | string | No | Merchant order/invoice ID for reconciliation. |
metadata | Record<string, string> | No | Arbitrary key-value pairs forwarded to your signer. |
The destination
chainId, address, and token are not static merchant configuration. They are set dynamically per transaction, typically based on the user’s embedded wallet.Choose destination values from Blink’s active routing catalog. See Supported Networks and Wallets for the current wallet, chain, token, and fee model details.
Deposit result
When the payment completes, the SDK returns aDepositResult:
Status flow
| Status | Meaning |
|---|---|
idle | No active flow. |
signer-loading | Calling the merchant signer endpoint. |
iframe-active | Hosted flow iframe is open, waiting for user to complete payment. |
completed | Transfer succeeded. |
error | Something failed. |
Error handling
See Error Codes for the full reference. Every error is aDepositError with a machine-readable code:
Lifecycle
Metadata and order reference
Pass merchant-specific data through the flow for reconciliation:reference and metadata are forwarded to your signer endpoint so you can correlate the payment with your internal records.
Security
The deposit UI loads live fromhttps://pay.blink.cash. Before going live, lock
the iframe origin with a Content-Security-Policy on your page and learn how to
verify the build:
Mobile browser considerations
- Full-screen iframe: On viewports 480px or narrower, the transfer iframe automatically renders full-screen with no border radius.
- Passkey / WebAuthn: The SDK transparently handles WebAuthn ceremonies between the cross-origin iframe and the parent page. No additional configuration is needed.
callbackScheme: Always passnull(or omit) for browser integrations. Reserved for native app deep-link flows.- Viewport meta tag: Ensure your page includes a proper viewport meta tag: