HomeGuidesReference↗ Forage Dashboard
Log In
Guides

Reuse Payment Methods

Allow your customers to reuse their saved payment methods in Fully Hosted Checkout.

Fully Hosted Checkout allows customers to save and reuse their payment methods for faster checkout experiences. This feature supports both credit/debit cards (via Stripe) and EBT cards.

Reuse EBT payment methods

To enable customers to reuse their saved EBT cards, pass your internal customer identifier in the customer_id field when creating a checkout session. See how to create a Fully Hosted Checkout session.

How it works

  • Pass your application's unique customer identifier in the customer_id field of the request body.
  • Forage retrieves the EBT card associated with this customer.
  • The saved EBT card appears as a payment option in the checkout interface (if there is one).
  • When the customer adds a new EBT card, an option to securely save the card for future use is displayed.

Customer experience

  • When a customer_id attribute is passed, Forage Checkout displays an option to the customer to securely save the card for future use when adding an EBT card.
Diagram lists the Customer, Merchant, Ecommerce Platform, Forage, State Processor, and USDA FNS blocks. The Customer, Merchant, Ecommerce Platform and Forage are connected by lines. The line between Merchant and USDA FNS reads Maintains FNS Authorization; the line between Forage and USDA FNS reads Supports merchant through FNS processes, the line between USDA FNS and State Processor reads distributes EBT Benefits from FNS, and the line between Forage and State Processor reads Settles funds
  • If there is an existing EBT card associated with the customer_id, it is displayed in the Checkout app for a faster checkout.
Checkout summary showing a total of $30.00 with no sales tax. The order includes $10.00 in SNAP-eligible items and $20.00 in EBT Cash-eligible items. An EBT card ending in 4353 is selected, with a ‘Change’ option available. The SNAP balance is $100.00 and the EBT Cash balance is $100.00.

Reuse credit/debit payment methods (Stripe integration)

Forage integrates with Stripe to process credit/debit payments. To enable customers to reuse their saved credit or debit cards, pass the Stripe Customer ID in the psp_customer_id field when creating a checkout session. See how to create a Fully Hosted Checkout session.

How it works

Pass the Stripe Customer ID to subsequent Fully Hosted Checkout sessions

  • Pass the Stripe Customer object ID in the psp_customer_id field.
  • Stripe Customer IDs start with cus_ (for example: cus_KlxCHRXkaueTnw).
  • Forage uses Stripe's card listing API to retrieve saved payment methods. Forage retrieves only the most recent saved card for that customer in Stripe.
  • When customers add new cards during checkout, they can optionally save them for future use by checking the "Save this card securely for future use" checkbox.
⚠️

Stripe Customer Creation

If a psp_customer_id is not specified, Forage Checkout automatically creates a Stripe Customer when the customer saves the credit or debit card for future use.

Get the Stripe Customer ID generated by Forage (if needed)

  • After the order is paid, Forage Checkout redirects the user to the success_url specified when creating the Fully Hosted Checkout session.
  • Forage Checkout automatically attaches a query param forage_order_ref to the success_url to specify the forage order ref that was completed.
  • Using that forage_order_ref, query the Forage order details.
  • The psp_customer_id is specified in the response of the order.

Customer experience

  • When a psp_customer_id attribute is passed, Forage Checkout displays an option to the customer to securely save the card for future use when adding a credit or debit card.
Modal titled “Add Credit or Debit Card” showing a card information form with a card number field and expiration date, a checkbox labeled “Save this card securely for future use,” an “Add Card” button, and a close button in the top-right corner.
  • If there is an existing credit or debit card associated with the psp_customer_id, it is displayed in the Checkout app for a faster checkout.
Checkout payment section showing a saved Visa card ending in 4242 with a “Change” option. A message below indicates that the remaining $493.52 of the total will be charged to this card.