-
public class GiniBankApi for interacting with Capture and Payment features.
The Capture feature is a layer of abstraction above Gini Capture SDK and the Return Assistant feature. Capture feature can be used with:
the Screen API by calling startCaptureFlow or startCaptureFlowForIntent.
To use capture features, they need to be configured with setCaptureConfiguration.
To use the pay feature, first setGiniApi needs to be called. The flow for this feature would be:
getRequestId to extract the id from the Intent
getPaymentRequest to get payment details set by the business app.
resolvePaymentRequest to mark the PaymentRequest as paid.
returnToPaymentInitiatorApp to return to the app that started the flow.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classGiniBank.CreateCaptureFlowFragmentForIntentResultpublic classGiniBank.CreateDocumentFromImportedFileResultResults of document creation from an imported pdf or image(s).
-
Field Summary
Fields Modifier and Type Field Description private final TransactionDocstransactionDocsprivate DigitalInvoiceOnboardingNavigationBarBottomAdapterdigitalInvoiceOnboardingNavigationBarBottomAdapterprivate DigitalInvoiceHelpNavigationBarBottomAdapterdigitalInvoiceHelpNavigationBarBottomAdapterprivate OnboardingIllustrationAdapterdigitalInvoiceOnboardingIllustrationAdapterprivate DigitalInvoiceNavigationBarBottomAdapterdigitalInvoiceNavigationBarBottomAdapterprivate SkontoNavigationBarBottomAdapterskontoNavigationBarBottomAdapterprivate DigitalInvoiceSkontoNavigationBarBottomAdapterdigitalInvoiceSkontoNavigationBarBottomAdapterprivate SkontoHelpNavigationBarBottomAdapterskontoHelpNavigationBarBottomAdapterprivate BooleanenableReturnReasonspublic final static GiniBankINSTANCE
-
Method Summary
Modifier and Type Method Description final UnitsetCaptureConfiguration(CaptureConfiguration captureConfiguration)Sets configuration for Capture feature. final UnitsetCaptureConfiguration(Context context, CaptureConfiguration captureConfiguration)Sets configuration for Capture feature. final UnitsendTransferSummary(String paymentRecipient, String paymentReference, String paymentPurpose, String iban, String bic, Amount amount, Boolean instantPayment)Provides transfer summary to Gini. final UnitreleaseCapture(Context context, String paymentRecipient, String paymentReference, String paymentPurpose, String iban, String bic, Amount amount)Frees up resources used by the capture flow. final UnitreleaseCapture(Context context)Frees up resources used by the capture flow. final UnitcleanupCapture(Context context)Frees up resources used by the capture flow. final RequirementsReportcheckCaptureRequirements(Context context)Checks hardware requirements for Capture feature. final UnitstartCaptureFlow(ActivityResultLauncher<Unit> resultLauncher)Screen API for starting the capture flow. final CaptureFlowFragmentcreateCaptureFlowFragment()final CancellationTokencreateCaptureFlowFragmentForIntent(Context context, Intent intent, Function1<GiniBank.CreateCaptureFlowFragmentForIntentResult, Unit> callback)final CancellationTokenstartCaptureFlowForIntent(ActivityResultLauncher<CaptureImportInput> resultLauncher, Context context, Intent intent)Screen API for starting the capture flow when a pdf or image document was shared from another app. final UnitsetGiniApi(GiniBankAPI giniApi)Set the GiniBankAPI instance to be used for the Pay feature. final UnitreleaseGiniApi()Clears the reference to giniApi set by setGiniApi. final PaymentRequestgetPaymentRequest(String id)Get the payment details for the request created by a business. final ResolvedPaymentresolvePaymentRequest(String requestId, ResolvePaymentInput resolvePaymentInput)Marks the a PaymentRequest as paid. final UnitreturnToPaymentInitiatorApp(Context context, ResolvedPayment resolvedPayment)Starts the app that started the payment flow. final CancellationTokencreateDocumentForImportedFiles(Intent intent, Context context, Function1<GiniBank.CreateDocumentFromImportedFileResult, Unit> callback)Create a document based on a pdf or image(s) imported from another app. final UnitstartCaptureFlowForDocument(ActivityResultLauncher<CaptureImportInput> resultLauncher, Document document)Starts capture flow for a document. final CaptureFlowFragmentcreateCaptureFlowFragmentForDocument(Document document)Creates a CaptureFlowFragment with a document. final InvoicePreviewFragmentcreateInvoicePreviewFragment(String screenTitle, String giniApiDocumentId, List<String> infoTextLines)final InvoicePreviewFragmentArgscreateInvoicePreviewFragmentArgs(String screenTitle, String giniApiDocumentId, List<String> infoTextLines)final TransactionDocInvoicePreviewFragmentArgscreateTransactionDocInvoicePreviewFragmentArgs(String screenTitle, String giniApiDocumentId, List<String> infoTextLines)final UnitterminateSDK()Kills Bank sdk and stops Gini payment flow Use this with cautions final TransactionDocsgetTransactionDocs()final DigitalInvoiceOnboardingNavigationBarBottomAdaptergetDigitalInvoiceOnboardingNavigationBarBottomAdapter()final UnitsetDigitalInvoiceOnboardingNavigationBarBottomAdapter(DigitalInvoiceOnboardingNavigationBarBottomAdapter digitalInvoiceOnboardingNavigationBarBottomAdapter)final DigitalInvoiceHelpNavigationBarBottomAdaptergetDigitalInvoiceHelpNavigationBarBottomAdapter()final UnitsetDigitalInvoiceHelpNavigationBarBottomAdapter(DigitalInvoiceHelpNavigationBarBottomAdapter digitalInvoiceHelpNavigationBarBottomAdapter)final OnboardingIllustrationAdaptergetDigitalInvoiceOnboardingIllustrationAdapter()final UnitsetDigitalInvoiceOnboardingIllustrationAdapter(OnboardingIllustrationAdapter digitalInvoiceOnboardingIllustrationAdapter)final DigitalInvoiceNavigationBarBottomAdaptergetDigitalInvoiceNavigationBarBottomAdapter()final UnitsetDigitalInvoiceNavigationBarBottomAdapter(DigitalInvoiceNavigationBarBottomAdapter digitalInvoiceNavigationBarBottomAdapter)final SkontoNavigationBarBottomAdaptergetSkontoNavigationBarBottomAdapter()final UnitsetSkontoNavigationBarBottomAdapter(SkontoNavigationBarBottomAdapter skontoNavigationBarBottomAdapter)final DigitalInvoiceSkontoNavigationBarBottomAdaptergetDigitalInvoiceSkontoNavigationBarBottomAdapter()final UnitsetDigitalInvoiceSkontoNavigationBarBottomAdapter(DigitalInvoiceSkontoNavigationBarBottomAdapter digitalInvoiceSkontoNavigationBarBottomAdapter)final SkontoHelpNavigationBarBottomAdaptergetSkontoHelpNavigationBarBottomAdapter()final UnitsetSkontoHelpNavigationBarBottomAdapter(SkontoHelpNavigationBarBottomAdapter skontoHelpNavigationBarBottomAdapter)final BooleangetEnableReturnReasons()Shows the return reasons dialog in the return assistant, if enabled. final UnitsetEnableReturnReasons(Boolean enableReturnReasons)Shows the return reasons dialog in the return assistant, if enabled. -
-
Method Detail
-
setCaptureConfiguration
@Deprecated(message = Please use setCaptureConfiguration(context, captureConfiguration) which allows instance recreation without having to call releaseCapture(), replaceWith = @ReplaceWith(imports = {}, expression = setCaptureConfiguration(context, captureConfiguration))) final Unit setCaptureConfiguration(CaptureConfiguration captureConfiguration)
Sets configuration for Capture feature. Note that configuration is immutable. cleanupCapture needs to be called before passing a new configuration.
-
setCaptureConfiguration
final Unit setCaptureConfiguration(Context context, CaptureConfiguration captureConfiguration)
Sets configuration for Capture feature.
-
sendTransferSummary
final Unit sendTransferSummary(String paymentRecipient, String paymentReference, String paymentPurpose, String iban, String bic, Amount amount, Boolean instantPayment)
Provides transfer summary to Gini.
Please provide the required transfer summary to improve the future extraction accuracy.
Follow the recommendations below:
Make sure to call this method before calling cleanupCapture if the user has completed TAN verification.
Provide values for all necessary fields, including those that were not extracted.
Provide the final data approved by the user (and not the initially extracted only).
Send the transfer summary after TAN verification and provide the extraction values the user has used.
- Parameters:
paymentRecipient- payment receiverpaymentReference- ID based on Client ID (Kundennummer) and invoice ID (Rechnungsnummer)paymentPurpose- statement what this payment is foriban- international bank accountbic- bank identification codeamount- accepts extracted amount and currencyinstantPayment- based on the user's preference to have the payment as instant payment
-
releaseCapture
@Deprecated(message = Please use sendTransferSummary() to provide the required transfer summary first (if the user has completed TAN verification) and then releaseCapture() to let the SDK free up used resources., replaceWith = @ReplaceWith(imports = {}, expression = releaseCapture(context))) final Unit releaseCapture(Context context, String paymentRecipient, String paymentReference, String paymentPurpose, String iban, String bic, Amount amount)
Frees up resources used by the capture flow.
Please provide the required transfer summary to improve the future extraction accuracy. Follow the recommendations below:
Provide values for all necessary fields, including those that were not extracted.</li>
Provide the final data approved by the user (and not the initially extracted only).</li>
Do cleanup after TAN verification.to clean up and provide the extraction values the user has used.</li>
- Parameters:
context- Android contextpaymentRecipient- payment receiverpaymentReference- ID based on Client ID (Kundennummer) and invoice ID (Rechnungsnummer)paymentPurpose- statement what this payment is foriban- international bank accountbic- bank identification codeamount- accepts extracted amount and currency
-
releaseCapture
@Deprecated(message = Please use cleanupCapture(context). This method will be removed in a future release., replaceWith = @ReplaceWith(imports = {}, expression = cleanupCapture(context))) final Unit releaseCapture(Context context)
Frees up resources used by the capture flow.
- Parameters:
context- Android context
-
cleanupCapture
final Unit cleanupCapture(Context context)
Frees up resources used by the capture flow.
- Parameters:
context- Android context
-
checkCaptureRequirements
@Deprecated(message = Checking the requirements is no longer necessary and this method will be removed in a future release.) final RequirementsReport checkCaptureRequirements(Context context)
Checks hardware requirements for Capture feature. Requirements are not enforced, but are recommended to be checked before using.
-
startCaptureFlow
final Unit startCaptureFlow(ActivityResultLauncher<Unit> resultLauncher)
Screen API for starting the capture flow.
-
createCaptureFlowFragment
final CaptureFlowFragment createCaptureFlowFragment()
-
createCaptureFlowFragmentForIntent
final CancellationToken createCaptureFlowFragmentForIntent(Context context, Intent intent, Function1<GiniBank.CreateCaptureFlowFragmentForIntentResult, Unit> callback)
-
startCaptureFlowForIntent
final CancellationToken startCaptureFlowForIntent(ActivityResultLauncher<CaptureImportInput> resultLauncher, Context context, Intent intent)
Screen API for starting the capture flow when a pdf or image document was shared from another app.
-
setGiniApi
final Unit setGiniApi(GiniBankAPI giniApi)
Set the GiniBankAPI instance to be used for the Pay feature.
-
releaseGiniApi
final Unit releaseGiniApi()
Clears the reference to giniApi set by setGiniApi.
-
getPaymentRequest
final PaymentRequest getPaymentRequest(String id)
Get the payment details for the request created by a business. The id is sent in an Intent. Use getRequestId for extracting the id from the Intent.
- Parameters:
id- The id sent by the business.
-
resolvePaymentRequest
final ResolvedPayment resolvePaymentRequest(String requestId, ResolvePaymentInput resolvePaymentInput)
Marks the a PaymentRequest as paid.
Important: The amount string in the ResolvePaymentInput must be convertible to a Double. For ex. "12.39" is valid, but "12.39 €" or "12,39" are not valid.
- Parameters:
requestId- id of PaymentRequest to be resolved.resolvePaymentInput- the details used for the actual payment.
-
returnToPaymentInitiatorApp
final Unit returnToPaymentInitiatorApp(Context context, ResolvedPayment resolvedPayment)
Starts the app that started the payment flow.
- Parameters:
context- used to call startActivity.resolvedPayment- the object returned by resolvePaymentRequest
-
createDocumentForImportedFiles
final CancellationToken createDocumentForImportedFiles(Intent intent, Context context, Function1<GiniBank.CreateDocumentFromImportedFileResult, Unit> callback)
Create a document based on a pdf or image(s) imported from another app.
- Parameters:
intent-intent from which to get files
context-Android context
callback-returns the wrapped result of the file processing in the form of CreateDocumentFromImportedFileResult
-
startCaptureFlowForDocument
final Unit startCaptureFlowForDocument(ActivityResultLauncher<CaptureImportInput> resultLauncher, Document document)
Starts capture flow for a document. This method should be used with documents created by GiniBank.createDocumentForImportedFiles when a pdf or image was shared from another app.
- Parameters:
document- The document to be forwarded by the result launcher.
-
createCaptureFlowFragmentForDocument
final CaptureFlowFragment createCaptureFlowFragmentForDocument(Document document)
Creates a CaptureFlowFragment with a document. This method should be used with documents created by GiniBank.createDocumentForImportedFiles when a pdf or image was shared from another app.
- Parameters:
document- The document with which the fragment will be created.
-
createInvoicePreviewFragment
final InvoicePreviewFragment createInvoicePreviewFragment(String screenTitle, String giniApiDocumentId, List<String> infoTextLines)
-
createInvoicePreviewFragmentArgs
final InvoicePreviewFragmentArgs createInvoicePreviewFragmentArgs(String screenTitle, String giniApiDocumentId, List<String> infoTextLines)
-
createTransactionDocInvoicePreviewFragmentArgs
final TransactionDocInvoicePreviewFragmentArgs createTransactionDocInvoicePreviewFragmentArgs(String screenTitle, String giniApiDocumentId, List<String> infoTextLines)
-
terminateSDK
final Unit terminateSDK()
Kills Bank sdk and stops Gini payment flow Use this with cautions
-
getTransactionDocs
final TransactionDocs getTransactionDocs()
-
getDigitalInvoiceOnboardingNavigationBarBottomAdapter
final DigitalInvoiceOnboardingNavigationBarBottomAdapter getDigitalInvoiceOnboardingNavigationBarBottomAdapter()
-
setDigitalInvoiceOnboardingNavigationBarBottomAdapter
final Unit setDigitalInvoiceOnboardingNavigationBarBottomAdapter(DigitalInvoiceOnboardingNavigationBarBottomAdapter digitalInvoiceOnboardingNavigationBarBottomAdapter)
-
getDigitalInvoiceHelpNavigationBarBottomAdapter
final DigitalInvoiceHelpNavigationBarBottomAdapter getDigitalInvoiceHelpNavigationBarBottomAdapter()
-
setDigitalInvoiceHelpNavigationBarBottomAdapter
final Unit setDigitalInvoiceHelpNavigationBarBottomAdapter(DigitalInvoiceHelpNavigationBarBottomAdapter digitalInvoiceHelpNavigationBarBottomAdapter)
-
getDigitalInvoiceOnboardingIllustrationAdapter
final OnboardingIllustrationAdapter getDigitalInvoiceOnboardingIllustrationAdapter()
-
setDigitalInvoiceOnboardingIllustrationAdapter
final Unit setDigitalInvoiceOnboardingIllustrationAdapter(OnboardingIllustrationAdapter digitalInvoiceOnboardingIllustrationAdapter)
-
getDigitalInvoiceNavigationBarBottomAdapter
final DigitalInvoiceNavigationBarBottomAdapter getDigitalInvoiceNavigationBarBottomAdapter()
-
setDigitalInvoiceNavigationBarBottomAdapter
final Unit setDigitalInvoiceNavigationBarBottomAdapter(DigitalInvoiceNavigationBarBottomAdapter digitalInvoiceNavigationBarBottomAdapter)
-
getSkontoNavigationBarBottomAdapter
final SkontoNavigationBarBottomAdapter getSkontoNavigationBarBottomAdapter()
-
setSkontoNavigationBarBottomAdapter
final Unit setSkontoNavigationBarBottomAdapter(SkontoNavigationBarBottomAdapter skontoNavigationBarBottomAdapter)
-
getDigitalInvoiceSkontoNavigationBarBottomAdapter
final DigitalInvoiceSkontoNavigationBarBottomAdapter getDigitalInvoiceSkontoNavigationBarBottomAdapter()
-
setDigitalInvoiceSkontoNavigationBarBottomAdapter
final Unit setDigitalInvoiceSkontoNavigationBarBottomAdapter(DigitalInvoiceSkontoNavigationBarBottomAdapter digitalInvoiceSkontoNavigationBarBottomAdapter)
-
getSkontoHelpNavigationBarBottomAdapter
final SkontoHelpNavigationBarBottomAdapter getSkontoHelpNavigationBarBottomAdapter()
-
setSkontoHelpNavigationBarBottomAdapter
final Unit setSkontoHelpNavigationBarBottomAdapter(SkontoHelpNavigationBarBottomAdapter skontoHelpNavigationBarBottomAdapter)
-
getEnableReturnReasons
final Boolean getEnableReturnReasons()
Shows the return reasons dialog in the return assistant, if enabled. Note that it is disabled by default.
-
setEnableReturnReasons
final Unit setEnableReturnReasons(Boolean enableReturnReasons)
Shows the return reasons dialog in the return assistant, if enabled. Note that it is disabled by default.
-
-
-
-