> ## Documentation Index
> Fetch the complete documentation index at: https://docs.methodfi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# The merchant endpoint

export const ParamList = ({items = [], is_child = false}) => {
  return items.map(item => {
    const field_props = {
      id: Math.random().toString(),
      body: item.name,
      name: item.name,
      type: item.type,
      required: item.required
    };
    const enums = item.enums || [];
    const items = item.items || [];
    const has_items = items?.length > 0;
    const has_enums = enums?.length > 0;
    const should_default_open = item.defaultOpen || false;
    const render_child_item = () => {
      const child_props = {
        title: has_enums ? "Possible enum values" : "properties"
      };
      if (should_default_open) child_props.defaultOpen = true;
      const has_inline_enums = has_enums && enums.every(enum_item => typeof enum_item === 'string') && enums.map((enum_item, idx) => {
        const is_last = idx === enums.length - 1;
        const is_2nd_to_last = idx === enums.length - 2;
        return <>
            <code>{enum_item}</code>
            {is_last && ''}
            {is_2nd_to_last && ' or '}
            {!is_last && !is_2nd_to_last && ', '}
          </>;
      });
      const enum_list = has_enums && !has_inline_enums && <Accordion {...child_props}>
          {enums.map((enum_item, index) => <div key={`enum-${index}`}>
              <code>{enum_item.name}</code>
              <br />
              <p>{enum_item.description}</p>
            </div>)}
        </Accordion>;
      const item_list = has_items && <Expandable {...child_props}>
          <ParamList items={items || []} is_child />
        </Expandable>;
      return <>
          <p>
            {item.description}
            {has_inline_enums && [has_inline_enums.length > 1 ? ' One of ' : ' Must be ', ...has_inline_enums]}
          </p>

          {enum_list}
          {item_list}
        </>;
    };
    return is_child ? <ResponseField {...field_props}>{render_child_item()}</ResponseField> : <ParamField {...field_props}>{render_child_item()}</ParamField>;
  });
};

Merchants are resources that represent a specific type of liability for a financial
institution. Method supports the majority of the financial institutions in the U.S.

<Note>
  Financial institutions that offer multiple liability products are represented in Method
  as separate Merchants.

  Ex. Capital One Credit Card (<code>mch\_301761</code>) is
  different from Capital One Auto Loan (<code>mch\_301760</code>)
</Note>

## Merchant Objects

<ParamList
  items={[
{
name: 'id',
type: 'string',
description: 'Unique identifier for the Merchant.',
},
{
name: 'parent_name',
type: 'string',
description: 'The presentable name of the financial institution',
},
{
name: 'name',
type: 'string',
description: 'The presentable name of the Merchant.',
},
{
name: 'logo',
type: 'string',
description: 'A URL to the Merchant\'s logo.',
},
{
name: 'type',
type: 'enum',
description: 'The liability type supported by the Merchant.',
enums: ['credit_card', 'auto_loan', 'student_loan', 'personal_loan', 'mortgage'],
},
{
name: 'provider_ids',
type: 'object',
description: 'Related IDs for this Merchant in third-party aggregators.',
items: [
  {
    name: 'provider_ids.plaid',
    type: 'string[]',
    description: 'A list of Plaid Institution IDs corresponding to this Merchant.',
  },
  {
    name: 'provider_ids.mx',
    type: 'string[]',
    description: 'A list of MX IDs for this Merchant.',
  },
  {
    name: 'provider_ids.finicity',
    type: 'string[]',
    description: 'A list of Finicity IDs for this Merchant.',
  },
  {
    name: 'provider_ids.dpp',
    type: 'string[]',
    description: 'A list of DebtPayPro IDs for this Merchant.',
  },
  {
    name: 'provider_ids.rpps',
    type: 'string[]',
    description: 'A list of Mastercard RPPS (Remote Payment and Presentment Service) IDs for this Merchant.',
  }
]
},
{
name: 'is_temp',
type: 'boolean',
description: (
  <>
    A field indicating whether a Merchant will later be mapped to a permanently managed Merchant. Temp
    Merchants are susceptible to change, and provide limited functionality.
    <br/>
    <br/>
    Accounts associated with a temp Merchant will be updated once changes occur on the temp Merchant.
  </>
),
},
{
name: 'account_number_formats',
type: 'string[]',
description: (
  <>
    A guiding list of formats for account numbers corresponding to this Merchant. No validation
    is done against this list.
  </>
),
},
]}
/>

<RequestExample>
  ```json THE MERCHANT OBJECT theme={null}
  {
    "id": "mch_301761",
    "parent_name": "Capital One",
    "name": "Capital One Credit Card",
    "logo": "https://static.methodfi.com/mch_logos/mch_301761.png",
    "type": "credit_card",
    "provider_ids": {
      "plaid": [
        "ins_9",
        "ins_128026"
      ],
      "mx": [
        "capital_one"
      ],
      "finicity": [],
      "dpp": [
        "9366979",
        "18372457",
        "18431971",
        "18373255",
        "14444930"
      ],
      "rpps": []
    },
    "is_temp": false,
    "account_number_formats": [
      "################"
    ]
  }
  ```
</RequestExample>
