This endpoint is not relevant to Forage versions
2024-03-05
and later.With
2024-03-05
, Forage createsOrderPayments
under the hood with every request to create a Custom Payment Capture Session. We strongly recommend upgrading to the latest Forage version if you haven't already.
To keep your app secure, requests to create an OrderPayment should only be generated on the server-side.
A POST
request to /orders/{order_ref}/payments/
tells Forage’s servers how much to charge an existing PaymentMethod
to create a payment associated with an existing Order
.
On success, the API responds with a Forage OrderPayment
object that represents the one-time charge. The PaymentMethod
is not charged until the Order
is captured, after a customer submits their PIN via the Forage Checkout UI to authorize the charge.
Pass
customer_id
in the request to Create anOrderPayment
customer_id
helps Forage's servers more quickly identify and associate the correct customer with theOrderPayment
. Whilecustomer_id
is not technically a required parameter, if you omit it then the request to create theOrderPayment
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 anOrderPayment
and aPaymentMethod
for the same customer, then thecustomer_id
should be the same in both requests.
Only create one
OrderPayment
perPaymentMethod
associated with anOrder
.The API returns a
400
if it identifies a duplicate charge. If you need to increase the amount charged to aPaymentMethod
already associated with anOrder
, then update the correspondingOrderPayment
instead of creating a new one.