Skip to main content
When a customer completes a checkout, you can include the setup_future_use parameter and Flex will save the customer’s payment method for later usage. Later, you can use the Off-Session API to charge the customer using that saved payment method. The customer doesn’t need to be present in the flow or re-enter their payment details.

Initial (on-session) checkout session

This follows the normal checkout flow, with one difference. When you create the checkout session, include the setup_future_use parameter with a value of off_session.

Verify the customer’s payment method

To find your customer’s available payment methods, you can use List Payment Methods API. You should see the payment method with a value of off_session: true. This means that the payment method was successfully saved for future use.

Off-session checkout

Now that the customer has a saved payment method, you can use the off-session checkout API to submit charges. The request payload should look similar to a normal checkout, with a few differences.
  • Set the parameter mode to off_session
  • Set the parameter customer to the customer_id
  • Set the parameter payment_method to be the ID of the saved off-session payment method

Restrictions

Off-session checkouts have some additional restrictions compared to standard checkouts:
  • Letter of Medical Necessity - If any of the items requires a Letter of Medical Necessity, the customer must already have one on file with Flex
  • No Split Cart - All the items in the cart must be HSA/FSA eligible to pay with an HSA/FSA card