> ## 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.

# Simulate balance inquiry

> Simulate a pindebit.balanceinquiry type transaction by sending a POST request to the /simulate/financial/balanceinquiry endpoint.

POST/simulate/financial/balanceinquiry

Simulate a `pindebit.balanceinquiry` type transaction by sending a `POST` request to the `/simulate/financial/balanceinquiry` endpoint.

## Body field details

| Fields | Description |
| - | - |
| mid string  Required | Merchant Identification number **Allowable Values:**  50 char max |
| card\_token string  Required | The unique identifier of the card used in the transaction. **Allowable Values:**  Existing card token. |
| pin string  Optional | The PIN number for the associated card, if required. **Allowable Values:**  4 char max |
| account\_type string  Required | The type of account – checking, savings, credit card. **Allowable Values:**  checking, savings, credit |
| card\_acceptor object  Optional | Contains attributes that describe the merchant. **Allowable Values:**  A valid `card_acceptor` object. |
| network\_fees array of objects  Optional | Simulates various types of fees levied on the transaction. **Allowable Values:**  A valid array of `network_fees` objects. |
| webhook object  Optional | Allows information to be posted asynchronously to endpoints hosted in your environment. **Allowable Values:**  A valid `webhook` object. |

## The card\_acceptor object

| Fields | Description |
| - | - |
| mcc string  Optional | Merchant category code. **Allowable Values:**  5 char max |
| partial\_approval\_capable boolean  Optional | Whether the response can approve an amount less than or equal to the requested amount. **Allowable Values:**  `true`, `false` **Default value:** `false` |
| name string  Optional | Merchant name. **Allowable Values:**  255 char max |
| address string  Optional | Merchant address. **Allowable Values:**  255 char max |
| city string  Optional | Merchant city. **Allowable Values:**  255 char max |
| state string  Optional | Merchant state. **Allowable Values:**  2 char max |
| zip string  Optional | Merchant ZIP or postal code. **Allowable Values:**  10 char max |
| country string  Optional | Merchant country. **Allowable Values:**  40 char max |
| ecommerce\_security\_level\_indicator string  Optional | Contains the fields representing the security protocol and cardholder authentication type associated with the transaction. **Allowable Values:**  0-9 |

## The network\_fees object

| Fields | Description |
| - | - |
| type string  Required | Specifies the type of fee. - **ISSUER\_FEE** – Fee charged by the issuing bank. Does not impact account balance. - **SWITCH\_FEE** – Fee charged per transaction by the card network. Does not impact account balance. - **PINDEBIT\_ASSOC\_FEE** – Fee associated with a PIN-debit transaction, such as at an ATM. Impacts account balance. - **ACQUIRER\_FEE** – Fee charged by the acquiring bank. Impacts account balance. - **INTERCHANGE\_FEE** – Fee charged per transaction by the card network. Does not impact account balance. - **CUR\_CONV\_CARDHOLDER\_FEE** – Currency conversion fee charged to the cardholder by the card network. Impacts account balance. - **CUR\_CONV\_ISSUER\_FEE** – Currency conversion fee paid for by the issuer. Does not impact account balance. - **CROSS\_BORDER\_ISSUER\_FEE** – Cross-border fee charged by the network, and paid for by the issuer. Does not impact account balance. **Allowable Values:**  `ISSUER_FEE`, `SWITCH_FEE`, `PINDEBIT_ASSOC_FEE`, `ACQUIRER_FEE`, `INTERCHANGE_FEE`, `CUR_CONV_CARDHOLDER_FEE`, `CUR_CONV_ISSUER_FEE`, `CROSS_BORDER_ISSUER_FEE` |
| amount decimal  Optional | Specifies the amount of the fee. **Allowable Values:**  Format: 0.00 |
| credit\_debit string  Optional | Specifies whether the fee credits or debits the account balance. **Allowable Values:**  C, D  The default value depends on the setting of the `type` field, as listed below:  Fee Type / Default  `ISSUER_FEE` / C  `SWITCH_FEE` / D  `PINDEBIT_ASSOC_FEE` / D  `ACQUIRER_FEE` / D  `INTERCHANGE_FEE` / C  `CUR_CONV_CARDHOLDER_FEE` / D  `CUR_CONV_ISSUER_FEE` / C  `CROSS_BORDER_ISSUER_FEE` / C |

