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 anAPI_Secret
(password). - Safety First: Keep your
API_Secret
secret. Don’t share it publicly.
The Authentication Process
- Combine Keys: Put your
API_Key
andAPI_Secret
together, separated by a colon (e.g.,API_Key:API_Secret
). - Encode with Base64: This process makes the combined keys a string that is hard to understand.
- 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
- Combine:
my_api_key:my_secret_key
- Base64 Encode: Let’s assume the base64 for the above combined string is
bXlfYXBpX2tleTpteV9zZWNyZXRfa2V5
(This will be different if you try yourself). - Header:
Authorization: Basic bXlfYXBpX2tleTpteV9zZWNyZXRfa2V5
Important Points:
- HTTPS Only: Always send requests using
HTTPS
(secure connection) notHTTP
(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.