Program Balances Settlement

Retrieve balance data based on settlements for the program account. Each row represents the balance data, including bank balance and the amount to transfer to fund your program, against the program account for a day. The data is derived from the balance-related activity on the Marqeta platform.

This endpoint supports multiple response formats, query filtering, field filtering, sorting, pagination, and currency conversion. For more information about response options, see Response Customization.

Retrieve program balance settlement data by day (JSON)

Action: GET
Endpoint: /views/programbalancessettlements/day

Retrieve program balance settlement data for the current day. This endpoint returns a JSON object that contains an array of records matching your filter query.

Sample response body

The following sample shows a representative response for a GET request to the /views/programbalancessettlements/day?program=my_program&fields=post_date,beginning_bank_balance,partner_funds_loads_net,deposit,ending_bank_balance endpoint.

{
"total": 17,
"is_more": false,
"count": 17,
"info": {},
"start_date": "2019-02-01T00:00:00+0000",
"end_date": "2019-02-13T00:00:00+0000",
"last_run_time": "",
"schema": [
{
"field": "post_date",
"type": "date",
"description": "The date a transaction was posted by the network.",
"display": "Post Date",
"units": null,
"has_total": false,
"date_format": "YYYY-MM-DD",
"is_filter_only": false
},
{
"field": "beginning_bank_balance",
"type": "numeric(14,2)",
"description": "#N/A",
"display": "Beginning Bank Balance",
"units": "USD",
"has_total": true,
"is_filter_only": false
},
{
"field": "partner_funds_loads_net",
"type": "numeric(14,2)",
"description": "The net amount of funds loaded or unloaded using a program funding account including any adjustments.",
"display": "Partner Funds Loads Net",
"units": "USD",
"has_total": true,
"is_filter_only": false
},
{
"field": "deposit",
"type": "numeric(14,2)",
"description": "#N/A",
"display": "Deposit",
"units": "USD",
"has_total": true,
"is_filter_only": false
},
{
"field": "ending_bank_balance",
"type": "numeric(14,2)",
"description": "",
"display": "Ending Bank Balance",
"units": "USD",
"has_total": true,
"is_filter_only": false
}
],
"records": [
{
"post_date": "2019-02-14T00:00:00.000Z",
"beginning_bank_balance": 8243600.08,
"partner_funds_loads_net": 0,
"deposit": 0,
"ending_bank_balance": 8243600.08
},
{
"post_date": "2019-02-13T00:00:00.000Z",
"beginning_bank_balance": 9732764.04,
"partner_funds_loads_net": -1489163.96,
"deposit": 0,
"ending_bank_balance": 8243600.08
},
...
{
"post_date": "2019-01-29T00:00:00.000Z",
"beginning_bank_balance": 9882031.28,
"partner_funds_loads_net": -1257413.84,
"deposit": 3847296.96,
"ending_bank_balance": 12471914.4
}
]
}


Retrieve program balance settlement data by day (file export)

Action: GET
Endpoint: /views/programbalancessettlements/day/{export_type}

Retrieve program balance settlements data for the day. This endpoint asynchronously generates a file in the specified format and returns a job token for retrieving the file when it is completed. The file contains a list of records matching your filter query.

Path parameters

Name Type Required? Description Allowable Values
export_type string Yes File format in which to export the data. csv | xlsx

Query parameters

Name Type Required? Description Allowable Values
expand string No Expandable fields for which to retrieve additional details. You can specify any number of expandable fields in a comma-delimited list.

For example, expand=pin_purchases_net breaks out PIN purchases by card network.
pin_purchases_net | sig_purchases_net
compress string No Type of file compression for the exported file. gz | zip

Default: gz

Sample response body

{
"token":"111122226c444d8888888a9999ae11111db63da4.csv.gz"
}


Retrieve schema for program balance settlement by day

Action: GET
Endpoint: /views/programbalancessettlements/day/schema

Retrieve a JSON representation of the program balances settlements view schema. The schema object contains an array of objects that describe the available columns and the data type of each column.

Sample response body

The following sample shows a representative response for a GET request to the /views/programbalancessettlements/day/schema?program=my_program endpoint. The schema can vary based on the data you are authorized to access (based on the credentials you provide in your request).

[
{
"field": "program",
"type": "character varying(128)",
"description": "The name of the card program.",
"display": "Program",
"units": null,
"has_total": false,
"is_filter_only": false
},
{
"field": "post_date",
"type": "date",
"description": "The date a transaction was posted by the network.",
"display": "Post Date",
"units": null,
"has_total": false,
"date_format": "YYYY-MM-DD",
"is_filter_only": false
},
{
"field": "currency",
"type": "character varying(10)",
"description": "The abbreviated currency code.",
"display": "Currency",
"units": null,
"has_total": false,
"is_filter_only": false
},
{
"field": "beginning_bank_balance",
"type": "numeric(14,2)",
"description": "#N/A",
"display": "Beginning Bank Balance",
"units": "USD",
"has_total": true,
"is_filter_only": false
},
{
"field": "partner_funds_loads_net",
"type": "numeric(14,2)",
"description": "The net amount of funds loaded or unloaded using a program funding account including any adjustments.",
"display": "Partner Funds Loads Net",
"units": "USD",
"has_total": true,
"is_filter_only": false
},
{
"field": "deposit",
"type": "numeric(14,2)",
"description": "#N/A",
"display": "Deposit",
"units": "USD",
"has_total": true,
"is_filter_only": false
},
{
"field": "ending_bank_balance",
"type": "numeric(14,2)",
"description": "",
"display": "Ending Bank Balance",
"units": "USD",
"has_total": true,
"is_filter_only": false
},
{
"field": "last_modified_time",
"type": "timestamp without time zone",
"description": "The date when the record was most recently updated.",
"display": "Last Modified Time",
"units": null,
"has_total": false,
"date_format": "YYYY-MM-DD",
"is_filter_only": false
}
]