You can use the Forage API to retrieve data about your EBT SNAP business.
With the /reporting/
endpoints, you can:
- Retrieve an Order report: GET
/reporting/orders/
- Retrieve a Payout Summary report: GET
/reporting/payouts/
- Retrieve a Payout Transaction report: GET
/reporting/payouts/{payout_id}/transactions/
- Retrieve a Transaction report: GET
/reporting/transactions/
The API responds to every /reporting/
request with a list of paginated results.
Query params
The following query params tell Forage what results to collect for a report:
start_date
| date
start_date
| dateThe date that the reporting period starts, represented as an ISO 8601 date string, inclusive. The result set includes all reported items that occurred on the date.
The Forage server uses Pacific time, so, for example, a transaction that occurred at 2 AM EST on 2021-01-31
is included in the results for 2021-01-30
.
end_date
| date
end_date
| dateThe date that the reporting period ends, represented as an ISO 8601 date string, inclusive. The result set includes all reported items that occurred on the date.
The Forage server uses Pacific time, so, for example, a transaction that occurred at 2 AM on 2021-01-31
is included in the results for 2021-01-30
.
limit
| integer
limit
| integerThe maximum number of objects to include in the results
array. Not to exceed 1000
. If the limit exceeds 1000
, then Forage returns a 400
error response.
Defaults to 100
.
cursor
| string
cursor
| stringThe starting point for the results
, as returned in a previous /reporting/
request. Find a cursor in the URL returned in the next
and/or previous
response values.
Consult each endpoint's individual reference page for exact query params.
Not all endpoints accept a
start_date
andend_date
, for example.
Report
object
Report
objectExample Order Report
Report
{
"next": "https://api.sandbox.joinforage.app/reporting/orders/?cursor=cD0yMDIzLTAxLTMxKzIxJTNBMzElM0ExNC40NTUxNjMlMkIwMCUzQTAw&end_date=2021-02-28&start_date=2021-01-31",
"previous": null,
"results": [
{
"ref": "b085e45a54",
"status": "draft",
"snap_eligible_total": 25.99,
"ebt_cash_eligible_total": 21.23,
"remaining_total": 44.39,
"sales_tax_applied": 5.12,
"snap_paid": 86.29,
"ebt_cash_paid": 15.22,
"credit_debit_paid": 67.9,
"merchant_fns_number": "1234567",
"created": "2021-06-15T00:11:50.000000Z-07:00",
"success_date": "2021-06-16T00:11:50.000000Z-07:00",
"payments": [
"cd62e45f33",
"a2f4e45665"
],
"refunds": [
"aaabe45432",
"7e84e45db7"
],
"psp_customer_id": "string",
"external_order_id": "1f2ee410-5b47-4130-aec2-40f5eb2108f5"
}
]
}
No matter the type of report, on success all /reporting/
endpoints respond with the following fields:
Property | Type | Description |
---|---|---|
next | string | A URL that you can send a GET to in order to retrieve the next set of results. Alternatively, you can retrieve the cursor value from the URL and pass it in the body of a new request.This value is null if there are no more results. |
previous | string | A URL that you can send a GET to in order to retrieve the previous set of results. Alternatively, you can retrieve the cursor value from the URL and pass it in the body of a new request.The value is null if the response includes the first set of results. |
results | array | An array of objects that varies depending on the type of report requested. Refer to Report types for report-level details. |
Report types
Order Reports
/reporting/orders/
Order reports are only relevant to Fully Hosted and Custom integrations.
Only Fully Hosted and Custom integrations generate Forage
Order
objects. Use any of the other report types if you’re building with an SDK.
An order report includes a list of Forage Orders
created during the provided reporting period.
If the status
of an Order
is not succeeded
or failed
, then some of the object response fields return null
, as indicated in the table below.
The results
field of the response to requests to /reporting/orders/
returns an array of objects. Each object contains the following fields:
Property | Type | Description |
---|---|---|
ref | string | A unique reference hash for the Forage Order object. |
status | string | The status of the order in the Forage lifecycle. One of: - canceled - draft - failed - processing - succeeded |
snap_eligible_total | number | The SNAP-only eligible portion of the order cost in USD. |
ebt_cash_eligible_total | number | The EBT Cash-only eligible portion of the order cost in USD. |
remaining_total | number | The portion of the order total in USD that is not SNAP or EBT Cash eligible. This amount must be charged to a credit or debit card. |
sales_tax_applied **The value of this field is null if the status is not succeeded or failed | number | The amount of sales tax that Forage added to the order total, calculated after the customer distributed tender across payment methods. This value is always 0 for Custom integrations. Forage only calculates taxes for Fully Hosted integrations.If the value is nonzero, then some of the ebt_cash_paid or credit_debit_paid covered taxes. Per FNS regulations, snap_paid is tax-exempt. The sum of (snap_paid , ebt_cash_paid , credit_debit_paid ) should always equal the sum of (sales_tax_applied , snap_eligible_total , remaining_total ). |
snap_paid **The value of this field is null if the status is not succeeded or failed | number | The portion of the order cost in USD that the customer paid for with SNAP benefits. |
ebt_cash_paid **The value of this field is null if the status is not succeeded or failed | number | The portion of the order cost in USD that the customer paid for with EBT Cash benefits. |
credit_debit_paid **The value of this field is null if the status is not succeeded or failed | number | The portion of the order cost in USD that the customer paid for with credit/debit card. |
merchant_fns_number | string | The FNS number of the merchant that created this order. |
success_date | ISO 8601 date-time string | A UTC-8 timestamp of when all OrderPayments associated with the Order are successfully processed, represented as an ISO 8601 date-time string. |
created | ISO 8601 date-time string | A UTC-8 timestamp of when the Order was created, represented as an ISO 8601 date-time string. |
payments | array of strings | An array of the unique reference hashes for any Forage OrderPayments associated with this Order . |
refunds | array of strings | An array of the unique reference hashes for any Forage OrderRefunds associated with the Order . |
psp_customer_id | string | The third-party credit/debit payment processor’s unique identifier for the customer. The value of this field is null if the Order was created via a POST to /capture_sessions/ . |
external_order_id | string | A unique identifier for the order as created by the merchant or platform (not Forage). When a merchant or platform passes this order ID to Forage, it persists in each Forage transaction related to the Order . This field enables merchants to map order IDs in their system to corresponding Forage Order IDs. |
external_location_id | string | A unique identifier, provided by the merchant or platform (not Forage), that indicates the physical fulfillment location for the order. For example, this field could specify which location of a grocery store chain fulfilled an order. |
Example request
How to filter for successful orders
If you add the
status
query param and passsucceeded
as the value, then thestart_date
andend_date
params refer to the order’ssuccess_date
, rather than itscreated
value. Thestatus
filter has no effect if any other value is applied or if excluded from the request. Check out the/reporting/orders/
reference docs for details.
curl --request GET \
--url 'https://api.sandbox.joinforage.app/reporting/orders/?start_date=2021-01-31&end_date=2021-02-28&limit=1&status=succeeded' \
--header 'Authorization: Bearer <authentication_token>' \
--header 'Merchant-Account: <merchant_account>' \
--header 'accept: application/json'
Payout Summary Reports
/reporting/payouts/
A payout is a scheduled funds disbursement from Forage to a merchant. A payout accounts for all transactions, both purchases and refunds, during the scheduled time period.
A Payout Report includes a list of payouts that occurred during the provided time period.
The results
field of the response to requests to /reporting/payouts/
returns an array of objects with the following fields:
Property | Type | Description |
---|---|---|
payout_id | string | A unique identifier for the payout that this transaction is associated with. |
merchant_id | string | A unique identifier for a merchant, provided by Forage. |
fns_id | string | The FNS number of the merchant. |
payout_issued_date | ISO 8601 date-time string | A timestamp of when the payout was created. |
expected_deposit_date | ISO 8601 date-time string | A timestamp of when Forage expects the payout to be deposited. This is typically the payout_issued_date plus one business day, if the ACH method is next-day. |
total_purchases | number | The total amount in USD of all of the purchases included in this payout. |
total_refunds | number | The total amount in USD of all of the refunds included in this payout. |
total_chargebacks | number | The total amount in USD of refunds paid to customers as the result of dispute resolutions during this payout period. The total_chargebacks value is distinct and not included in the total_refunds value. |
forage_fee | number | The sum of Forage fees in USD for all transactions included in this payout. |
total_positive_adjustments | number | If any, the total arbitrary amount in USD that has been added to the settlement. For example, this could happen in the rare case that Forage corrects a previous settlement. |
total_negative_adjustments | number | If any, the total arbitrary amount in USD that has been deducted from the settlement. For example, this could happen in the rare case that Forage corrects a previous settlement. |
merchant_net_settlement | number | The net amount sent to the merchant, equal to the sum of purchases minus refunds, chargebacks, fees, and any other deductions. This value is blank if the settlement reflects a platform instead of a merchant payout. |
platform_net_settlement | number | The net amount sent to the platform, if applicable, equal to the sum of purchases minus refunds, chargebacks, fees, and any other deductions. This value is blank if the settlement reflects a merchant payout and no platform was involved. |
merchant_destination_account_ref | string | A unique reference hash for the bank account that received funds settlement for this payment. The value of this field is returned as null if the argument was not passed in the request to create the Payment . |
Example request
curl --request GET \
--url 'https://api.sandbox.joinforage.app/reporting/payouts/?start_date=2021-01-31&end_date=2021-02-28&limit=1' \
--header 'Authorization: Bearer <authentication_token>' \
--header 'Merchant-Account: <merchant_account>' \
--header 'accept: application/json'
Payout Transaction Reports
/reporting/payouts/{payout_id}/transactions/
A Payout Transaction Report includes a list of all transactions associated with the provided payout_id
.
Forage defines a transaction as any financial operation that triggers a flow of funds, including both EBT purchases and EBT refunds. Credit and debit card transactions are included in the report if the transaction occurred via a Fully Hosted integration, but Forage is never involved in the settlement flow for credit/debit. That falls to the credit/debit PSP, so balance your credit/debit accounting against the PSP’s ledger.
The results field of the response to requests to /reporting/payouts/{payout_id}/transactions/
returns an array of objects with the following fields:
Property | Type | Description |
---|---|---|
merchant_id | string | The unique identifier of the merchant associated with this transaction, provided by Forage. |
fns_id | string | The FNS number of the merchant that received the payout including this transaction. |
recorded_date | ISO 8601 date-time string | The date and time when the transaction successfully processed, formatted as an ISO 8601 date-time string in the UTC timezone. |
payout_issued_date | ISO 8601 date-time string | The timestamp of when the payout was created. (Value only populated for Payout Transaction Reports) |
expected_deposit_date | ISO 8601 date-time string | The timestamp of when Forage expects the payout to be deposited. This is typically the payout_issued_date plus one business day, if the ACH method is next-day. (Value only populated for Payout Transaction Reports) |
transaction_type | string | The type of the transaction. One of: - Credit_Debit_Chargeback - Credit_Debit_Purchase - Credit_Debit_Refund - Credit_Debit_Void_Purchase - Credit_Debit_Void_Refund - EBT_Cash_Chargeback - EBT_Cash_Purchase - EBT_Cash_Refund - EBT_Cash_Void_Purchase - EBT_Cash_Void_Refund - SNAP_Chargeback - SNAP_Purchase - SNAP_Refund - SNAP_Void_Purchase - SNAP_Void_Refund The Credit_Debit_ transaction type is only returned if a transaction occurred via a Fully Hosted integration. |
transaction_amount | number | The total amount in USD charged, voided, or refunded to the customer. |
forage_fee | number | The amount of Forage fees applied to the transaction. |
merchant_net_settlement | number | The net amount sent to the merchant, equal to the sum of purchases minus refunds, chargebacks, fees, and any other deductions. This value is blank if the settlement reflects a platform instead of a merchant payout. |
platform_net_settlement | number | The net amount sent to the platform, if applicable, equal to the sum of purchases minus refunds, chargebacks, fees, and any other deductions. This value is blank if the settlement reflects a merchant payout and no platform was involved. |
order_id | string | For Fully Hosted and Custom integrations, the unique identifier of the order associated with the transaction. This value is blank for SDK integrations. |
external_order_id | string | The unique identifier of the order as created by the merchant or platform (not Forage). This typically corresponds to an identifier in the merchant or platform's database, so it can be used as a reference to look up the transaction. |
payment_id | string | The unique identifier of the Forage Payment or OrderPayment associated with this transaction. |
refund_id | string | The unique identifier of the Forage Refund or OrderRefund associated with this transaction. |
chargeback_id | string | If the transaction_type is Chargeback, the unique identifier of the chargeback transaction. This value is blank for all other transaction types. |
merchant_payout_id | string | The unique ten character identifier for the merchant payout. (Value only populated for Payout Transaction Reports) |
platform_payout_id | string | The unique ten character identifier for the platform payout if Transaction is part of a platform payout. (Value only populated for Payout Transaction Reports) |
merchant_destination_account_ref | string | The unique identifier of the bank account that received funds settlement for this payment. This value is blank if the payout reflects a platform instead of a merchant settlement. |
external_location_id | string | A unique identifier, provided by the merchant or platform (not Forage), that indicates the physical fulfillment location for the order. For example, this field could specify which location of a grocery store chain fulfilled an order. |
description | string | A description of the transaction, as provided by the merchant or platform when the transaction was created. |
Example request
curl --request GET \
--url 'https://api.sandbox.joinforage.app/reporting/payouts/27/transactions/?start_date=2021-01-31&end_date=2021-02-28&limit=1' \
--header 'Authorization: Bearer <authentication_token>' \
--header 'Merchant-Account: <merchant_account>' \
--header 'accept: application/json'
Transaction Reports
/reporting/transactions/
A Transaction Report includes a list of all transactions that Forage recorded between the provided start_date
and end_date
.
Forage defines a transaction as any financial operation that triggers a flow of funds, including both EBT purchases and EBT refunds. A Transaction Report is useful for reconciling your accounting books against the Forage ledger. The fee
field can help finance teams reconcile the payouts received from Forage.
Credit and debit card transactions are included in the report if the transaction occurred via a Fully Hosted integration, but Forage is never involved in the settlement flow for credit/debit. That falls to the credit/debit PSP, so balance your credit/debit accounting against the PSP’s ledger.
The results
field of the response to requests to /reporting/transactions/
returns an array of objects with the following fields:
Property | Type | Description |
---|---|---|
merchant_id | string | The unique identifier of the merchant associated with this transaction, provided by Forage. |
fns_id | string | The FNS number of the merchant that received the payout including this transaction. |
recorded_date | ISO 8601 date-time string | The date and time when the transaction successfully processed, formatted as an ISO 8601 date-time string in the UTC timezone. |
payout_issued_date | ISO 8601 date-time string | The timestamp of when the payout was created. (Value only populated for Payout Transaction Reports) |
expected_deposit_date | ISO 8601 date-time string | The timestamp of when Forage expects the payout to be deposited. This is typically the payout_issued_date plus one business day, if the ACH method is next-day. (Value only populated for Payout Transaction Reports) |
transaction_type | string | The type of the transaction. One of: - Credit_Debit_Chargeback - Credit_Debit_Purchase - Credit_Debit_Refund - Credit_Debit_Void_Purchase - Credit_Debit_Void_Refund - EBT_Cash_Chargeback - EBT_Cash_Purchase - EBT_Cash_Refund - EBT_Cash_Void_Purchase - EBT_Cash_Void_Refund - SNAP_Chargeback - SNAP_Purchase - SNAP_Refund - SNAP_Void_Purchase - SNAP_Void_Refund The Credit_Debit_ transaction type is only returned if a transaction occurred via a Fully Hosted integration. |
transaction_amount | number | The total amount in USD charged, voided, or refunded to the customer. |
forage_fee | number | The amount of Forage fees applied to the transaction. |
merchant_net_settlement | number | The net amount sent to the merchant, equal to the sum of purchases minus refunds, chargebacks, fees, and any other deductions. This value is blank if the settlement reflects a platform instead of a merchant payout. |
platform_net_settlement | number | The net amount sent to the platform, if applicable, equal to the sum of purchases minus refunds, chargebacks, fees, and any other deductions. This value is blank if the settlement reflects a merchant payout and no platform was involved. |
order_id | string | For Fully Hosted and Custom integrations, the unique identifier of the order associated with the transaction. This value is blank for SDK integrations. |
external_order_id | string | The unique identifier of the order as created by the merchant or platform (not Forage). This typically corresponds to an identifier in the merchant or platform's database, so it can be used as a reference to look up the transaction. |
payment_id | string | The unique identifier of the Forage Payment or OrderPayment associated with this transaction. |
refund_id | string | The unique identifier of the Forage Refund or OrderRefund associated with this transaction. |
chargeback_id | string | If the transaction_type is Chargeback, the unique identifier of the chargeback transaction. This value is blank for all other transaction types. |
merchant_payout_id | string | The unique ten character identifier for the merchant payout. (Value only populated for Payout Transaction Reports) |
platform_payout_id | string | The unique ten character identifier for the platform payout if Transaction is part of a platform payout. (Value only populated for Payout Transaction Reports) |
merchant_destination_account_ref | string | The unique identifier of the bank account that received funds settlement for this payment. This value is blank if the payout reflects a platform instead of a merchant settlement. |
external_location_id | string | A unique identifier, provided by the merchant or platform (not Forage), that indicates the physical fulfillment location for the order. For example, this field could specify which location of a grocery store chain fulfilled an order. |
description | string | A description of the transaction, as provided by the merchant or platform when the transaction was created. |
Example request
curl --request GET \
--url 'https://api.sandbox.joinforage.app/reporting/transactions/?start_date=2021-01-31&end_date=2021-02-28&limit=1' \
--header 'Authorization: Bearer <authentication_token>' \
--header 'Merchant-Account: <merchant_account>' \
--header 'accept: application/json'