Skip to main content
The login endpoint authenticates an active verified merchant with email/password and issues a 7-day HTTP-only merchant_token cookie. Supported profile, wallet and withdrawal routes also accept the merchant’s own API key; they do not accept a consumer/admin session. Mainnet login can perform Circle wallet migration/liveness checks; a stale wallet or provider failure can block login with update/retry guidance. To sign out, call DELETE /api/merchant/me.

Endpoint

Request

Headers

No authentication is required — this endpoint is the authentication step.

Body Parameters

string
required
The email the account was registered with.
string
required
The account password. Verified against the bcrypt hash stored at signup.

Response

boolean
true on a successful login.
object
Summary of the authenticated merchant.
The response also sets merchant_token (HttpOnly, SameSite=Lax, 7-day expiry). Browsers store and resend it automatically on supported same-origin session routes. Server-side fetch does not automatically retain a browser cookie jar.

Logout

Signing out is handled by DELETE /api/merchant/me:
Send the current merchant session to attempt account session-version invalidation. The cookie is always cleared; the database update is best-effort. The response returns:

Examples

Success Response

Error Responses

Notes

Login is only possible after the account is verified. Unverified accounts receive HTTP 403 with "Please verify your email first." — complete the code at POST /api/merchant/verify first.
The merchant_token cookie is HttpOnly, so it is not readable from browser JavaScript. Use the response body’s merchant object if you need account details client-side.
Keep the merchant API key server-side. Use GET /api/merchant/me or GET /api/payments/all; the old /api/merchant/dashboard API returns 410. A merchant cookie is not accepted by the separate initialize resolver.