FiatPe Stride API Authentication
Authenticate Stride API requests securely with HTTP Basic authentication and server-side credentials.
HTTP Basic authentication
FiatPe APIs use HTTP Basic authentication. Combine the Stride API Key and Salt Key with a colon, Base64 encode the complete value, and send it in the Authorization header.
Credential format
API_KEY:SALT_KEY
Authorization: Basic BASE64_ENCODED_VALUEBase64 is not encryption
The encoded value contains both credentials and must be protected like a password. Always use HTTPS and construct the header only inside a trusted backend.
Create the authorization value
Credential structure
API_KEY:SALT_KEY
Authorization: Basic BASE64(API_KEY:SALT_KEY)Shell
API_KEY="ak_test_xxxxxxxxxxxxxxxx"
SALT_KEY="sk_test_xxxxxxxxxxxxxxxx"
ENCODED_CREDENTIALS=$(printf '%s' "$API_KEY:$SALT_KEY" | base64)
AUTHORIZATION_HEADER="Basic $ENCODED_CREDENTIALS"
printf '%s
' "$AUTHORIZATION_HEADER"Node.js
const apiKey = process.env.FIATPE_STRIDE_API_KEY;
const saltKey = process.env.FIATPE_STRIDE_SALT_KEY;
if (!apiKey || !saltKey) {
throw new Error("FiatPe Stride credentials are not configured");
}
const authorization = Buffer
.from(`${apiKey}:${saltKey}`, "utf8")
.toString("base64");
const headers = {
Authorization: `Basic ${authorization}`,
"Content-Type": "application/json",
};Send an authenticated request
cURL structure
curl --request POST 'https://api.fiatpe.com/<stride-endpoint>' \
--header 'Authorization: Basic YOUR_BASE64_CREDENTIALS' \
--header 'Content-Type: application/json' \
--header 'X-FiatPe-Idempotency: YOUR_UNIQUE_REQUEST_ID' \
--data '{}'
# Replace <stride-endpoint> and the empty body with the values shown
# in the endpoint-specific FiatPe Stride API reference.| Header | Required | Purpose |
|---|---|---|
Authorization | Yes | Basic followed by Base64(API_KEY:SALT_KEY). |
Content-Type | For JSON bodies | Use application/json for JSON requests. |
X-FiatPe-Idempotency | For payout creation | Provides a stable unique value for safe request replay. |
Authentication failures
| Problem | What to check |
|---|---|
| Missing authorization | Confirm the backend sends the Authorization header on every protected request. |
| Invalid credentials | Verify that the API Key and Salt Key belong to the same environment and Stride account. |
| Malformed Basic value | Encode the complete API_KEY:SALT_KEY string without extra spaces or line breaks. |
| Test and Live mismatch | Use Test credentials only with the Test workflow and Live credentials only after activation. |
| Revoked or rotated key | Update the secret store and redeploy the authorized service with the current credential pair. |
Security requirements
- Never place credentials in frontend JavaScript, Android or iOS applications.
- Do not commit credentials, encoded authorization values or environment files to Git.
- Mask authorization headers and keys in request logs, monitoring tools and error reports.
- Grant credential access only to the production service and operators who require it.
- Rotate credentials immediately if they may have been disclosed.