This endpoint authenticates your merchant account and returns two tokens: a short-lived access token you attach to every API request, and a long-lived refresh token you store securely and use only to rotate the access token when it expires. Your account must have a verified email address before login succeeds. This endpoint applies a strict rate limit.Documentation Index
Fetch the complete documentation index at: https://docs.dubupay.com/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
Request body
The email address registered to your merchant account.
Your account password.
Response
HTTP200 OK on success.
true on a successful login.Example
Using the access token
Pass the access token in theAuthorization header on every authenticated request:
401 UNAUTHORIZED response on a previously working token, call POST /auth/refresh with your refresh token to get a new access token.
Token lifetimes
| Token | Lifetime | Where to store |
|---|---|---|
| Access token | 15 minutes | In-memory only. Do not persist to disk or localStorage. |
| Refresh token | 7 days | Secure, HTTP-only cookie or encrypted storage. Never expose it to client-side JavaScript. |
Error responses
| Status | Code | Description |
|---|---|---|
400 | Validation error | email or password is missing or malformed. |
401 | INVALID_CREDENTIALS | Email/password combination is incorrect, or the account is not active. |
429 | Rate limit | Too many login attempts. Wait before retrying. |