## The webhook object

| Fields | Description |
| - | - |
| endpoint string  Optional | Endpoint to which a copy of the response is sent. **Allowable Values:**  - HTTPS URL  - 250 char max  - Empty string not allowed |
| username string  Optional | Username for accessing the endpoint. **Allowable Values:**  50 char max |
| password string  Optional | Password for accessing the endpoint. **Allowable Values:**  No restrictions |

## Sample request body

```json JSON lines wrap theme={null}
{
  "mid": "11111",
  "account_type": "savings",
  "card_token": "4abf0fe1-2470-4cc8-b83e-c7db9a59bcdb"
}
```

## Sample response body

```json JSON expandable lines wrap theme={null}
{
  "type": "pindebit.balanceinquiry",
  "state": "CLEARED",
  "token": "d6a4693d-60b3-461b-b048-212ad923a7ed",
  "user_token": "b2d2c739-a9fe-4af0-9f34-964aae4c3e31",
  "acting_user_token": "b2d2c739-a9fe-4af0-9f34-964aae4c3e31",
  "card_token": "4abf0fe1-2470-4cc8-b83e-c7db9a59bcdb",
  "gpa": {
    "currency_code": "USD",
    "ledger_balance": 10,
    "available_balance": 0,
    "credit_balance": 0,
    "pending_credits": 0,
    "balances": {
      "USD": {
        "currency_code": "USD",
        "ledger_balance": 10,
        "available_balance": 0,
        "credit_balance": 0,
        "pending_credits": 0
      }
    }
  },
  "duration": 41,
  "created_time": "2024-07-11T16:41:56Z",
  "user_transaction_time": "2024-07-11T16:41:56Z",
  "request_amount": 0,
  "amount": 0,
  "issuer_interchange_amount": 0,
  "currency_code": "USD",
  "approval_code": "147041",
  "response": {
    "code": "0000",
    "memo": "Approved or completed successfully"
  },
  "network": "VISA",
  "subnetwork": "VISANET",
  "acquirer_fee_amount": 0,
  "acquirer": {
    "institution_id_code": "86285207437",
    "retrieval_reference_number": "775498102690",
    "system_trace_audit_number": "637714"
  },
  "user": {
    "metadata": {}
  },
  "card": {
    "metadata": {}
  },
  "card_acceptor": {
    "mid": "11111",
    "mcc": "6411",
    "name": "Marqeta Storefront",
    "street_address": "330 Central Ave.",
    "city": "St. Petersburg",
    "state": "FL",
    "zip": "33705",
    "country_code": "USA"
  },
  "pos": {
    "terminal_id": "TR100000",
    "partial_approval_capable": false,
    "purchase_amount_only": false,
    "is_recurring": false
  }
}
```


## Related topics

- [Simulating Transactions Overview](https://www.marqeta.com/docs/core-api/simulating-transactions.md)
- [Simulate PIN-debit balance inquiry](https://www.marqeta.com/docs/core-api/simulations-card-transactions/pin-debit/simulate-pin-debit-balance-inquiry.md)
- [Simulate Product Inquiry](https://www.marqeta.com/docs/core-api/simulations-card-transactions/simulate-product-inquiry.md)
- [Just-in-Time Funding in Europe](https://www.marqeta.com/docs/developer-guides/mq-eu-jit-funding.md)
- [Simulate financial](https://www.marqeta.com/docs/core-api/simulating-transactions/simulate-financial.md)
