Installation
Step 1: Add to app-level build.gradle and sync project to gradle
Implementation
Step 2: Import the SDK
Step 3: Configuration
Create an instance ofImprintConfiguration with your clientSecret and environment, then assign additional optional fields as needed.
Step 4: Define the completion handler
Define the completion handleronCompletion to manage the terminal states when the application flow ends.
Step 5: Starting the Application flow
Once you have configured theImprintConfiguration, initiate the application flow by calling Imprint.startApplication. This will start within a new Activity.
context: The context from which the application process will be presented
configuration: The previously created ImprintConfiguration object containing your API key and completion handler
onCompletion: The completion handler of the flow
Complete code example
| PROPERTY NAME | REQUIRED | TYPE | DESCRIPTION | |
|---|---|---|---|---|
clientSecret | TRUE | String | Generated through Create Customer Session |
| PROPERTY NAMES | TYPE | DESCRIPTION |
|---|---|---|
customer_id | String | null | Imprint identifier for customer |
partner_customer_id | String | null | Partner identifier for customer |
payment_method_id | String | null | ID to the payment method of customer |
error_code | ImprintErrorCode | null | Identifier for the specific error encountered |
| ENUM | DESCRIPTION |
|---|---|
INVALID_CLIENT_SECRET | Indicate Client Secret is invalid |
UNKNOWN_ERROR | Indicate other unexpected error happened |
| ENUM | DESCRIPTION |
|---|---|
OFFER_ACCEPTED | Application has been approved and credit offer accepted. New cardholder! |
REJECTED | Application has been rejected by Imprint |
IN_PROGRESS | Application has been exited, not completed |
ERROR | Invalid request parameters (e.g., invalid client secret) |