Staging Environment Configuration

This environment is used for testing and staging Cladfy Member API integrations before moving to production.

Use this setup to simulate the full Member journey (authentication, profile, loan applications, repayments) with test credentials and sandbox data.

πŸ”‘ API Keys

πŸ“˜

Authentication

All calls to the endpoints will require an API Key in the Header provided as X-API-Key: YOUR_API_KEY, which you can get from your dashboard in the branches settings section or upon request via email to [email protected]

Where to find your API Keys

On your dashboard go to the branches settings section, click the actions button of any particular branch, then navigate to Manage API.

πŸ“˜

Base URL

All endpoints will be appended to this URL https://{appname}.cladfy.app/api/ or your localhost.

Replace with your local or staging server URL when running tests

VariableDescriptionExampleType
api_keyPublic API key identifying your branch/apppk_test_sample_keySecret
api_secretPrivate API secret for your branchsk_test_sample_secretSecret

Usage example (in headers):

-X 'X-API-Key: pk_test_sample_key' \
-X 'X-API-Secret: sk_test_sample_secret'

πŸ§β€β™‚οΈ Member Variables

VariableDescriptionExample
member_idMember unique ID1
member_noMember number assigned after registrationMEM-0001
jwt_tokenJWT token received after logineyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
token_typeToken type (bearer)bearer

πŸ’° Loan & Payment Variables

VariableDescriptionExample
loan_idUnique ID for the active loan10
loan_numberLoan reference numberLN-00010
loan_product_idProduct ID for testing1
account_idLinked savings account ID1
payment_idPayment reference ID(auto-filled after payment)
transaction_idPayment transaction ID(auto-filled)
trx_idMobile money transaction ID(auto-filled)
disbursement_trx_idDisbursement transaction reference(auto-filled)

βš™οΈ Setup Instructions

  1. Open Postman β†’ Environments β†’ Import
  2. Upload Staging.postman_environment.json
  3. Select Staging/Test environment from the top-right dropdown
  4. Ensure base URL is accessible locally (e.g., php artisan serve)
  5. Test using endpoints from Complete Member API (Production Ready) collection

🧩 Example: Local Login Request (cURL)

curl -X POST https://{appname}.cladfy.app/api/auth/login \
-H 'X-API-Key: pk_test_sample_key' \
-H 'X-API-Secret: sk_test_sample_secret' \
-H 'Content-Type: application/json' \
-d '{
  "email": "[email protected]",
  "password": "SecurePass123!"
}'

βœ… Expected Response

{
  "success": true,
  "message": "Login successful",
  "data": {
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOi...",
    "token_type": "bearer",
    "expires_in": 3600,
    "member": {
      "id": 1,
      "member_no": "MEM-0001",
      "first_name": "John",
      "last_name": "Doe"
    }
  }
}

❗️

Note

This environment is meant for sandbox use only. Do NOT use production API keys or data.