Guides

Making API Requests

At this point, we can start making secure API requests to the Falcon backend. All FD Management APIs can be accessed using the FalconSecureSDK.request() function. The actionCode represents the API to call and the payload contains the request data. The shape of the payload object is specific to each action. The next pages in the documentation contain details of the payload needed for each action code.

Params

NameTypeDescription
actionCodeStringEvery request to the Falcon Bankend is represented by an action code. For example: CHECK_USER. Refer to the "Action Codes" page of the docs to find a list of all action codes and their respective payloads.
payloadMap<String, Object>This map contains the unencrypted payload specific to the given action code
bankStringThis is the issuing bank's name
userIdString (Optional)UserID of the current user (All requests except CHECK_USER need userId)
panString (Optional)PAN number of the user (Needed for CHECK_USER for de-dup check)
mobileNumberString (Optional)Mobile Number of the current user (Needed for CHECK_USER for de-dup check)
callbackApiUtils.CallbackCallback to handle the response

Sample

import com.falconfsauth.sdk.FalconSecureSDK;
import com.falconfsauth.sdk.Utils.ApiUtils;
import java.util.HashMap;
import java.util.Map;


Map<String, Object> payload = new HashMap<>();
// Add key-value pairs to the Map
payload.put("key", "value")


FalconSecureSDK.request(actionCode, payload, bank, userId, pan, mobileNumber, new ApiUtils.Callback<String>() {
    @Override
    public void onSuccess(String response, Integer responseCode) {
        // Handle success
    }

    @Override
    public void onError(Exception e) {
        // Handle error
    }
});

Response

NameTypeDescription
responseStringJSON String with the response