Installation
Swift Package Manager- Add the following repository URL
- Select your desired version or branch
- Click Add Package
Implementation
- Import the SDK
- Configuration
ImprintConfiguration with your client_secret and environment, then assign additional optional fields as needed.
- Define the Completion Handler
onCompletion to manage the terminal states when the application flow ends.
- Start the Application flow
ImprintConfiguration, initiate the application flow by calling startApplication from your view controller.
viewController: The view controller from which the application flow will be presentedconfiguration: The previously createdImprintConfigurationobject containing your API key and completion handler
Complete Code Example
Check out our complete demo project at Imprint-Tech/imprint-sdk-ios| PROPERTY NAMES | REQUIRED | TYPE | DESCRIPTION | |
|---|---|---|---|---|
client_secret | TRUE | String | Generated through Create Customer Session | |
offerConfigUUID | FALSE | String | Identifier for specific reward offer in the referral system |
| 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 | ErrorCode | 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 |
|---|---|
offerAccepted | Application has been approved and credit offer accepted. New cardholder! |
rejected | Application has been rejected by Imprint |
inProgress | Application has been exited, not completed |
error | Invalid request parameters (e.g., invalid token) |