GiniPayBank

public class GiniPayBank

Api 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.

  • the Component API by building everything around the provided fragments. See example apps for more details about usage of Screen and Component APIs.

To use capture features, they need to be configured with setCaptureConfiguration. Note that configuration is immutable. releaseCapture needs to be called before passing a new configuration.

To use the pay feature, first setGiniApi needs to be called. The flow for this feature would be:

Functions

checkCaptureRequirements
Link copied to clipboard
final RequirementsReport checkCaptureRequirements(Context context)
Checks hardware requirements for Capture feature.
createDocumentForImportedFiles
Link copied to clipboard
final Unit createDocumentForImportedFiles(Intent intent, Context context, AsyncCallback<Document, ImportedFileValidationException> callback)
Component APICreates an Document for a pdf or image that was shared from another app.
getPaymentRequest
Link copied to clipboard
final PaymentRequest getPaymentRequest(String id)
Get the payment details for the request created by a business.
releaseCapture
Link copied to clipboard
final Unit releaseCapture(Context context)
Frees up resources used by Capture.
releaseGiniApi
Link copied to clipboard
final Unit releaseGiniApi()
Clears the reference to giniApi set by setGiniApi.
resolvePaymentRequest
Link copied to clipboard
final ResolvedPayment resolvePaymentRequest(String requestId, ResolvePaymentInput resolvePaymentInput)
Marks the a PaymentRequest as paid.
returnToBusiness
Link copied to clipboard
final Unit returnToBusiness(Context context, ResolvedPayment resolvedPayment)
Starts the Business app that started the payment flow.
setCaptureConfiguration
Link copied to clipboard
final Unit setCaptureConfiguration(CaptureConfiguration captureConfiguration)
Sets configuration for Capture feature.
setGiniApi
Link copied to clipboard
final Unit setGiniApi(Gini giniApi)
Set the Gini instance to be used for the Pay feature.
startCaptureFlow
Link copied to clipboard
final Unit startCaptureFlow(ActivityResultLauncher<Unit> resultLauncher)
Screen API for starting the capture flow.
startCaptureFlowForIntent
Link copied to clipboard
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.

Properties

INSTANCE
Link copied to clipboard
public final static GiniPayBank INSTANCE