DOCS

New!

/

5 minute read

October 5, 2019

Clearing Detail

Use this view endpoint to retrieve clearing detail data. Each row represents a single clearing transaction. The data is derived from the transaction-related messages sent to and from 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 clearing detail data (JSON)

Action: GET
Endpoint: /views/clearing/detail

Retrieve clearing detail data. 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/clearing/day?program=my_program&fields=post_date,currency_conversion_fees endpoint.

{
     "total": 31098,
     "is_more": true,
     "count": 10000,
     "info": {},
     "start_date": "2019-05-01T00:00:00+0000",
     "end_date": "2019-05-23T00:00:00+0000",
     "last_run_time": "2019-05-23T15:05:57Z",
     "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": "currency_conversion_fees",
             "type": "numeric(38,2)",
             "description": "The amount of currency conversion fees charged by either MasterCard, Visa, Discover, Maestro, Cirrus, VisaInterlink, VisaPlus, VisaNetDebit or Pulse.",
             "display": "Currency Conversion Fees",
             "units": "USD",
             "has_total": true,
             "is_filter_only": false
         }
     ],
     "records": [
         {
             "post_date": "2019-05-23T00:00:00.000Z",
             "currency_conversion_fees": 0
         },
         {
             "post_date": "2019-05-23T00:00:00.000Z",
             "currency_conversion_fees": 0
         },{
             "post_date": "2019-05-23T00:00:00.000Z",
             "currency_conversion_fees": 0
         }
     ]
 }

Is this helpful?

Retrieve clearing detail data (file export)

Action: GET
Endpoint: /views/clearing/detail/{export_type}

Retrieve clearing detail data. 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

Fields Description

export_type

string, required

File format in which to export the data.

Allowable Values: csv

Query parameters

Fields Description

compress

string, optional

Type of file compression for the exported file.

Allowable Values: gz, zip

Default value: gz

Sample response body

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

Is this helpful?

Retrieve clearing detail schema

Action: GET
Endpoint: /views/clearing/detail/schema

Retrieve a JSON representation of the clearing detail 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/clearing/detail/schema?program=my_program endpoint. The schema can vary based on the data aggregation level and the data you are authorized to access (based on the credentials you provide in your request).

