Skip to main content

Authentication & Headers

Every FinCard Virtual API request must carry a valid Bearer JWT token and a set of required context headers. Missing any of them returns HTTP 400 Missing required header(s).

Step 1 — Obtain a Session Token

Call the login endpoint once to obtain a short-lived JWT. Pass it as Authorization: Bearer <token> in all subsequent requests.
Request body:
Response:
expiresIn is in seconds. Tokens are valid for 1 hour. Re-authenticate before expiry — there is no refresh token endpoint.

Step 2 — Include Headers on Every Request

All 46 FinCard Virtual endpoints require the following headers:
X-Forwarded-For, X-Forwarded-From, platform, and deviceId are validated server-side. A 400 Missing required header(s) error is returned if any are absent.

Complete Request Example


Response Envelope

Every response — success or error — is wrapped in the same envelope:
Even HTTP 200 responses can have "success": false for business-level errors (e.g. card not found, insufficient balance). Always check success and code.

Error Reference


SDK / Script Example (PowerShell)