HomeGuidesReference
Log In
Reference

Capture payments for an existing Order.

This endpoint is only relevant to Fully Hosted and Custom integrations.

If you’re building with a Forage SDK, then use the Payments endpoints.

Learn more about the high-level phases of an SDK integration in the Forage JS Quickstart, or check out the Payments API introduction for a list of resources by integration type.

This request will attempt to process all payments associated with the referenced Order.

The Order will first be checked for a consistent state, i.e. all associated payments must add up to the order total and the amounts charged to an EBT payment method cannot exceed the SNAP eligible total. If these checks fail, you will receive a 400 response and no payment methods will be charged.

Payments are always processed in a consistent order. Payments to an EBT Card are processed first. If there are any errors encountered when processing a EBT payment, then the Forage backend will not attempt to process any further payment methods.

Once EBT payments have been processed successfully, the Forage backend will attempt to process the charges to non-EBT cards.

Once all payments are processed successfully,

  • The status of the Order will be updated to succeeded
  • A POST request will be made to your client indicating whether the Order succeeded or failed.

Note that 2 PIN entries must be posted in the request body if there are payments on both the EBT SNAP and EBT Cash accounts. The server will only look at the PIN data if it is needed to process any associated payments. Pass an emptry string if the PIN data is not needed.

Path Params
string
required

The Order's unique reference hash

Body Params

An EBT cardholder's PIN data

string

The EBT SNAP PIN that was entered by the customer

string

The EBT Cash PIN that was entered by the customer

string

The token field of the TokenizedPaymentMethod.card object. This token is an input to Forage's secure PIN encryption.

Headers
string
required

A unique merchant ID that Forage provides during onboarding, as in 123ab45c67. The Merchant ID can be found in the Forage sandbox or production dashboard.

string
required

An alphanumeric key that clients can use to identify repeated requests that are dropped in transit. Generate a distinct key for every unique request and only re-use keys for retries.

string

The Forage version, represented as a string with the format of a YYYY-MM-DD date.

If not specified in the request header, then the version defaults to the value set in the Forage dashboard.

Responses

500

Server Errors Something went wrong on Forage's servers. Try again.

Language
Credentials
OAuth2
URL
Choose an example:
application/json