[
     {
         "field": "program",
         "type": "character varying(256)",
         "description": "The name of the card program.",
         "display": "Program",
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "bank",
         "type": "character varying(256)",
         "description": "The bank under which the program operates.",
         "display": "Bank",
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "batch_number",
         "type": "bigint",
         "description": "The clearing batch record number for a clearing record from the network.",
         "display": "Batch Number",
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "transaction_token",
         "type": "character varying(128)",
         "description": "The token of the transaction; unique within a program.",
         "display": "Transaction Token",
         "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": "initiating_transaction_token",
         "type": "character varying(128)",
         "description": "The token identifying the initial transaction in a chain of transactions (usually an authorization).",
         "display": "Initiating Transaction Token",
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "reference_transaction_token",
         "type": "bigint",
         "description": "A transaction identifier which represents a transaction token to which the currenct transaction token relates to.",
         "display": "Reference Transaction Token",
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "reversal_token",
         "type": "bigint",
         "description": "A transaction identifier which represnts a transaction that has been reversed since having originally taken place. This identifier will point the the transaction record of that reversal.",
         "display": "Reversal Token",
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "chargeback_token",
         "type": "bigint",
         "description": "unique token to identify a chargeback record within a program.",
         "display": "Chargeback Token",
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "transaction_type",
         "type": "character varying(256)",
         "description": "A type field that categorizes the transaction event.",
         "display": "Transaction Type",
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "transaction_status",
         "type": "character varying(150)",
         "description": "The status of the transaction.",
         "display": "Transaction Status",
         "enum_values": [],
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "transaction_processing_type",
         "type": "character varying(150)",
         "description": "The method used to capture the card PAN (chip, magstripe, contactless, chip fallback, token). Chip fallback is used when a chip-capable terminal fails and requires the use of the magstripe.",
         "display": "Transaction Processing Type",
         "enum_values": [],
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "parent_user_token",
         "type": "character varying(50)",
         "description": "The unique user token identifying the parent of the user or business account.",
         "display": "Parent User Token",
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "parent_uai",
         "type": "character varying(50)",
         "description": "The unique account identifier (UAI) for the parent of the user or business account.",
         "display": "Parent Uai",
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "acting_user_token",
         "type": "character varying(50)",
         "description": "The unique user token of a card holder. This can be seen in the user view and transaction level views.",
         "display": "Acting User Token",
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "acting_uai",
         "type": "character varying(50)",
         "description": "The unique account identifier (UAI) for an acting card holder account within a bank; unique across programs.",
         "display": "Acting Uai",
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "business_name",
         "type": "character varying(255)",
         "description": "The name of the business associated with a card holder, acting card holder, or business account.",
         "display": "Business Name",
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "acting_card_token",
         "type": "character varying(108)",
         "description": "The token identifying a card within a card program. This can be seen in the cards view and transaction level views.",
         "display": "Acting Card Token",
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "acting_card_product",
         "type": "character varying(100)",
         "description": "The name of the card product related to a card; each card product has unique spend controls.",
         "display": "Acting Card Product",
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "card_type",
         "type": "character varying(201)",
         "description": "The type of card: virtual, physical.",
         "display": "Card Type",
         "enum_values": [],
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "merchant",
         "type": "character varying(765)",
         "description": "The merchant associated with the transaction; where a transaction took place.",
         "display": "Merchant",
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "merchant_country",
         "type": "character varying(765)",
         "description": "The country of a merchant location where a transaction has taken place.",
         "display": "Merchant Country",
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "merchant_state",
         "type": "character varying(128)",
         "description": "The state or province of a merchant location where a transaction has taken place.",
         "display": "Merchant State",
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "merchant_city",
         "type": "character varying(65535)",
         "description": "The city of a merchant location where a transaction has taken place.",
         "display": "Merchant City",
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "network",
         "type": "character varying(100)",
         "description": "The card network on which a transaction took place.",
         "display": "Network",
         "enum_values": [],
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "sub_network",
         "type": "character varying(100)",
         "description": "The subnetwork used by a transaction (VisaPlus, VisaNet, VisaInterlink, VisaNet Debit, MAestro, Cirrus, or Pulse).",
         "display": "Sub Network",
         "enum_values": [],
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "clean_merchant",
         "type": "character varying(765)",
         "description": "A human-readable merchant name when available.",
         "display": "Clean Merchant",
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "merchant_category_code",
         "type": "bigint",
         "description": "The merchant category code (MCC) associated with a transaction.",
         "display": "Merchant Category Code",
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "merchant_category_code_group",
         "type": "character varying(2000)",
         "description": "The merchant category code (MCC) group associated with a transaction.",
         "display": "Merchant Category Code Group",
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "merchant_category_code_description",
         "type": "character varying(1000)",
         "description": "The description of the merchant category code (MCC) associated with a transaction.",
         "display": "Merchant Category Code Description",
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "standin_approved_by",
         "type": "character varying(128)",
         "description": "Designates the means in which a transaction was approved within a JIT transaction flow. ",
         "display": "Standin Approved By",
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "currency",
         "type": "character varying(20)",
         "description": "The abbreviated currency code.",
         "display": "Currency",
         "units": null,
         "has_total": false,
         "is_filter_only": false
     },
     {
         "field": "sig_purchases",
         "type": "numeric(38,2)",
         "description": "The amount of signature based purchase transactions, defined by transactions having funds flow through a MasterCard, Visanet or Discover account.",
         "display": "Sig Purchases",
         "units": "USD",
         "has_total": true,
         "is_filter_only": false
     },
     {
         "field": "pin_purchases",
         "type": "numeric(38,2)",
         "description": "The amount of PIN-based purchases on Maestro, Cirrus, Visa Interlink, VisaPlus, VisaNet Debit, or Pulse.",
         "display": "Pin Purchases",
         "units": "USD",
         "has_total": true,
         "is_filter_only": false
     },
     {
         "field": "sig_returns",
         "type": "numeric(38,2)",
         "description": "The amount of signature based refund transactions, defined by transactions having funds flow through a MasterCard, Visanet or Discover account.",
         "display": "Sig Returns",
         "units": "USD",
         "has_total": true,
         "is_filter_only": false
     },
     {
         "field": "pin_returns",
         "type": "numeric(38,2)",
         "description": "The amount of PIN-based returns on Maestro, Cirrus, Visa Interlink, VisaPlus, VisaNet Debit, or Pulse.",
         "display": "Pin Returns",
         "units": "USD",
         "has_total": true,
         "is_filter_only": false
     },
     {
         "field": "sig_interchange",
         "type": "numeric(38,2)",
         "description": "The amount of signature based purchase transactions less returns, defined by transactions having funds flow through a MasterCard, Visanet or Discover account.",
         "display": "Sig Interchange",
         "units": "USD",
         "has_total": true,
         "is_filter_only": false
     },
     {
         "field": "pin_interchange",
         "type": "numeric(38,2)",
         "description": "The amount of interchange received from PIN transactions.",
         "display": "Pin Interchange",
         "units": "USD",
         "has_total": true,
         "is_filter_only": false
     },
     {
         "field": "chargebacks",
         "type": "numeric(38,2)",
         "description": "The amount of chargebacks that have completed, usually accompanied by a CASE_WON status.",
         "display": "Chargebacks",
         "units": "USD",
         "has_total": true,
         "is_filter_only": false
     },
     {
         "field": "pin_debit_assoc_fees",
         "type": "numeric(38,2)",
         "description": "The amount of fees charged to a card holder for a given transaction record.",
         "display": "Pin Debit Assoc Fees",
         "units": "USD",
         "has_total": true,
         "is_filter_only": false
     },
     {
         "field": "currency_conversion_fees",
         "type": "numeric(38,2)",
         "description": "The amount of currency conversion fees charged by either MasterCard, Visa, Discover, Maestro, Cirrus, VisaInterlink, VisaPlus, VisaNetDebit or Pulse.",
         "display": "Currency Conversion Fees",
         "units": "USD",
         "has_total": true,
         "is_filter_only": false
     },
     {
         "field": "switch_fees",
         "type": "numeric(38,2)",
         "description": "The amount of switch fees for MasterCard, Visa, Discover, Maestro, Cirrus, VisaInterlink, VisaPlus, VisaNetDebit or Pulse.",
         "display": "Switch Fees",
         "units": null,
         "has_total": false,
         "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
     }
 ]

Is this helpful?

Have any feedback on this page?

If you feel we can do anything better, please let our team know.

We strive for the best possible developer experience.