A POST request to /capture_sessions/ initiates a Session of the Forage Custom Payment Capture UI.
The response payload represents the Custom Payment Capture Session. The ref and redirect_url fields are the most important:
refrepresents theOrder- Store this
refso that you can pass it in a future request to Create anOrderPayment, or to check the status of theOrdervia aGETto/orders/{order_ref}/
- Store this
redirect_urlis the URL that launches the front-end, customer-facing Forage UI- Point customers to this URL to enter their PIN to complete checkout
If PIN entry is successful, then Forage points the customer to the success_redirect_url specified in the request body. Forage directs the customer to the cancel_redirect_url if they cancel the balance inquiry from the Forage UI.
To check the status of an Order after the customer completes the Forage UI, send a GET to /orders/{order_ref}/.
Use customer_id For Better PerformancePass
customer_idin the request to Create a Capture Session.Forage automatically adds the
customer_idto the Session's correspondingOrderandOrderPayments.
customer_idhelps Forage's servers more quickly identify and associate the correct customer with theSession. Whilecustomer_idis not technically a required parameter, if you omit it then the request to create the Session could take longer to process. It is strongly recommended to passcustomer_id.When the same
customer_idis provided for a returning customer, Forage will retrieve and reuse their stored payment method, if available. Alternatively, passing the sameebt_payment_methodcan also pre-fill the stored payment method in the checkout session.Each customer should only have one unique
customer_id. For example, if you create both a Capture Session and aPaymentMethodfor the same customer, then thecustomer_idshould be the same in both requests to ensure continuity of stored payment methods.
