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:
ref
represents theOrder
- Store this
ref
so that you can pass it in a future request to Create anOrder
Payment, or to check the status of theOrder
via aGET
to/orders/{order_ref}/
- Store this
redirect_url
is 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}/
.
Pass
customer_id
in the request to Create a Capture SessionForage automatically adds the
customer_id
to the Session's correspondingOrder
andOrderPayments
.
customer_id
helps Forage's servers more quickly identify and associate the correct customer with theSession
. Whilecustomer_id
is 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
.Each customer should only have one unique
customer_id
. For example, if you create both a Capture Session and aPaymentMethod
for the same customer, then thecustomer_id
should be the same in both requests.