Skip to main content
Use this view endpoint to retrieve payment details for the credit accounts in a program. 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 payments detail (JSON)

Action: GET
Endpoint: /views/credit/payments/detail
Retrieve payment details for the credit accounts in a program. 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/credit/payments/detail?program=my_program&fields=post_date,currency,amount_to_send endpoint.
JSON
{
    "total": 76,
    "is_more": false,
    "count": 76,
    "info": {},
    "start_date": null,
    "end_date": null,
    "last_run_time": "",
    "schema": [
        {
            "field": "amount",
            "type": "NUMBER",
            "scale": 2.0,
            "character_maximum_length": null,
            "description": "#N/A",
            "display": "Amount",
            "units": null,
            "has_total": true,
            "is_filter_only": false
        },
        {
            "field": "interest_allocation",
            "type": "NUMBER",
            "scale": 2.0,
            "character_maximum_length": null,
            "description": null,
            "display": "Interest Allocation",
            "units": null,
            "has_total": false,
            "is_filter_only": false
        },
        {
            "field": "fees_allocation",
            "type": "NUMBER",
            "scale": 2.0,
            "character_maximum_length": null,
            "description": null,
            "display": "Fees Allocation",
            "units": null,
            "has_total": false,
            "is_filter_only": false
        }
    ],
    "records": [
        {
            "amount": 250.0,
            "interest_allocation": 12.0,
            "fees_allocation": 2.0
        },
        {
            "amount": 2100.0,
            "interest_allocation": 30.0,
            "fees_allocation": 12.0
        },

        ...

        {
            "amount": 300.98,
            "interest_allocation": 15.0,
            "fees_allocation": 4.0
        }
    ]
}

Retrieve payments detail (file export)

Action: GET
Endpoint: /views/credit/payments/detail/{export_type}
Retrieve payment details for the credit accounts in a program and export to a file. 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.

URL path parameters

FieldsDescription
export_type

string
Required
File format in which to export the data.

Allowable Values:

csv

Query parameters

FieldsDescription
compress

string
optional
Type of file compression for the exported file.

Allowable Values:

gz, zip

Default value:
gz

Sample response body

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

Retrieve schema for payments detail

Action: GET
Endpoint: /views/credit/payments/detail/schema
Retrieve a JSON representation of the payments detail view schema for credit accounts in a program. 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/credit/payments/detail/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).
JSON
[[
    {
        "field": "token",
        "type": "character varying(36)",
        "display": "Token",
        "description": "#N/A",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "account_token",
        "type": "character varying(36)",
        "display": "Account Token",
        "description": null,
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "method",
        "type": "character varying(255)",
        "display": "Method",
        "description": null,
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "payment_source_token",
        "type": "character varying(36)",
        "display": "Payment Source Token",
        "description": null,
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "amount",
        "type": "numeric(14,2)",
        "display": "Amount",
        "description": "#N/A",
        "units": "USD",
        "has_total": true,
        "is_filter_only": false
    },
    {
        "field": "interest_allocation",
        "type": "numeric(14,2)",
        "display": "Interest Allocation",
        "description": null,
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "fees_allocation",
        "type": "numeric(14,2)",
        "display": "Fees Allocation",
        "description": null,
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "purchases_allocation",
        "type": "numeric(14,2)",
        "display": "Purchases Allocation",
        "description": null,
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "currency_code",
        "type": "character varying(3)",
        "display": "Currency Code",
        "description": "The three-number code of the currency.",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "status",
        "type": "character varying(255)",
        "display": "Status",
        "description": "The program status.",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "description",
        "type": "character varying(255)",
        "display": "Description",
        "description": null,
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "created_time",
        "type": "timestamp without time zone",
        "display": "Created Time",
        "description": "The time the ACH verification was created.",
        "date_format": "YYYY-MM-DD HH:mm:ss",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "report_load_timestamp",
        "type": "timestamp without time zone",
        "display": "Report Load Timestamp",
        "description": "UTC time when the record was loaded into Marqeta's reporting system",
        "date_format": "YYYY-MM-DD",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    }
]