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

# Using ANI with JIT Funding

> Learn about working with the Account Name Inquiry (ANI) feature in Gateway Just-in-Time Funding requests and responses.

When returning a response to a Gateway Just-in-Time (JIT) Funding request, you can overwrite Marqeta’s proposed name-matching result. To overwrite the name-matching result, you must return the updated cardholder name and corresponding response code in your JIT Funding response.

Participating in the ANI decision-making process is optional. Those who choose to participate must support the Just-in-Time (JIT) request model. As part of transacting under the JIT model, you receive a synchronous JIT request with Marqeta’s proposed match result. You can choose to approve the proposed results or to overwrite the results by returning different values in the response back to Marqeta. ANI JIT messages are only exchanged between you and Marqeta if ANI is requested, and the JIT request uses the same `account_name_verification` model.

<Note>
  **Note**\
  This functionality is only available if your program is configured for Gateway JIT Funding. If you are preloading funds or using Managed JIT Funding, which do not rely on interacting with your system, you cannot overwrite Marqeta’s name-matching results.
</Note>

At the end of this guide, you should understand:

* The role of ANI in JIT Funding requests.

* How to overwrite the name-matching results and match determination using your gateway endpoint’s JIT Funding response.

<h2 id="_prerequisites">
  Prerequisites
</h2>

* Read the [Core API Quick Start](/developer-guides/core-api-quick-start/) guide.

* Read the [About Account Name Inquiry](/developer-guides/account-name-inquiry/) guide.

<h2 id="_concepts">
  Concepts
</h2>

<h3 id="_account_name_inquiry">
  Account Name Inquiry
</h3>

Account Name Inquiry (ANI) allows originating institutions to verify that the name users are providing during their card registration matches the name associated with the card on file by the card issuer. You can choose to participate in the ANI process by supporting the JIT request model. As part of transacting under the JIT model, you can receive a synchronous JIT request with Marqeta’s proposed match result, and you can choose to confirm the proposed results or overwrite the match results by returning a different result to Marqeta.

For more information on ANI, see the [About Account Name Inquiry](/developer-guides/account-name-inquiry/) guide.

<h3 id="_just_in_time_funding">
  Just-in-Time Funding
</h3>

If your card product is configured to use JIT Funding, you are eligible to participate in the ANI decision-making process. If you choose to participate, your system’s gateway endpoint receives a JIT request with the ANI fields to confirm or overwrite Marqeta’s proposed name-matching result. JIT ANI requests include ANI data in the `account_name_verification` object.

For more information about JIT Funding, see the [About Just-in-Time Funding](/developer-guides/about-jit-funding/) guide.

<h3 id="_the_account_name_verification_object">
  The account\_name\_verification object
</h3>

The `account_name_verification` object contains cardholder name data provided by the merchant, cardholder name data held by Marqeta, and the Marqeta platform’s match determination.

If your system’s name data is different than what is provided by the Marqeta platform, you can overwrite the ANI match determination by including the `account_name_verification.gateway` object in your JIT ANI response. You must include the updated cardholder name data you hold in your system and the corresponding response code.

<Tip>
  **Tip**\
  You should only include the `account_name_verification.gateway` object if you intend to overwrite the ANI match determination made by the Marqeta platform.
</Tip>

<h2 id="_examples">
  Examples
</h2>

The following section shows you examples related to overwriting Marqeta’s proposed ANI name-matching results. This scenario shows the JIT ANI request, approval response, and overwrite response.

<h3 id="_jit_ani_request">
  JIT ANI request
</h3>

The JIT ANI request from Marqeta uses the `account_name_verification` model.

The `on_file` and `response` models are added to the `issuer` model to separate Marqeta’s information (i.e., `issuer`) and your response (i.e., `gateway`).

Below is an example of the ANI portion of the JIT request:

```json JSON lines wrap theme={null}
"account_name_verification": {
  "request": {
    "first_name": "John",
    "middle_name": "A",
    "last_name": "Smith"
    "card_name": "JOHN A SMITH"
  },
  "issuer": {
    "on_file": {
      "first_name": "John",
      "middle_name": "A",
      "last_name": "Smith"
      "card_name": "JOHN A SMITH"
    },
    "response": {
      "code": "####",
      "memo": "Match"
    }
  }
}
```

<h3 id="_jit_ani_approval_response">
  JIT ANI approval response
</h3>

If you approve Marqeta’s proposed name-matching result, a successful approval response is returned.

See the example below:

```json JSON lines wrap theme={null}
{
  "jit_funding": {
    "token": "ac93792f-f3b4-42e7-a4d8-2c2c62864905",
    "method": "pgfs.authorization.account_verification",
    "user_token": "jit_User_001",
    "acting_user_token": "jit_User_001",
    "amount": 0,
    "memo": "GJIT Endpoint",
    "tags": "tags, can, be, up, to, 255, chars, max"
  }
}
```

<h3 id="_jit_ani_overwrite_response">
  JIT ANI overwrite response
</h3>

If you do not approve Marqeta’s proposed name-matching result and want to overwrite it, you should return the overwrite response. Use `account_name_verification.gateway` to provide the name-matching result data.

Below is an example of the ANI portion of the JIT response:

```json JSON lines wrap theme={null}
"account_name_verification": {
  "gateway": {
    "on_file": {
      "first_name": "Mike",
      "middle_name": "B",
      "last_name": "Smith"
      "card_name": "MIKE B SMITH"
    },
    "response": {
      "code": "####",
      "memo": "Partial Match"
    }
  }
}
```
