Forage Terminal SDK
The entry point for in-store POS Terminal transactions.
A ForageTerminalSDK instance interacts with the Forage API.
You need to call ForageTerminalSDK.init
to initialize the SDK. Then you can perform operations like:
Collecting a card PIN for a payment and deferring the capture of the payment to the server
Collecting a customer's card PIN for a refund and defer the completion of the refund to the server
// Example: Initialize the Forage Terminal SDK
val forageTerminalSdk = ForageTerminalSDK.init(
context = androidContext,
posTerminalId = "<id-that-uniquely-identifies-the-pos-terminal>",
forageConfig = ForageConfig(
merchantId = "123ab45c67",
sessionToken = "sandbox_ey123..."
)
)
See also
Forage Android online-only SDK to process online-only transactions
Functions
Immediately captures a payment via a ForageVaultElement (either a ForagePINEditText or a ForagePinPad).
Checks the balance of a previously created PaymentMethod
via a ForageVaultElement (either a ForagePINEditText or a ForagePinPad).
Submits a card PIN via a via a ForageVaultElement (either a ForagePINEditText or a ForagePinPad) and defers payment capture to the server.
Collects a card PIN for an EBT payment via a ForageVaultElement (either a ForagePINEditText or a ForagePinPad) and defers the refund of the payment to the server.
Refunds a Payment via a ForageVaultElement (either a ForagePINEditText or a ForagePinPad). This method is only available for POS Terminal transactions. You must use ForageTerminalSDK.
Tokenizes a card via a magnetic swipe from a physical POS Terminal.
Tokenizes a card via manual entry into a ForagePANEdit Text Element.