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.


🌐 Base URL

http://localhost:8000/api

Replace with your local or staging server URL when running tests.


πŸ”‘ API Keys

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 http://localhost:8000/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.