← Protocols
Wert
Payments / Onramp·Multi-chain · EVM · Solana

Wert

01Description

Fiat-to-crypto onramp and NFT checkout widget with smart-contract call support: pay with card and have Wert execute an arbitrary on-chain method (mint, swap, stake) on the user's behalf. Strong card success rates in EMEA.

02Best for
  • 01card-funded NFT mint / smart contract call
  • 02fiat onramp embedded in dApp
  • 03Apple Pay / Google Pay for Web3 actions
  • 04EU card coverage
  • 05fully customizable widget UI
03Install
  • pnpm add @wert-io/widget-initializer
  • pnpm add @wert-io/widget-sc-signer
04Environment variables
VariableScopeDescription
NEXT_PUBLIC_WERT_PARTNER_IDClientWert `partner_id` from the Wert dashboard. Required by the widget; safe to expose client-side.
WERT_PRIVATE_KEYServer32-byte hex private key registered with Wert. Used server-side by `@wert-io/widget-sc-signer` to sign smart-contract-call payloads so the widget can execute them.
WERT_WEBHOOK_SECRETServerWebhook secret used to verify the `X-Wert-Signature` header (HMAC-SHA256) on incoming events.
05Prompt snippet
Use Wert for fiat-funded smart-contract execution and onramp. For pure onramp, instantiate `new WertWidget({ partner_id: NEXT_PUBLIC_WERT_PARTNER_ID, address: userWallet, currency: 'USD', commodity: 'ETH', network: 'ethereum', listeners: { 'payment-status': handler } }).open()` from `@wert-io/widget-initializer`. For NFT mint / contract calls, build the unsigned options server-side (`address`, `commodity`, `network`, `sc_address`, `sc_input_data`) and sign them with `signSmartContractData(options, WERT_PRIVATE_KEY)` from `@wert-io/widget-sc-signer`; pass the signed object to the widget. Wert handles KYC + card processing then submits the on-chain tx for the user. Verify webhook `X-Wert-Signature` HMAC before crediting orders.
06Gotchas
  • Smart-contract-call mode requires the encoded `sc_input_data` (calldata) to match exactly what the contract expects — gas estimation runs at sign time and a single byte mismatch returns `tx_failed` after the user has paid. Simulate the call before signing.
  • The widget signs payloads with a partner-controlled secp256k1 key; if `WERT_PRIVATE_KEY` leaks anyone can mint signed orders. Rotate via the dashboard and never ship to the client.
  • Sandbox uses `partner_id` prefixed `sandbox_` (different from prod) and the `origin: 'https://sandbox.wert.io'` constructor flag; mixing them silently shows the widget in invalid state.
  • Card success rates depend on issuer + 3DS support per region; EU coverage is strong but US issuers reject more often. Surface a fallback rail or expect ~10–15% drop-off.
  • Wert is a session-based widget (currently rolling out a Partner-API session model) — once opened, the user must complete inside the iframe. Background-tab close abandons KYC progress.
  • Network strings are strict (`ethereum`, `polygon`, `bsc`, `solana`, `base`) and the `commodity` must be supported on that chain. Fetch the live list via Data API rather than hard-coding.
  • Webhook signature is HMAC-SHA256 over the raw body — re-stringified JSON breaks verification. Capture the raw buffer.
07Alternatives