v1
latestOpenAPI 3.0.02026-07-244352379.2 KBCapture an EBT or HSA/FSA Payment
📘 Forage SDK Integrations And HSA/FSA Only
This endpoint is only relevant to Forage SDK integrations and HSA/FSA payments.
Instead of calling a front-end SDK method to capture a payment, you can use this endpoint to capture a payment from the backend.
A POST request to /payments/{payment_ref}/capture_payment/ captures an existing Forage Payment.
On success, Forage automatically begins processing the charge to the customer, so this endpoint has immediate financial side effects.
The API responds with a Payment object that represents the transaction. For EBT payments the response also includes complete receipt information.
For HSA/FSA payments, the capture_amount must be less than or equal to the original amount field in the Payment object.
⚠️ Incompatible Fields for EBT Transactions
Avoid using capture_amount, qualified_healthcare_total, qualified_healthcare_subtotal, and product_list. Including these fields in EBT transactions may cause unexpected behavior.
Once an HSA/FSA payment is captured, the amount field in the Payment object is updated to match the capture_amount. The originally authorized amount moves to the authorization_amount field, which is used only for debugging and bookkeeping.
⚠️ Capture Requests Must Be Server-Side
To keep your app secure, requests to capture a payment should only be generated from the server-side.
Request body
Example request
{
"capture_amount": 11.98,
"qualified_healthcare_total": 11.98,
"qualified_healthcare_subtotal": 11.98,
"product_list": [
{
"name": "Sample Healthcare Product",
"upc": "04126001300",
"gtin": "00041260013003",
"unit_price": 5.99,
"quantity": 2
}
]
}Response
OK - Success
Example response
{
"amount": 25.99,
"funding_type": "ebt_snap",
"payment_method": "ac47392bb1",
"delivery_address": {
"city": "San Francisco",
"country": "US",
"line1": "1856 Market St.",
"zipcode": "94106",
"state": "CA"
},
"is_delivery": true,
"description": "An EBT Payment",
"metadata": {},
"platform_fee": 0.05,
"platform_fixed_settlement": 5.11,
"merchant_fixed_settlement": 5.95,
"customer_id": "cus_1234567890",
"external_order_id": "1f2ee410-5b47-4130-aec2-40f5eb2108f5",
"merchant_destination_account": "1bdefaa456",
"pos_terminal": {
"provider_terminal_id": "tbd123"
},
"external_location_id": "6e3b2ff7-51c8-4c64-befa-2eac90f7c3e9",
"ref": "cc3175bfea",
"merchant": "9000055",
"status": "requires_confirmation",
"created": "2021-06-16T00:11:50.000000Z-07:00",
"updated": "2021-06-16T00:11:50.000000Z-07:00",
"expires_at": "2021-06-16T00:41:50.000000Z-07:00",
"success_date": "2021-06-16T00:11:50.000000Z-07:00",
"refunds": [
"ac47392bb1"
],
"receipt": {
"ref_number": "cc3175bfea",
"is_voided": true,
"snap_amount": "25.99",
"ebt_cash_amount": "10.99",
"other_amount": "5.99",
"sales_tax_applied": "5.16",
"balance": {
"snap": "72.94",
"non_snap": "32.16",
"updated": "2021-06-16T00:11:50.000000Z-07:00"
},
"last_4": "3456",
"message": "Approved",
"transaction_type": "Payment",
"created": "2021-06-16T00:11:50.000000Z-07:00"
},
"last_processing_error": null,
"previous_errors": []
}