Accept EBT payments in your Android mobile app

You can use the Forage Android SDK to process EBT payments in your Android app.

Two Android phone screens, one prompting for an EBT pin to process payment, the other prompting EBT PIN for balance inquiry


  • Native UI component for collecting and tokenizing a customer’s EBT Card number (also called the card PAN)
  • Native UI component for collecting a customer’s EBT PIN
  • Built-in EBT Card number validation
  • Control over the styling of a native EBT checkout experience
  • API methods that collect and tokenize an EBT Card number, perform a balance check, and capture a payment


Before you can use the Forage Android SDK, make sure that:

Forage Android SDK on GitHub

For complete installation instructions and more comprehensive code examples, refer to the GitHub repository.

Starter code

After installing the library, include either or both of the UI components in your application’s views.

For example, the following snippet adds the EBT Card number element ForagePanEditText:

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=""

        android:layout_height="wrap_content" />


Then, reference the element in response to a user action. The example below tokenizes the EBT Card number and could be included within an onSubmit function:

val response = ForageSDK.tokenizeEBTCard(
  merchantAccount = merchantAccount,
  bearerToken = bearer,
  // NOTE: The following line is for testing purposes only and should not be used in production.
  // Please replace this line with a real hashed customer ID value.
  customerId = UUID.randomUUID().toString(),
  reusable = true
when (response) {
  is ForageApiResponse.Success -> {
    val adapter: JsonAdapter<PaymentMethod> = moshi.adapter(
    val result = adapter.fromJson(
    _paymentMethod.value = result
   	is ForageApiResponse.Failure -> {
 	 	_error.value = response.message

Next steps