Skip to main content
Both verbs require the active verified merchant’s own API key or supported merchant session. This links a wallet to that identity; it is not standalone merchant login. FlareHQ does not store the external wallet’s private key. WalletConnect remains browser-only.

GET /api/merchant/wallet/connect?address=

Returns success: true and a SIWE-style message. It also sets the 5-minute HTTP-only wallet_connect_nonce cookie. Keep that cookie through POST; Node/server fetch does not automatically retain a browser cookie jar. Supply a valid EVM address yourself. The current GET checks that the query is present, not full address syntax. The generated message uses the incoming host and includes purpose, URI, version, nonce and issued-at text; do not reconstruct an example with a different origin.

POST /api/merchant/wallet/connect

Required JSON: address, exact returned message, its wallet signature, and walletKind (METAMASK, WALLETCONNECT or COINBASE). In the supported UI, keep the requested and submitted address equal and sign the unchanged challenge with that wallet. The current server requires its nonce cookie to occur in the submitted message, then runs verifyMessage for the submitted address. It does not parse/validate a complete SIWE schema or independently compare every domain, URI, chain, timestamp and original challenge-address field. Do not describe it as strict full-SIWE validation. This is an unchanged implementation limitation, not a newly proven mainnet login test. Successful POST updates walletProvider/walletAddress, clears circleWalletId and deletes the nonce cookie. Returns success and wallet.walletProvider/wallet.walletAddress. Missing authentication returns 401; missing input, invalid kind or challenge returns 400; signature failure returns 401.

Routing consequences

Linking makes the payout wallet external for future routing; old invoice recipient fields remain frozen. The Circle withdrawal endpoint becomes unavailable, and switching back through PATCH wallet creates a new Circle wallet rather than restoring the old one. Review the displayed address and network before linking a wallet or authorizing a payment.