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

> A "financial" is a transaction message class that includes ATM transactions, PIN-debit transactions, and balance inquiries.

POST/simulate/financial

A "financial" is a transaction message class that includes ATM transactions, PIN-debit transactions, and balance inquiries.

Simulate a `pindebit` type transaction by including the `card_token` and `amount` in your request.

## Body field details

| Fields | Description |
| - | - |
| amount decimal  Required | The transaction amount. **Allowable Values:**  Format: 0.00 |
| 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 |
| is\_pre\_auth boolean  Optional | Set to `true` to mark the amount as an authorization only. **Allowable Values:**  `true`, `false` **Default value:** `false` |
| cash\_back\_amount decimal  Optional | The cash-back amount. **Allowable Values:**  Format: 0.00 |
| transaction\_options object  Optional | Contains additional information about the transaction. **Allowable Values:**  A valid `transaction_options` object. |
| card\_acceptor object  Optional | Contains attributes that describe the merchant. **Allowable Values:**  A valid `card_acceptor` object. |
| 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 transaction\_options object

| Fields | Description |
| - | - |
| additional\_data string  Optional | Attribute of the transaction\_options object. Contains additional information about the transaction. **Allowable Values:**  A valid `additional_data` object. |

## 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}
{
  "amount": "2.50",
  "mid": "11111",
  "card_token": "4abf0fe1-2470-4cc8-b83e-c7db9a59bcdb",
  "is_pre_auth": false
}
```

## Sample response body

```json JSON expandable lines wrap theme={null}
{
  "type": "pindebit",
  "state": "COMPLETION",
  "token": "0ae44166-058d-4882-b39f-13fea8c6e387",
  "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,
    "impacted_amount": -2.5,
    "balances": {
      "USD": {
        "currency_code": "USD",
        "ledger_balance": 10,
        "available_balance": 0,
        "credit_balance": 0,
        "pending_credits": 0,
        "impacted_amount": -2.5
      }
    }
  },
  "gpa_order": {
    "token": "ed059525-d7ee-4156-a5ff-d57e65d1eae9",
    "amount": 2.5,
    "created_time": "2024-07-11T16:37:50Z",
    "last_modified_time": "2024-07-11T16:37:50Z",
    "transaction_token": "49cb176b-9d8b-4fbc-8b22-45b83d15d7c9",
    "state": "COMPLETION",
    "response": {
      "code": "0000",
      "memo": "Approved or completed successfully"
    },
    "funding": {
      "amount": 2.5,
      "source": {
        "type": "program",
        "token": "**********b4c2",
        "active": true,
        "name": "PFS for simulating transactions",
        "is_default_account": false,
        "created_time": "2024-07-10T00:09:35Z",
        "last_modified_time": "2024-07-10T00:09:35Z"
      }
    },
    "funding_source_token": "**********b4c2",
    "user_token": "b2d2c739-a9fe-4af0-9f34-964aae4c3e31",
    "currency_code": "USD"
  },
  "duration": 166,
  "created_time": "2024-07-11T16:37:50Z",
  "user_transaction_time": "2024-07-11T16:37:50Z",
  "request_amount": 2.5,
  "amount": 2.5,
  "issuer_interchange_amount": 0,
  "currency_code": "USD",
  "approval_code": "328310",
  "response": {
    "code": "0000",
    "memo": "Approved or completed successfully"
  },
  "network": "VISA",
  "subnetwork": "VISANET",
  "acquirer_fee_amount": 0,
  "acquirer": {
    "institution_id_code": "34483739464",
    "retrieval_reference_number": "088404447069",
    "system_trace_audit_number": "621801"
  },
  "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

- [Simulate financial advice](https://www.marqeta.com/docs/core-api/simulating-transactions/simulate-financial-advice.md)
- [Simulate balance inquiry](https://www.marqeta.com/docs/core-api/simulating-transactions/simulate-balance-inquiry.md)
- [Simulating Transactions Overview](https://www.marqeta.com/docs/core-api/simulating-transactions.md)
- [Simulate OCT authorization and capture reversal](https://www.marqeta.com/docs/core-api/simulations-card-transactions/original-credit-transactions/simulate-oct-authorization-capture-reversal.md)
- [Simulate PIN-debit balance inquiry](https://www.marqeta.com/docs/core-api/simulations-card-transactions/pin-debit/simulate-pin-debit-balance-inquiry.md)
