GET a nonce challenge, have the user sign the returned message with their wallet, then POST the signature back. Ownership is proven by the signature — this route never stores a private key.
Endpoint
Request
Headers
Both verbs authenticate via the merchant — either the
merchant_token cookie (browser dashboard) or the merchant’s x-api-key header (API-style calls) is accepted.
Step 1 — GET (issue challenge)
string
required
Query parameter — the external wallet address the merchant wants to link (e.g.
0xAbCd...). Must be an EVM address.wallet_connect_nonce cookie (HTTP-only, 5 minutes). The message looks like:
Step 2 — POST (verify signature)
string
required
The wallet address being linked — must match the address used in step 1.
string
required
The exact SIWE message returned by step 1, signed by the wallet.
string
required
The signature produced by the wallet when signing the message.
string
required
Wallet type. Must be one of
"METAMASK", "WALLETCONNECT", or "COINBASE".Response
GET — Success
boolean
true when the challenge is issued.string
The SIWE message the merchant’s wallet must sign. Contains the challenge nonce.
POST — Success
boolean
true when the signature verifies and the wallet is linked.object
The newly linked wallet.
Examples
GET — Success Response
POST — Success Response
Error Responses
Notes
The nonce challenge expires after 5 minutes. If the POST arrives after expiry — or the nonce cookie is missing because the flow was skipped — the request fails with
"Missing or expired challenge" and you must start over from the GET step.
