Create a checkout session for your customer. A successful response will yield an Order object in the body. After creating the session, be sure to do the following,
Redirect your customer to the redirect_url so they can pay for their order.
Store the order's reference number, ref field in the response, for your records.
The total amount to be paid must be broken down into 3 amounts when you create the session,
snap_total - The amount which is SNAP-eligible (e.g. cost of produce in the basket).
ebt_cash_total - The amount which is eligible for EBT cash, but not SNAP-eligible (e.g. cost of paper products).
remaining_total - The amount which is not eligible for either benefit and must be paid with a form of payment other than an EBT card.
Note that these amounts are the maximum amount which can be paid using the corresponding payment method type. The actual payment choices made by your customer may vary from these maximums, so you should inspect the receipt field of the Order or the individual Payment objects associated with this order to see the actual breakdown of spending across payment types.
The total value of the basket + taxes = snap_total + ebt_cash_total + remaining_total.
Regarding taxes, be aware that grocery_tax_rate will only be applied to the SNAP-eligible total if the customer chooses to pay for SNAP-eligible items with an alternate payment method. Per FNS regulations, SNAP payments cannot be taxed, but SNAP-eligible items are subject to tax if paid for with a credit card or EBT Cash.
Calling code is responsible for applying taxes to all non-SNAP-eligible items, including the amounts in the ebt_cash_total. The basic rule for the merchant website is to apply taxes to the ebt_cash_total and the remaining_total, but NOT the snap_total. Forage's hosted payment solution will apply taxes on the snap_total if necessary, but not to the other total fields.
If any additional tax amounts are collected by Forage, they will be clearly identified in the transaction receipt in the sales_tax_applied field. Note that this amount is separate from any tax amounts you may have included in the ebt_cash_total and remaining_total fields and therefore it increases the total amount paid by the customer.
Create a Checkout session
You generated a token in the previous section. Make sure to include it in the header.
Click Try It! to start a request and see the response here!