iOS

Add EBT payments to your iOS app

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

Two iPhone screens, one that prompts for an EBT PIN to process a payment, another that prompts for it to check a balance

Features

  • 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

Requirements

Before you can use the Forage iOS SDK, confirm that you’ve met all prerequisites for working with Forage, and that your app is built on the following:

  • iOS 10+
  • Swift 5

Forage iOS SDK on GitHub

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

Starter code

After setting up your development environment and importing and initializing the SDK, include either or both of the UI components in your application’s views.

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

private let panNumberTextField: ForagePANTextField = {
    let tf = ForagePANTextField()
    tf.placeholder = 'PAN Number'
    return tf
}()

Then, call the relevant method. The below snippet calls the method to tokenize an EBT PAN:

ForageSDK.shared.tokenizeEBTCard(
    bearerToken: bearerToken,
    merchantAccount: merchantID { result in
        // handle callback here
    }

Next steps

  • Check out the forage-ios-sdk GitHub repository for full installation instructions and a demo app