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, andproduct_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.
