Skip to main content
The Enterprise integration gives you full control over the EBT payment experience. Instead of redirecting customers to Benny’s hosted checkout, you embed Benny’s mobile SDK components directly into your Android or iOS app and orchestrate the payment lifecycle from your own server.

Architecture

Session tokens

A session token authenticates your mobile SDK components against the Benny API. Your server creates one by calling POST /v1/session with a secret API key, then passes the token to the mobile app. Tokens expire after one hour.
import Benny from "@bennyapi/sdk";

const client = new Benny({
  apiKey: process.env.BENNY_API_KEY,
  environment: "sandbox",
});

const session = await client.sessions.createToken({
  externalUserId: "user_12345",
});

// Pass session.token to your mobile app
console.log(session.token);

Payment lifecycle

The enterprise payment flow has four stages:
1

Tokenize the EBT card

The user enters their card number in the mobile SDK’s CardNumberInput component. The SDK tokenizes the card securely and returns a tokenId to your app. Card data never touches your servers.See the Payment Methods guide for details.
2

Create a payment method

Your server sends the tokenId and an externalUserId to the create payment method endpoint. Benny returns a paymentMethodId that you store for future payments.See the Payment Methods guide for details.
3

Create a payment intent and collect PIN

Your server creates a payment intent with the amount, tender type, and fulfillment details. The mobile SDK collects the user’s PIN via the PinInput component and submits it along with the paymentIntentId to authorize the payment.See the Payment Intents guide for details.
4

Handle refunds and reversals

After a payment completes, your server can issue refunds (credited to the customer’s EBT account) or reversals (voids that don’t appear on the customer’s account).See the Refunds and Reversals guide for details.

Next steps