API v1FiatPe Home
FIATPE STRIDE SECURITY

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
Copy
API_KEY:SALT_KEY

Authorization: Basic BASE64_ENCODED_VALUE
Base64 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
Copy
API_KEY:SALT_KEY

Authorization: Basic BASE64(API_KEY:SALT_KEY)
Shell
Copy
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
Copy
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
Copy
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.
HeaderRequiredPurpose
AuthorizationYesBasic followed by Base64(API_KEY:SALT_KEY).
Content-TypeFor JSON bodiesUse application/json for JSON requests.
X-FiatPe-IdempotencyFor payout creationProvides a stable unique value for safe request replay.

Authentication failures

ProblemWhat to check
Missing authorizationConfirm the backend sends the Authorization header on every protected request.
Invalid credentialsVerify that the API Key and Salt Key belong to the same environment and Stride account.
Malformed Basic valueEncode the complete API_KEY:SALT_KEY string without extra spaces or line breaks.
Test and Live mismatchUse Test credentials only with the Test workflow and Live credentials only after activation.
Revoked or rotated keyUpdate 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.