Api ReferenceAuthentication

Authentication: Your Key to the System

  • What it is: Authentication is how Fiablepay knows it’s really you making a request. It’s like using a password to log in.
  • Why it’s needed: It keeps your data and transactions secure.
  • How it works: You use a special key and secret to prove your identity.
  • Two Keys: Fiablepay gives you two keys: an API_Key (username) and an API_Secret (password).
  • Safety First: Keep your API_Secret secret. Don’t share it publicly.

The Authentication Process

  1. Combine Keys: Put your API_Key and API_Secret together, separated by a colon (e.g., API_Key:API_Secret).
  2. Encode with Base64: This process makes the combined keys a string that is hard to understand.
  3. Authorization Header: Add the Base64 encoded string to your request with “Basic ” in front, and send it with every request.

Example (Simplified):

Let’s say your keys are:

  • API_Key: my_api_key
  • API_Secret: my_secret_key
  1. Combine: my_api_key:my_secret_key
  2. Base64 Encode: Let’s assume the base64 for the above combined string is bXlfYXBpX2tleTpteV9zZWNyZXRfa2V5 (This will be different if you try yourself).
  3. Header:
    Authorization: Basic bXlfYXBpX2tleTpteV9zZWNyZXRfa2V5

Important Points:

  • HTTPS Only: Always send requests using HTTPS (secure connection) not HTTP (insecure).
  • Keep Secrets Safe: Don’t embed your API_Secret directly in your website code.
  • Secure your keys: Do not share your API keys with unauthorized party as they can perform transaction on your behalf.

Think of it this way:

Your API_Key is like a username, and API_Secret is like a password. You combine them in a special way (Base64 encoding) and use that as a unique ticket to make requests with Fiablepay.

In Short: Fiablepay uses a simple but secure authentication system based on keys and secrets that ensures only authorized people and systems can use the API.