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

# Simulating Transactions

> The Marqeta platform provides a set of endpoints that allow you to simulate various types of transactions in a secure sandbox environment without communicating with a card network.

export const EndpointCard = ({method = "API", title, children, href, arrow = true}) => {
  const METHOD_STYLES = {
    GET: {
      bg: "mint-bg-green-400/20 dark:mint-bg-green-400/20",
      text: "mint-text-green-700 dark:mint-text-green-400",
      border: "mint-border-green-300 dark:mint-border-green-700"
    },
    POST: {
      bg: "mint-bg-blue-400/20 dark:mint-bg-blue-400/20",
      text: "mint-text-blue-700 dark:mint-text-blue-400"
    },
    PUT: {
      bg: "mint-bg-yellow-400/20 dark:mint-bg-yellow-400/20",
      text: "mint-text-yellow-700 dark:mint-text-yellow-400"
    },
    PATCH: {
      bg: "mint-bg-orange-400/20 dark:mint-bg-orange-400/20",
      text: "mint-text-orange-700 dark:mint-text-orange-400"
    },
    DELETE: {
      bg: "mint-bg-red-400/20 dark:mint-bg-red-400/20",
      text: "mint-text-red-700 dark:mint-text-red-400"
    },
    API: {
      bg: "mint-bg-black",
      text: "mint-text-white"
    }
  };
  const MethodBadge = ({method}) => {
    const style = METHOD_STYLES[method?.toUpperCase()] ?? METHOD_STYLES.GET;
    return <span className={`
          method-pill rounded-lg font-semibold px-1.5 py-0.5 text-xs leading-5 ${style.bg} ${style.text}`}>
        {method?.toUpperCase()}
      </span>;
  };
  const content = <div className="group flex items-center gap-4 border border-gray-200 dark:border-gray-700 rounded-xl p-5 hover:border-gray-400 dark:hover:border-gray-500 hover:shadow-md transition-all cursor-pointer">
      {}
      <div className="shrink-0">
        <MethodBadge method={method} />
      </div>
      {}
      <div className="flex-1 min-w-0">
        <p className="font-semibold text-gray-900 dark:text-white text-sm leading-snug">{title}</p>
        {children && <p className="mt-1 text-sm text-gray-500 dark:text-gray-400 line-clamp-2">{children}</p>}
      </div>
    </div>;
  if (!href) return content;
  return <a href={href} className="block no-underline border-b-0 mb-2">
      {content}
    </a>;
};

We are planning to deprecate these endpoints in the future. Please consider updating your tests to use [Simulations 2.0](/core-api/simulations-card-transactions/) as soon as possible.

If you are new to Marqeta’s Simulations service, start testing your integration using the recently released Simulations 2.0 API for [card transactions](/core-api/simulations-card-transactions/) and [direct deposits](/core-api/simulations-direct-deposits/).

If you are currently using the Simulations service described on this page, consider switching to the Simulations 2.0 service. The Simulations 2.0 service includes all the capabilities of the previous versions of Simulations, plus it offers a new set of endpoints and a [Postman collection](/core-api/postman-collection-simulations/).

The Marqeta platform provides you with a production environment, as well as a test environment known as the sandbox.

There are two types of sandbox environments available:

* **Public sandbox:** A single-user environment where you can begin building your program. Public sandbox users are typically potential customers who are evaluating Marqeta as a partner in their application.

* **Private sandbox:** A multi-user environment where you can integrate your application with the Marqeta platform. Marqeta customers use the private sandbox and its connected microservices to validate their application’s integration, as well as ongoing API changes.

All funds and transactions are simulated in both types of sandbox environments. The sandbox may give you access to features not available in production environments, depending on your integration.

The most significant functional difference between the production and sandbox environments is that your production environment communicates with a payment card network. This communication allows your program’s cards to pay for goods and services by initiating live transactions over the card network.

The public and private sandbox environments, on the other hand, do not communicate with a card network and the cards you create within them cannot be used to conduct real-world transactions. You must, therefore, rely on simulated transactions in order to test the cards, users, and other objects you create within the sandbox.

The public and private sandbox environments provide a set of endpoints that allow you to simulate various types of card network transactions, such as authorizations, reversals, and balance inquiries. These endpoints are available only within the public and private sandbox environments, and not within your production environment. This page, therefore, applies only to the public and private sandbox environments.

<h2 id="_simulate_authorization">
  Simulate authorization
</h2>

**Action:** `POST`\
**Endpoint:** `/simulate/authorization`

{/* <EndpointCard
title="Simulate authorization"
path="/simulate/authorization"
method="post"
/> */}

Simulate an `authorization` type transaction by including the `card_token` and other authorization details in your request.

<h3 id="_body_field_details">
  Body field details
</h3>

| Fields                                                        | Description                                                                                                                                                                                                   |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| card\_token<br /><br />string<br /><br />Required             | The unique identifier of the card involved in the transaction.<br /><br />**Allowable Values:**<br /><br />255 char max                                                                                       |
| amount<br /><br />decimal<br /><br />Required                 | The amount of the transaction.<br /><br />**Allowable Values:**<br /><br />Format: 0.00                                                                                                                       |
| mid<br /><br />string<br /><br />Required                     | The Merchant Identifier of the merchant participating in the transaction.<br /><br />**Allowable Values:**<br /><br />50 char max                                                                             |
| is\_pre\_auth<br /><br />boolean<br /><br />Optional          | Set to <code>true</code> to mark the amount as an authorization only.<br /><br />**Allowable Values:**<br /><br /><code>true</code>, <code>false</code><br /><br />**Default value:**<br /><code>false</code> |
| card\_acceptor<br /><br />object<br /><br />Optional          | Contains attributes that describe the merchant.<br /><br />**Allowable Values:**<br /><br />A valid <code>card\_acceptor</code> object.                                                                       |
| card\_options<br /><br />object<br /><br />Optional           | Contains attributes that govern card usage.<br /><br />**Allowable Values:**<br /><br />A valid <code>card\_options</code> object.                                                                            |
| transaction\_options<br /><br />object<br /><br />Optional    | Contains additional information about the transaction.<br /><br />**Allowable Values:**<br /><br />A valid <code>transaction\_options</code> object.                                                          |
| pin<br /><br />string<br /><br />Optional                     | If the transaction involves a PIN-protected account, this is the PIN number.<br /><br />**Allowable Values:**<br /><br />4 char max                                                                           |
| cash\_back\_amount<br /><br />decimal<br /><br />Optional     | If the transaction simulates authorization for cash back, this is the cash amount.<br /><br />**Allowable Values:**<br /><br />Format: 0.00                                                                   |
| network\_fees<br /><br />array of objects<br /><br />Optional | Simulates various types of fees levied on the transaction.<br /><br />**Allowable Values:**<br /><br />A valid array of <code>network\_fees</code> objects.                                                   |
| webhook<br /><br />object<br /><br />Optional                 | Allows information to be posted asynchronously to endpoints hosted in your environment.<br /><br />**Allowable Values:**<br /><br />A valid <code>webhook</code> object.                                      |

<h3 id="_the_card_options_object">
  The card\_options object
</h3>

| Fields                                                 | Description                                                                                                                                                                                                                 |
| ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| cvv<br /><br />string<br /><br />Optional              | The CVV2 number for the card.<br /><br />**Allowable Values:**<br /><br />4 char max                                                                                                                                        |
| expiration<br /><br />string<br /><br />Optional       | The expiration date of the card.<br /><br />**Allowable Values:**<br /><br />mmdd                                                                                                                                           |
| billing\_address<br /><br />object<br /><br />Optional | Used for AVS (address verification system). The address-related fields in this object are verified against known values.<br /><br />**Allowable Values:**<br /><br />A valid <code>billing\_address</code> object.          |
| card\_present<br /><br />boolean<br /><br />Optional   | A value of <code>true</code> requires that the card be present for the transaction.<br /><br />**Allowable Values:**<br /><br /><code>true</code>, <code>false</code><br /><br />**Default value:**<br /><code>false</code> |

<h3 id="_the_card_options_billing_address_object">
  The card\_options.billing\_address object
</h3>

| Fields                                            | Description                                                                                                              |
| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| first\_name<br /><br />string<br /><br />Optional | Cardholder’s first name.<br /><br />**Allowable Values:**<br /><br />To pass AVS, must match the first name on record.   |
| last\_name<br /><br />string<br /><br />Optional  | Cardholder’s last name.<br /><br />**Allowable Values:**<br /><br />To pass AVS, must match the last name on record.     |
| address<br /><br />string<br /><br />Optional     | Cardholder’s street address.<br /><br />**Allowable Values:**<br /><br />To pass AVS, must match the address on record.  |
| zip<br /><br />string<br /><br />Optional         | Cardholder’s postal code.<br /><br />**Allowable Values:**<br /><br />To pass AVS, must match the postal code on record. |

<h3 id="_the_card_acceptor_object">
  The card\_acceptor object
</h3>

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

<h3 id="_the_transaction_options_object">
  The transaction\_options object
</h3>

| Fields                                                 | Description                                                                                            |
| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
| additional\_data<br /><br />string<br /><br />Optional | Additional information about the transaction.<br /><br />**Allowable Values:**<br /><br />255 char max |

<h3 id="_the_network_fees_object">
  The network\_fees object
</h3>

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

<h3 id="_the_webhook_object">
  The webhook object
</h3>

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

<h3 id="_sample_request_body">
  Sample request body
</h3>

```json JSON lines wrap theme={null}
{
  "amount": "10.00",
  "mid": "11111",
  "card_token": "4abf0fe1-2470-4cc8-b83e-c7db9a59bcdb",
  "transaction_options": {
    "additional_data": "my_additional data"
  },
  "card_acceptor": {
    "name": "Aegis Fleet Services",
    "address": "111 Main St",
    "city": "Berkeley",
    "state": "CA",
    "zip": "94702"
  },
  "webhook": {
    "endpoint": "https://mysecuredomain.com",
    "username": "my_username",
    "password": "My_passw0rd"
  }
}
```

<h3 id="_sample_response_body">
  Sample response body
</h3>

```json JSON expandable lines wrap theme={null}
{
  "type": "authorization",
  "state": "PENDING",
  "token": "9cbbdb91-81bb-4d26-acea-2734a67a96d2",
  "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": 20,
    "available_balance": 0,
    "credit_balance": 0,
    "pending_credits": 0,
    "impacted_amount": -10,
    "balances": {
      "USD": {
        "currency_code": "USD",
        "ledger_balance": 20,
        "available_balance": 0,
        "credit_balance": 0,
        "pending_credits": 0,
        "impacted_amount": -10
      }
    }
  },
  "gpa_order": {
    "token": "3f55f689-7622-4660-9ce9-209a9e6b1a5a",
    "amount": 10,
    "created_time": "2024-07-11T16:30:00Z",
    "last_modified_time": "2024-07-11T16:30:00Z",
    "transaction_token": "e8fdd8d3-cc41-4cd6-9df0-e1071993c633",
    "state": "PENDING",
    "response": {
      "code": "0000",
      "memo": "Approved or completed successfully"
    },
    "funding": {
      "amount": 10,
      "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": 202,
  "created_time": "2024-07-11T16:30:00Z",
  "user_transaction_time": "2024-07-11T16:30:00Z",
  "settlement_date": "2024-07-11T00:00:00Z",
  "request_amount": 10,
  "amount": 10,
  "issuer_interchange_amount": 0,
  "currency_code": "USD",
  "approval_code": "015382",
  "response": {
    "code": "0000",
    "memo": "Approved or completed successfully"
  },
  "network": "VISA",
  "subnetwork": "VISANET",
  "acquirer_fee_amount": 0,
  "acquirer": {
    "system_trace_audit_number": "049258"
  },
  "user": {
    "metadata": {}
  },
  "card": {
    "metadata": {}
  },
  "card_acceptor": {
    "mid": "11111",
    "mcc": "6411",
    "name": "Aegis Fleet Services",
    "street_address": "111 Main St",
    "city": "Berkeley",
    "state": "CA",
    "zip": "94702",
    "country_code": "USA"
  },
  "pos": {
    "partial_approval_capable": true,
    "purchase_amount_only": false,
    "is_recurring": false
  }
}
```

<h2 id="_simulate_authorization_advice">
  Simulate authorization advice
</h2>

**Action:** `POST`\
**Endpoint:** `/simulate/authorization/advice`

{/* <EndpointCard
title="Simulate authorization advice"
path="/simulate/authorization/advice"
method="post"
/> */}

An authorization advice allows an amount to be decreased after the authorization. This endpoint allows you to simulate post-swipe adjustments.

Simulate an `authorization.advice` type transaction by including the `original_transaction_token` and other authorization details in your request.

<h3 id="_body_field_details_2">
  Body field details
</h3>

| Fields                                                             | Description                                                                                                                                                              |
| ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| amount<br /><br />decimal<br /><br />Required                      | The amount of the transaction.<br /><br />**Allowable Values:**<br /><br />Format: 0.00                                                                                  |
| original\_transaction\_token<br /><br />string<br /><br />Required | The unique token that identifies the original transaction.<br /><br />**Allowable Values:**<br /><br />Existing transaction token.                                       |
| transaction\_options<br /><br />object<br /><br />Optional         | Contains additional information about the transaction.<br /><br />**Allowable Values:**                                                                                  |
| network\_fees<br /><br />array of objects<br /><br />Optional      | Simulates various types of fees levied on the transaction.<br /><br />**Allowable Values:**<br /><br />A valid array of <code>network\_fees</code> objects.              |
| webhook<br /><br />object<br /><br />Optional                      | Allows information to be posted asynchronously to endpoints hosted in your environment.<br /><br />**Allowable Values:**<br /><br />A valid <code>webhook</code> object. |

<h3 id="_the_transaction_options_object_2">
  The transaction\_options object
</h3>

| Fields                                                 | Description                                                                                            |
| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
| additional\_data<br /><br />string<br /><br />Optional | Additional information about the transaction.<br /><br />**Allowable Values:**<br /><br />255 char max |

<h3 id="_the_network_fees_object_2">
  The network\_fees object
</h3>

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

<h3 id="_the_webhook_object_2">
  The webhook object
</h3>

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

<h3 id="_sample_request_body_2">
  Sample request body
</h3>

```json JSON lines wrap theme={null}
{
  "amount": "1.00",
  "original_transaction_token": "9cbbdb91-81bb-4d26-acea-2734a67a96d2"
}
```

<h3 id="_sample_response_body_2">
  Sample response body
</h3>

```json JSON expandable lines wrap theme={null}
{
  "type": "authorization.advice",
  "state": "PENDING",
  "token": "78e61ee3-f811-49b0-ab58-1f485d353b3z",
  "user_token": "b2d2c739-a9fe-4af0-9f34-964aae4c3e31",
  "acting_user_token": "b2d2c739-a9fe-4af0-9f34-964aae4c3e31",
  "card_token": "4abf0fe1-2470-4cc8-b83e-c7db9a59bcdb",
  "preceding_related_transaction_token": "9cbbdb91-81bb-4d26-acea-2734a67a96d2",
  "gpa": {
    "currency_code": "USD",
    "ledger_balance": 11,
    "available_balance": 0,
    "credit_balance": 0,
    "pending_credits": 0,
    "impacted_amount": -1,
    "balances": {
      "USD": {
        "currency_code": "USD",
        "ledger_balance": 11,
        "available_balance": 0,
        "credit_balance": 0,
        "pending_credits": 0,
        "impacted_amount": -1
      }
    }
  },
  "gpa_order": {
    "token": "3f55f689-7622-4660-9ce9-209a9e6b1a5a",
    "amount": 9,
    "created_time": "2024-07-11T16:30:00Z",
    "last_modified_time": "2024-07-11T16:32:42Z",
    "transaction_token": "913ad4fe-dfec-46af-ae0f-dda84c90edd6",
    "state": "PENDING",
    "response": {
      "code": "0000",
      "memo": "Approved or completed successfully"
    },
    "funding": {
      "amount": 9,
      "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": 198,
  "created_time": "2024-07-11T16:32:42Z",
  "user_transaction_time": "2024-07-11T16:30:00Z",
  "settlement_date": "2024-07-11T00:00:00Z",
  "request_amount": 1,
  "amount": 1,
  "issuer_interchange_amount": 0,
  "currency_code": "USD",
  "approval_code": "015382",
  "response": {
    "code": "0000",
    "memo": "Approved or completed successfully"
  },
  "network": "VISA",
  "subnetwork": "VISANET",
  "acquirer_fee_amount": 0,
  "acquirer": {
    "institution_id_code": "000000",
    "system_trace_audit_number": "000001"
  },
  "user": {
    "metadata": {}
  },
  "card": {
    "metadata": {}
  },
  "card_acceptor": {
    "mid": "11111",
    "mcc": "6411",
    "name": "Aegis Fleet Services",
    "street_address": "111 Main St",
    "city": "Berkeley",
    "state": "CA",
    "zip": "94702",
    "country_code": "USA"
  },
  "pos": {
    "partial_approval_capable": false,
    "purchase_amount_only": false,
    "is_recurring": false
  }
}
```

<h2 id="_simulate_clearing_or_refund">
  Simulate clearing or refund
</h2>

**Action:** `POST`\
**Endpoint:** `/simulate/clearing`

{/* <EndpointCard
title="Simulate clearing or refund"
path="/simulate/clearing"
method="post"
/> */}

Simulate an `authorization.clearing` type transaction by including the `original_transaction_token` and `amount` in your request. To simulate a `refund` type transaction, set the `is_refund` field to `true`.

<h3 id="_body_field_details_3">
  Body field details
</h3>

| Fields                                                             | Description                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| original\_transaction\_token<br /><br />string<br /><br />Required | The unique identifier of the transaction to clear.<br /><br />**Allowable Values:**<br /><br />Existing transaction token.                                                                                                                                                                                                                                                                                                         |
| amount<br /><br />decimal<br /><br />Required                      | The amount of the transaction.<br /><br />**Allowable Values:**<br /><br />Format: 0.00                                                                                                                                                                                                                                                                                                                                            |
| force\_post<br /><br />boolean<br /><br />Optional                 | Set to <code>true</code> to simulate a forced clearing transaction.<br /><br />**NOTE:** If you set this field to <code>true</code>, you must also set the <code>original\_transaction\_token</code> field to an existing transaction token (the transaction does not need to be related).<br /><br />**Allowable Values:**<br /><br /><code>true</code>, <code>false</code><br /><br />**Default value:**<br /><code>false</code> |
| is\_refund<br /><br />boolean<br /><br />Optional                  | Set to <code>true</code> to simulate a refund transaction.<br /><br />**Allowable Values:**<br /><br /><code>true</code>, <code>false</code><br /><br />**Default value:**<br /><code>false</code>                                                                                                                                                                                                                                 |
| mid<br /><br />string<br /><br />Optional                          | Merchant Identification number.<br /><br />**Allowable Values:**<br /><br />50 char max                                                                                                                                                                                                                                                                                                                                            |
| card\_acceptor<br /><br />object<br /><br />Optional               | Contains attributes that describe the merchant.<br /><br />**Allowable Values:**                                                                                                                                                                                                                                                                                                                                                   |
| network\_fees<br /><br />array of objects<br /><br />Optional      | Simulates various types of fees levied on the transaction.<br /><br />**Allowable Values:**<br /><br />A valid array of <code>network\_fees</code> objects.                                                                                                                                                                                                                                                                        |
| webhook<br /><br />object<br /><br />Optional                      | Allows information to be posted asynchronously to endpoints hosted in your environment.<br /><br />**Allowable Values:**<br /><br />A valid <code>webhook</code> object.                                                                                                                                                                                                                                                           |

<h3 id="_the_card_acceptor_object_2">
  The card\_acceptor object
</h3>

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

<h3 id="_the_network_fees_object_3">
  The network\_fees object
</h3>

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

<h3 id="_the_webhook_object_3">
  The webhook object
</h3>

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

<h3 id="_sample_request_body_3">
  Sample request body
</h3>

Send the following request to simulate an `authorization.clearing` type transaction.

```json JSON lines wrap theme={null}
{
  "amount": "2.00",
  "original_transaction_token": "78e61ee3-f811-49b0-ab58-1f485d353b3z"
}
```

Send the following request to simulate a `refund` type transaction.

```json JSON lines wrap theme={null}
{
  "amount": "2.00",
  "original_transaction_token": "ebc1aa7d-0d9d-4205-b963-64693364e52d",
  "is_refund": true
}
```

<h3 id="_sample_response_body_3">
  Sample response body
</h3>

The following response shows an `authorization.clearing` type transaction.

```json JSON expandable lines wrap theme={null}
{
  "type": "authorization.clearing",
  "state": "COMPLETION",
  "token": "2b7e3730-92e8-49dc-91c3-10a9186b79d1",
  "user_token": "b2d2c739-a9fe-4af0-9f34-964aae4c3e31",
  "acting_user_token": "b2d2c739-a9fe-4af0-9f34-964aae4c3e31",
  "card_token": "4abf0fe1-2470-4cc8-b83e-c7db9a59bcdb",
  "preceding_related_transaction_token": "78e61ee3-f811-49b0-ab58-1f485d353b3z",
  "gpa": {
    "currency_code": "USD",
    "ledger_balance": 10,
    "available_balance": 0,
    "credit_balance": 0,
    "pending_credits": 0,
    "impacted_amount": -2,
    "balances": {
      "USD": {
        "currency_code": "USD",
        "ledger_balance": 10,
        "available_balance": 0,
        "credit_balance": 0,
        "pending_credits": 0,
        "impacted_amount": -2
      }
    }
  },
  "gpa_order": {
   "token": "3f55f689-7622-4660-9ce9-209a9e6b1a5a",
    "amount": 2,
    "created_time": "2024-07-11T16:30:00Z",
    "last_modified_time": "2024-07-11T16:35:56Z",
    "transaction_token": "1037",
    "state": "COMPLETION",
    "response": {
      "code": "0000",
      "memo": "Approved or completed successfully"
    },
    "funding": {
      "amount": 2,
      "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": 196,
  "created_time": "2024-07-11T16:35:56Z",
  "user_transaction_time": "2024-07-11T16:30:00Z",
  "settlement_date": "2024-07-11T00:00:00Z",
  "request_amount": 2,
  "amount": 2,
  "issuer_interchange_amount": 0,
  "currency_code": "USD",
  "approval_code": "015382",
  "response": {
    "code": "0000",
    "memo": "Approved or completed successfully"
  },
  "network": "VISA",
  "subnetwork": "VISANET",
  "acquirer_fee_amount": 0,
  "acquirer": {
    "institution_id_code": "000000",
    "system_trace_audit_number": "000002"
  },
  "user": {
    "metadata": {}
  },
  "card": {
    "metadata": {}
  },
  "card_acceptor": {
    "mid": "11111",
    "mcc": "6411",
    "name": "Aegis Fleet Services",
    "street_address": "111 Main St",
    "city": "Berkeley",
    "state": "CA",
    "zip": "94702",
    "country_code": "USA"
  },
    "pos": {
    "partial_approval_capable": false,
    "purchase_amount_only": false,
    "is_recurring": false
  }
}
```

The following response shows a `refund` type transaction.

```json JSON expandable lines wrap theme={null}
{
  "type": "refund",
  "state": "COMPLETION",
  "token": "8318385b-e1f5-4139-a289-0036d1e4fd3b",
  "user_token": "25380999-767d-4251-9270-9d1343217694",
  "acting_user_token": "25380999-767d-4251-9270-9d1343217694",
  "card_token": "98bf1581-7cfb-4184-992f-586d6a1d0eec",
  "gpa": {
    "currency_code": "USD",
    "ledger_balance": 20,
    "available_balance": 0,
    "credit_balance": 0,
    "pending_credits": 0,
    "impacted_amount": 2,
    "balances": {
      "USD": {
        "currency_code": "USD",
        "ledger_balance": 20,
        "available_balance": 0,
        "credit_balance": 0,
        "pending_credits": 0,
        "impacted_amount": 2
      }
    }
  },
  "duration": 150,
  "created_time": "2024-02-12T22:32:25Z",
  "user_transaction_time": "2024-02-12T22:32:25Z",
  "settlement_date": "2024-02-12T00:00:00Z",
  "request_amount": 2,
  "amount": 2,
  "currency_code": "USD",
  "approval_code": "536048",
  "response": {
    "code": "0000",
    "memo": "Approved or completed successfully"
  },
  "gpa_order_unload": {
    "token": "2c6af635-0c71-43bb-a1c8-94d0143e3d6c",
    "amount": 2,
    "created_time": "2024-02-12T22:32:25Z",
    "last_modified_time": "2024-02-12T22:32:26Z",
    "transaction_token": "11ad414a-2678-4d91-aef1-a10d3b08da64",
    "state": "COMPLETION",
    "response": {
      "code": "0000",
      "memo": "Approved or completed successfully"
    },
    "funding": {
      "amount": 2,
      "source": {
        "type": "program",
        "token": "**********6b51",
        "active": true,
        "name": "PFS for simulating transactions",
        "is_default_account": false,
        "created_time": "2024-01-28T19:20:33Z",
        "last_modified_time": "2024-01-28T19:20:33Z"
      }
    },
    "funding_source_token": "**********6b51"
  },
  "network": "VISA",
  "subnetwork": "VISANET",
  "acquirer_fee_amount": 0,
  "acquirer": {
    "institution_id_code": "000000",
    "system_trace_audit_number": "000005"
  },
  "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": {
    "partial_approval_capable": false,
    "purchase_amount_only": false,
    "is_recurring": false
  }
}
```

<h2 id="_simulate_financial">
  Simulate financial
</h2>

**Action:** `POST`\
**Endpoint:** `/simulate/financial`

{/* <EndpointCard
title="Simulate financial"
path="/simulate/financial"
method="post"
/> */}

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.

<h3 id="_body_field_details_4">
  Body field details
</h3>

| Fields                                                     | Description                                                                                                                                                                                                   |
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| amount<br /><br />decimal<br /><br />Required              | The transaction amount.<br /><br />**Allowable Values:**<br /><br />Format: 0.00                                                                                                                              |
| mid<br /><br />string<br /><br />Required                  | Merchant Identification number<br /><br />**Allowable Values:**<br /><br />50 char max                                                                                                                        |
| card\_token<br /><br />string<br /><br />Required          | The unique identifier of the card used in the transaction.<br /><br />**Allowable Values:**<br /><br />Existing card token.                                                                                   |
| pin<br /><br />string<br /><br />Optional                  | The PIN number for the associated card, if required.<br /><br />**Allowable Values:**<br /><br />4 char max                                                                                                   |
| is\_pre\_auth<br /><br />boolean<br /><br />Optional       | Set to <code>true</code> to mark the amount as an authorization only.<br /><br />**Allowable Values:**<br /><br /><code>true</code>, <code>false</code><br /><br />**Default value:**<br /><code>false</code> |
| cash\_back\_amount<br /><br />decimal<br /><br />Optional  | The cash-back amount.<br /><br />**Allowable Values:**<br /><br />Format: 0.00                                                                                                                                |
| transaction\_options<br /><br />object<br /><br />Optional | Contains additional information about the transaction.<br /><br />**Allowable Values:**<br /><br />A valid <code>transaction\_options</code> object.                                                          |
| card\_acceptor<br /><br />object<br /><br />Optional       | Contains attributes that describe the merchant.<br /><br />**Allowable Values:**<br /><br />A valid <code>card\_acceptor</code> object.                                                                       |
| webhook<br /><br />object<br /><br />Optional              | Allows information to be posted asynchronously to endpoints hosted in your environment.<br /><br />**Allowable Values:**<br /><br />A valid <code>webhook</code> object.                                      |

<h3 id="_the_card_acceptor_object_3">
  The card\_acceptor object
</h3>

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

<h3 id="_the_transaction_options_object_3">
  The transaction\_options object
</h3>

| Fields                                                 | Description                                                                                                                                                                                    |
| ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| additional\_data<br /><br />string<br /><br />Optional | Attribute of the transaction\_options object. Contains additional information about the transaction.<br /><br />**Allowable Values:**<br /><br />A valid <code>additional\_data</code> object. |

<h3 id="_the_webhook_object_4">
  The webhook object
</h3>

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

<h3 id="_sample_request_body_4">
  Sample request body
</h3>

```json JSON lines wrap theme={null}
{
  "amount": "2.50",
  "mid": "11111",
  "card_token": "4abf0fe1-2470-4cc8-b83e-c7db9a59bcdb",
  "is_pre_auth": false
}
```

<h3 id="_sample_response_body_4">
  Sample response body
</h3>

```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
  }
}
```

<h2 id="_simulate_financial_advice">
  Simulate financial advice
</h2>

**Action:** `POST`\
**Endpoint:** `/simulate/financial/advice`

{/* <EndpointCard
title="Simulate financial advice"
path="/simulate/financial/advice"
method="post"
/> */}

Simulate a financial advice by including the `original_transaction_token` and other authorization details in JSON format in the body of the request.

<h3 id="_body_field_details_5">
  Body field details
</h3>

| Fields                                                             | Description                                                                                                                                                              |
| ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| amount<br /><br />decimal<br /><br />Required                      | The transaction amount.<br /><br />**Allowable Values:**<br /><br />Format: 0.00                                                                                         |
| original\_transaction\_token<br /><br />string<br /><br />Required | The unique identifier of the original transaction.<br /><br />**Allowable Values:**<br /><br />Existing transaction token.                                               |
| transaction\_options<br /><br />object<br /><br />Optional         | Contains additional information about the transaction.<br /><br />**Allowable Values:**<br /><br />A valid <code>transaction\_options</code> object.                     |
| network\_fees<br /><br />array of objects<br /><br />Optional      | Simulates various types of fees levied on the transaction.<br /><br />**Allowable Values:**<br /><br />A valid array of <code>network\_fees</code> objects.              |
| webhook<br /><br />object<br /><br />Optional                      | Allows information to be posted asynchronously to endpoints hosted in your environment.<br /><br />**Allowable Values:**<br /><br />A valid <code>webhook</code> object. |

<h3 id="_the_transaction_options_object_4">
  The transaction\_options object
</h3>

| Fields                                                 | Description                                                                                                                                                                                                 |
| ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| additional\_data<br /><br />string<br /><br />Optional | Attribute of the <code>transaction\_options</code> object. Contains additional information about the transaction.<br /><br />**Allowable Values:**<br /><br />A valid <code>additional\_data</code> object. |

<h3 id="_the_network_fees_object_4">
  The network\_fees object
</h3>

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

<h3 id="_the_webhook_object_5">
  The webhook object
</h3>

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

<h3 id="_sample_request_body_5">
  Sample request body
</h3>

```json JSON lines wrap theme={null}
{
  "amount": "1.00",
  "original_transaction_token": "0ae44166-058d-4882-b39f-13fea8c6e387"
}
```

<h3 id="_sample_response_body_5">
  Sample response body
</h3>

The following response shows a `pindebit.authorization.clearing` type transaction.

```json JSON expandable lines wrap theme={null}
{
  "type": "pindebit.authorization.clearing",
  "state": "COMPLETION",
  "token": "78382109-7dbe-4bf9-9f0c-88ffba67288a",
  "user_token": "b2d2c739-a9fe-4af0-9f34-964aae4c3e31",
  "acting_user_token": "b2d2c739-a9fe-4af0-9f34-964aae4c3e31",
  "card_token": "4abf0fe1-2470-4cc8-b83e-c7db9a59bcdb",
  "preceding_related_transaction_token": "0ae44166-058d-4882-b39f-13fea8c6e387",
  "gpa": {
    "currency_code": "USD",
    "ledger_balance": 10,
    "available_balance": 0,
    "credit_balance": 0,
    "pending_credits": 0,
    "impacted_amount": 1.5,
    "balances": {
      "USD": {
        "currency_code": "USD",
        "ledger_balance": 10,
        "available_balance": 0,
        "credit_balance": 0,
        "pending_credits": 0,
        "impacted_amount": 1.5
      }
    }
  },
  "gpa_order": {
    "token": "3a5c0005-1d66-4ed0-9b70-57229ae6a7d8",
    "amount": 1,
    "created_time": "2024-07-11T16:37:50Z",
    "last_modified_time": "2024-07-11T16:39:38Z",
    "transaction_token": "78382109-7dbe-4bf9-9f0c-88ffba67288a",
    "state": "COMPLETION",
    "response": {
      "code": "0000",
      "memo": "Approved or completed successfully"
    },
    "funding": {
      "amount": 1,
      "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": 167,
  "created_time": "2024-07-11T16:39:38Z",
  "user_transaction_time": "2024-07-11T16:37:50Z",
  "request_amount": 1,
  "amount": 1,
  "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": "000000",
    "system_trace_audit_number": "767425"
  },
  "user": {
    "metadata": {}
  },
  "card": {
    "metadata": {}
  },
  "card_acceptor": {
    "mid": "11111",
    "mcc": "00",
    "name": "Marqeta Storefront",
    "street_address": "330 Central Ave.",
    "city": "St. Petersburg",
    "state": "FL",
    "zip": "33705",
    "country_code": "USA"
  },
  "pos": {
    "partial_approval_capable": false,
    "purchase_amount_only": false,
    "is_recurring": false
  }
}
```

<h2 id="_simulate_balance_inquiry">
  Simulate balance inquiry
</h2>

**Action:** `POST`\
**Endpoint:** `/simulate/financial/balanceinquiry`

{/* <EndpointCard
title="Simulate balance inquiry"
path="/simulate/financial/balanceinquiry"
method="post"
/> */}

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

<h3 id="_body_field_details_6">
  Body field details
</h3>

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

<h3 id="_the_card_acceptor_object_4">
  The card\_acceptor object
</h3>

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

<h3 id="_the_network_fees_object_5">
  The network\_fees object
</h3>

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

<h3 id="_the_webhook_object_6">
  The webhook object
</h3>

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

<h3 id="_sample_request_body_6">
  Sample request body
</h3>

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

<h3 id="_sample_response_body_6">
  Sample response body
</h3>

```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
  }
}
```

<h2 id="_simulate_atm_withdrawal">
  Simulate ATM withdrawal
</h2>

**Action:** `POST`\
**Endpoint:** `/simulate/financial/withdrawal`

{/* <EndpointCard
title="Simulate ATM withdrawal"
path="/simulate/financial/withdrawal"
method="post"
/> */}

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

<h3 id="_body_field_details_7">
  Body field details
</h3>

| Fields                                               | Description                                                                                                                                                              |
| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| mid<br /><br />string<br /><br />Required            | Merchant Identification number.<br /><br />**Allowable Values:**<br /><br />50 char max                                                                                  |
| card\_token<br /><br />string<br /><br />Required    | The unique identifier of the card used in the transaction.<br /><br />**Allowable Values:**<br /><br />Existing card token.                                              |
| pin<br /><br />string<br /><br />Optional            | The PIN number for the associated card, if required.<br /><br />**Allowable Values:**<br /><br />4 char max                                                              |
| account\_type<br /><br />string<br /><br />Required  | The type of account – checking, savings, credit card.<br /><br />**Allowable Values:**<br /><br />checking, savings, credit                                              |
| amount<br /><br />decimal<br /><br />Required        | The amount of money to withdraw.<br /><br />**Allowable Values:**<br /><br />Format: 0.00                                                                                |
| card\_acceptor<br /><br />object<br /><br />Optional | Contains attributes that describe the merchant.<br /><br />**Allowable Values:**<br /><br />A valid <code>card\_acceptor</code> object.                                  |
| webhook<br /><br />object<br /><br />Optional        | Allows information to be posted asynchronously to endpoints hosted in your environment.<br /><br />**Allowable Values:**<br /><br />A valid <code>webhook</code> object. |

<h3 id="_the_card_acceptor_object_5">
  The card\_acceptor object
</h3>

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

<h3 id="_the_webhook_object_7">
  The webhook object
</h3>

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

<h3 id="_sample_request_body_7">
  Sample request body
</h3>

```json JSON lines wrap theme={null}
{
  "mid": "11111",
  "account_type": "savings",
  "card_token": "f9c00b07-be2d-4240-ad89-98a0595fc3a2",
  "amount": "1.00"
}
```

<h3 id="_sample_response_body_7">
  Sample response body
</h3>

```json JSON expandable lines wrap theme={null}
{
  "type": "pindebit.atm.withdrawal",
  "state": "COMPLETION",
  "token": "d566329d-4886-4170-a42a-337deb1acaa2",
  "user_token": "b2d2c739-a9fe-4af0-9f34-964aae4c3e31",
  "acting_user_token": "b2d2c739-a9fe-4af0-9f34-964aae4c3e31",
  "card_token": "f9c00b07-be2d-4240-ad89-98a0595fc3a2",
  "gpa": {
    "currency_code": "USD",
    "ledger_balance": 10,
    "available_balance": 0,
    "credit_balance": 0,
    "pending_credits": 0,
    "impacted_amount": -1,
    "balances": {
      "USD": {
        "currency_code": "USD",
        "ledger_balance": 10,
        "available_balance": 0,
        "credit_balance": 0,
        "pending_credits": 0,
        "impacted_amount": -1
      }
    }
  },
  "gpa_order": {
    "token": "d5f0486a-e831-4926-9e59-47427948d68d",
    "amount": 1,
    "created_time": "2024-07-11T19:45:22Z",
    "last_modified_time": "2024-07-11T19:45:22Z",
    "transaction_token": "a870af0e-f98e-40d3-a8d2-350d015d69f9",
    "state": "COMPLETION",
    "response": {
      "code": "0000",
      "memo": "Approved or completed successfully"
    },
    "funding": {
      "amount": 1,
      "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": 129,
  "created_time": "2024-07-11T19:45:22Z",
  "user_transaction_time": "2024-07-11T19:45:22Z",
  "request_amount": 1,
  "amount": 1,
  "issuer_interchange_amount": 0,
  "currency_code": "USD",
  "approval_code": "693945",
  "response": {
    "code": "0000",
    "memo": "Approved or completed successfully"
  },
  "network": "VISA",
  "subnetwork": "VISANET",
  "acquirer_fee_amount": 0,
  "acquirer": {
    "institution_id_code": "59103660914",
    "retrieval_reference_number": "492752528413",
    "system_trace_audit_number": "977404"
  },
  "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
  }
}
```

<h2 id="_simulate_reversal">
  Simulate reversal
</h2>

**Action:** `POST`\
**Endpoint:** `/simulate/reversal`

{/* <EndpointCard
title="Simulate reversal"
path="/simulate/reversal"
method="post"
/> */}

A reversal releases the hold that was placed on account funds by an authorization, thus returning the funds to the account.

Simulate an `authorization.reversal` type transaction by including the `original_transaction_token` and `amount` in your request.

<h3 id="_body_field_details_8">
  Body field details
</h3>

| Fields                                                             | Description                                                                                                                                                              |
| ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| original\_transaction\_token<br /><br />string<br /><br />Required | The unique identifier of the transaction to reverse.<br /><br />**Allowable Values:**<br /><br />Existing transaction token.                                             |
| amount<br /><br />decimal<br /><br />Required                      | The amount of the transaction.<br /><br />**Allowable Values:**<br /><br />Format: 0.00                                                                                  |
| network\_fees<br /><br />array of objects<br /><br />Optional      | Simulates various types of fees levied on the transaction.<br /><br />**Allowable Values:**<br /><br />A valid array of <code>network\_fees</code> objects.              |
| webhook<br /><br />object<br /><br />Optional                      | Allows information to be posted asynchronously to endpoints hosted in your environment.<br /><br />**Allowable Values:**<br /><br />A valid <code>webhook</code> object. |

<h3 id="_the_network_fees_object_6">
  The network\_fees object
</h3>

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

<h3 id="_the_webhook_object_8">
  The webhook object
</h3>

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

<h3 id="_sample_request_body_8">
  Sample request body
</h3>

```json JSON lines wrap theme={null}
{
  "amount": "10.00",
  "original_transaction_token": "94c97e14-7915-4806-a609-dbb02c35c413"
}
```

<h3 id="_sample_response_body_8">
  Sample response body
</h3>

```json JSON expandable lines wrap theme={null}
{
  "type": "authorization.reversal",
  "state": "CLEARED",
  "token": "1049",
  "user_token": "b2d2c739-a9fe-4af0-9f34-964aae4c3e31",
  "acting_user_token": "b2d2c739-a9fe-4af0-9f34-964aae4c3e31",
  "card_token": "f9c00b07-be2d-4240-ad89-98a0595fc3a2",
  "preceding_related_transaction_token": "210e81f1-9604-4c47-b28c-8c436740014e",
  "gpa": {
    "currency_code": "USD",
    "ledger_balance": 10,
    "available_balance": 0,
    "credit_balance": 0,
    "pending_credits": 0,
    "impacted_amount": 10,
    "balances": {
      "USD": {
        "currency_code": "USD",
        "ledger_balance": 10,
        "available_balance": 0,
        "credit_balance": 0,
        "pending_credits": 0,
        "impacted_amount": 10
      }
    }
  },
  "gpa_order": {
    "token": "d2cb5eb3-6d76-4d82-b5e1-85d948cde9f0",
    "amount": 10,
    "created_time": "2024-07-11T19:48:08Z",
    "last_modified_time": "2024-07-11T19:48:33Z",
    "transaction_token": "c4a491a3-284e-45c6-81db-0e9d1e6c7e72",
    "state": "REVERSED",
    "response": {
      "code": "0000",
      "memo": "Approved or completed successfully"
  },
    "funding": {
      "amount": 10,
      "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": 113,
  "created_time": "2024-07-11T19:48:33Z",
  "user_transaction_time": "2024-07-11T19:48:08Z",
  "request_amount": 10,
  "amount": 10,
  "issuer_interchange_amount": 0,
  "currency_code": "USD",
  "approval_code": "593222",
  "response": {
    "code": "0000",
    "memo": "Approved or completed successfully"
  },
 "network": "VISA",
  "subnetwork": "VISANET",
  "acquirer_fee_amount": 0,
  "acquirer": {
    "system_trace_audit_number": "199288"
  },
  "user": {
    "metadata": {}
  },
  "card": {
    "metadata": {}
  },
  "card_acceptor": {
    "mid": "11111",
    "mcc": "6411",
    "name": "Aegis Fleet Services",
    "street_address": "111 Main St",
    "city": "Berkeley",
    "state": "CA",
    "zip": "94702",
    "country_code": "USA"
  },
  "pos": {
    "partial_approval_capable": false,
    "purchase_amount_only": false,
    "is_recurring": false
  }
}
```

<h2 id="_simulate_ach_receiving">
  Simulate ACH Receiving
</h2>

**Action:** `POST`\
**Endpoint:** `/simulate/directdeposits`

{/* <EndpointCard
title="Simulate ACH Receiving"
path="/simulate/directdeposits"
method="post"
/> */}

Simulate a direct deposit of funds to a user account by including the deposit account number of the account to be debited or credited. You can find the account number in the `account_number` field of the response when you create a new deposit account. Alternatively, you can retrieve it by sending a `GET` request to the `/depositaccounts/user/{user_token}` endpoint. For more information, see [ACH Receiving](/core-api/ach-receiving/).

If `type` is `CREDIT`, the response contains a simulated transaction message (i.e., a direct deposit record) and the corresponding transaction that is created is of the type `directdeposit.credit.pending`. If `type` is `DEBIT`, the response contains a simulated transaction message (i.e., a direct deposit record) and the corresponding transaction that is created is of the type `directdeposit.debit.pending`.

This endpoint returns a `directdeposit` object with a direct deposit token, and its state will be `PENDING`. Calling this endpoint does not return the `transactions` object; you cannot take the `token` from the response and look up the direct deposit record using the `/transactions` endpoint. You can, however, look it up by sending a `GET` request to the `/directdeposits/token` endpoint.

<Note>
  **Note**\
  You can use this endpoint to simulate `directdeposit.credit.pending` and `directdeposit.debit.pending` events only. Simulating other types of events is not currently supported.
</Note>

<h3 id="_body_field_details_9">
  Body field details
</h3>

| Fields                                                 | Description                                                                                                                                                                                                                                                                                                            |
| ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| amount<br /><br />string<br /><br />Required           | The amount of the direct deposit.<br /><br />**Allowable Values:**<br /><br />Format: 0.00                                                                                                                                                                                                                             |
| type<br /><br />string<br /><br />Required             | Indicates whether the direct deposit is a debit or credit.<br /><br />**Allowable Values:**<br /><br /><code>CREDIT</code>, <code>DEBIT</code>                                                                                                                                                                         |
| account\_number<br /><br />string<br /><br />Required  | The account number of the user to debit or credit.<br /><br />**Allowable Values:**<br /><br />An account number belonging to an active user with an active card.<br /><br />Send a <code>GET</code> request to the <code>/depositaccounts/user/{user_token}</code> endpoint to retrieve the account number of a user. |
| settlement\_date<br /><br />string<br /><br />Required | The date on which the credit or debit will be applied.<br /><br />**Allowable Values:**<br /><br />Format: yyyy-MM-dd                                                                                                                                                                                                  |

<h3 id="_sample_requests">
  Sample requests
</h3>

Send the following request to simulate a `directdeposit.credit.pending` type transaction.

```json JSON lines wrap theme={null}
{
  "amount": 10,
  "type": "CREDIT",
  "account_number": "1323975092920",
  "settlement_date": "2024-03-23T19:56:53.440Z"
}
```

Send the following request to simulate a `directdeposit.debit.pending` type transaction.

```json JSON lines wrap theme={null}
{
  "amount": 10,
  "type": "DEBIT",
  "account_number": "1323975092920",
  "settlement_date": "2024-03-23T19:56:53.440Z"
}
```

<h3 id="_sample_responses">
  Sample responses
</h3>

The following response shows a `directdeposit.credit.pending` type transaction.

Note that the `state` of the direct deposit is `PENDING`. You now need to use the [Direct Deposit Transitions](/core-api/ach-receiving/#post_directdeposits_transitions) endpoint `/directdeposits/transitions` to transition the pending direct deposit to either `APPLIED` (to settle the direct deposit) or `REVERSED` (to fail the direct deposit).

```json JSON lines wrap theme={null}
{
  "token": "a1aee855-0fe7-4a97-9c08-5c14d09f2478",
  "amount": 10,
  "type": "CREDIT",
  "state": "PENDING",
  "settlement_date": "2024-03-23T19:56:53Z",
  "state_reason": "Newly created",
  "direct_deposit_account_token": "4e7953ba-0be5-4a85-996f-e24d7763552f",
  "user_token": "506d8154-c01a-4480-81c9-04a0f4b451c1",
  "created_time": "2024-03-23T20:35:28Z",
  "last_modified_time": "2024-03-23T20:35:28Z"
}
```

The following response shows a `directdeposit.debit.pending` type transaction.

Note that the `state` of the direct deposit is `PENDING`. You now need to use the [Direct Deposit Transitions](/core-api/ach-receiving/#post_directdeposits_transitions) endpoint `/directdeposits/transitions` to transition the pending direct deposit to either `APPLIED` (to settle the direct deposit) or `REVERSED` (to fail the direct deposit).

```json JSON lines wrap theme={null}
{
  "token": "246e3441-adbd-4481-899c-e0a2a141c107",
  "amount": 5.0,
  "type": "DEBIT",
  "state": "PENDING",
  "settlement_date": "2024-03-12T19:56:53Z",
  "state_reason": "Newly created",
  "direct_deposit_account_token": "1741ad42-aac9-485a-8799-3c2edc2385f8",
  "user_token": "6252d4d8-d3e4-499b-a8dc-0c9bc2c351ca",
  "created_time": "2024-03-12T19:47:15Z",
  "last_modified_time": "2024-03-12T19:47:15Z"
}
```

<h2 id="_simulate_oct">
  Simulate OCT
</h2>

**Action:** `POST`\
**Endpoint:** `/simulate/financial/originalcredit`

{/* <EndpointCard
title="Simulate OCT"
path="/simulate/financial/originalcredit"
method="post"
/> */}

This Original Credit Transaction (OCT) enables the cardholder to receive funds on the specified card from an external source via the card network. Use this endpoint to simulate a transaction that is similar to a wire transfer and not linked to any purchase.

Simulate an OCT by including the `card_token`, `amount`, `mid`, and `type` in your request.

<h3 id="_body_field_details_10">
  Body field details
</h3>

| Fields                                                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| amount<br /><br />decimal<br /><br />Required          | Amount of the transaction.<br /><br />**Allowable Values:**<br /><br />Format: 0.00<br /><br />Must be greater than zero                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| card\_token<br /><br />string<br /><br />Required      | Unique identifier of the card receiving original credit.<br /><br />**Allowable Values:**<br /><br />Existing card token.<br /><br />36 char max                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| mid<br /><br />string<br /><br />Required              | Merchant Identifier of the merchant participating in the transaction.<br /><br />**Allowable Values:**<br /><br />50 char max                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| card\_acceptor<br /><br />object<br /><br />Optional   | Contains attributes that describe the merchant.<br /><br />**Allowable Values:**<br /><br />A valid <code>card\_acceptor</code> object.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| screening\_score<br /><br />string<br /><br />Optional | Sanctions screening score to assist with meeting Anti-Money Laundering (AML) obligations.<br /><br />Higher scores indicate that the sender’s data more closely resembles an entry on the regulatory watchlist.<br /><br />**Allowable Values:**<br /><br />000-100 or 999<br /><br />Value of 999 means no score available.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| type<br /><br />string<br /><br />Required             | Type of original credit transaction.<br /><br />**Allowable Values:**<br /><br /><code>account\_to\_account</code>, <code>person\_to\_person</code>, <code>wallet\_transfer</code>, <code>money\_transfer\_by\_bank</code>, <code>business\_to\_business</code>, <code>disbursement</code>, <code>government\_disbursement</code>, <code>gambling\_payout</code>, <code>loyalty</code>, <code>merchant\_disbursement</code>, <code>online\_gambling\_payout</code>, <code>pension\_disbursement</code>, <code>prepaid\_loads</code>, <code>card\_bill\_payment</code>, <code>bill\_payment</code>, <code>cash\_claim</code>, <code>cash\_in</code>, <code>cash\_out</code>, <code>mobile\_air\_time\_payment</code>, <code>money\_transfer\_by\_merchant</code>, <code>face\_to\_face\_merchant\_payment</code>, <code>government\_payment</code>, <code>payments\_goods\_services</code> |
| sender\_data<br /><br />object<br /><br />Optional     | Contains sender-related information.<br /><br />**Allowable Values:**<br /><br />A valid <code>sender\_data</code> object.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| webhook<br /><br />object<br /><br />Optional          | Allows information to be posted asynchronously to endpoints hosted in your environment.<br /><br />**Allowable Values:**<br /><br />A valid <code>webhook</code> object.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |

<h3 id="_the_card_acceptor_object_6">
  The card\_acceptor object
</h3>

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

<h3 id="_the_sender_data_object">
  The sender\_data object
</h3>

| Fields                                                          | Description                                                                                                                                                                                                                                                                                 |
| --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| sender\_name<br /><br />string<br /><br />Optional              | Sender full name.<br /><br />**Allowable Values:**<br /><br />255 char max                                                                                                                                                                                                                  |
| sender\_reference\_number<br /><br />string<br /><br />Optional | Transaction reference number provided by the originating bank used to uniquely identify the sender.<br /><br />**Allowable Values:**<br /><br />16 char max                                                                                                                                 |
| sender\_account\_number<br /><br />string<br /><br />Optional   | Sender’s simulated account number.<br /><br />**Allowable Values:**<br /><br />34 char max                                                                                                                                                                                                  |
| sender\_address<br /><br />string<br /><br />Optional           | Sender street address.<br /><br />**Allowable Values:**<br /><br />255 char max                                                                                                                                                                                                             |
| sender\_city<br /><br />string<br /><br />Optional              | Sender city.<br /><br />**Allowable Values:**<br /><br />36 char max                                                                                                                                                                                                                        |
| sender\_state<br /><br />string<br /><br />Optional             | Sender state.<br /><br />**Allowable Values:**<br /><br />2 char max                                                                                                                                                                                                                        |
| sender\_country<br /><br />string<br /><br />Optional           | Sender country.<br /><br />**Allowable Values:**<br /><br />40 char max                                                                                                                                                                                                                     |
| funding\_source<br /><br />string<br /><br />Optional           | Sender’s simulated account from which the OCT draws funds.<br /><br />**Allowable Values:**<br /><br /><code>credit</code>, <code>debit</code>, <code>prepaid</code>, <code>deposit\_account</code>, <code>cash</code>, <code>mobile\_money\_account</code>, <code>non\_visa\_credit</code> |

<h3 id="_the_webhook_object_9">
  The webhook object
</h3>

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

<h3 id="_sample_request_body_9">
  Sample request body
</h3>

Send the following request to simulate a `disbursement` type transaction.

```json JSON lines wrap theme={null}
{
  "amount": 10,
  "card_token": "ce2002fd-5e9a-4c9b-a82d-cc74da4e8280",
  "mid": "11111",
  "type": "disbursement"
}
```

<h3 id="_sample_response_body_9">
  Sample response body
</h3>

The following response simulates a `disbursement` type transaction.

```json JSON expandable lines wrap theme={null}
{
  "transaction": {
    "type": "original.credit.auth_plus_capture",
    "state": "COMPLETION",
    "token": "84f39ded-0700-41e5-911e-89215a77104c",
    "user_token": "fc7c4a77-f105-44b0-8424-f9f9c3d4d090",
    "acting_user_token": "fc7c4a77-f105-44b0-8424-f9f9c3d4d090",
    "card_token": "380e26fe-4f9f-4ee0-9fb8-e26062be8445",
    "original_credit": {
      "transaction_type": "disbursement"
    },
    "gpa": {
      "currency_code": "USD",
      "ledger_balance": 10,
      "available_balance": 10,
      "credit_balance": 0,
      "pending_credits": 0,
      "impacted_amount": 10,
      "balances": {
        "USD": {
          "currency_code": "USD",
          "ledger_balance": 10,
          "available_balance": 10,
          "credit_balance": 0,
          "pending_credits": 0,
          "impacted_amount": 10
        }
      }
    },
    "duration": 199,
    "created_time": "2024-07-08T23:47:04Z",
    "user_transaction_time": "2024-07-08T23:47:04Z",
    "request_amount": 10,
    "amount": 10,
    "currency_code": "USD",
    "approval_code": "206645",
    "response": {
      "code": "0000",
      "memo": "Approved or completed successfully"
    },
    "merchant": {
      "name": "John Doe Merchant Inc.",
      "active": true,
      "contact": "John D. Doe",
      "contact_email": "jdoe@domain.com",
      "longitude": 0,
      "latitude": 0,
      "address1": "180 Grand Avenue",
      "address2": "Suite 2303",
      "city": "Oakland",
      "state": "CA",
      "zip": "94612",
      "country": "USA",
      "token": "c0b3f6cd-146e-45a8-9440-efcce623dd37",
      "partial_auth_flag": true,
      "created_time": "2024-02-14T00:57:02Z",
      "last_modified_time": "2024-02-14T00:57:02Z"
    },
    "store": {
      "name": "Aegis Fleet Services",
      "active": false,
      "longitude": 0,
      "latitude": 0,
      "address1": "111 Main St",
      "city": "Berkeley",
      "state": "CA",
      "zip": "94702",
      "token": "8f195870-94ce-4bfd-ac46-75a4fcf17500",
      "partial_auth_flag": true,
      "mid": "11111",
      "merchant_token": "c0b3f6cd-146e-45a8-9440-efcce623dd37",
      "partial_approval_capable": true,
      "keyed_auth_cvv_enforced": false,
      "created_time": "2024-02-14T01:18:38Z",
      "last_modified_time": "2024-02-14T01:18:38Z"
    },
    "network": "VISA",
    "subnetwork": "VISANET",
    "acquirer_fee_amount": 0,
    "acquirer": {
      "institution_id_code": "05779900106",
      "retrieval_reference_number": "726213433770",
      "system_trace_audit_number": "881236"
    },
    "fees": [
      {
        "type": "ISSUER_LOAD_SURCHARGE_FEE",
        "amount": 0
      }
    ],
    "user": {
      "metadata": {}
    },
    "card": {
      "last_four": "3201",
      "metadata": {}
    },
    "issuer_received_time": "2024-07-08T23:47:04.577Z",
    "issuer_payment_node": "715de90f8dd6eeb2d87251dd691d7de2",
    "card_acceptor": {
      "mid": "11111",
      "mcc": "00",
      "country_code": "USA"
    },
    "pos": {
      "terminal_id": "TR100000",
      "partial_approval_capable": false,
      "purchase_amount_only": false,
      "is_recurring": false
    }
  },
    "raw_iso8583": {
      "0": "2210",
      "2": "1111119311153201",
      "3": "260000",
      "4": 10,
      "5": 10,
      "7": "0708234704",
      "11": "881236",
      "12": "114704",
      "13": "0708",
      "14": "2307",
      "15": "0708",
      "17": "0708",
      "22": "10000000020000000100000001000000",
      "26": "00",
      "32": "05779900106",
      "33": "13747132476",
      "37": "726213433770",
      "38": "206645",
      "39": "0000",
      "41": "TR100000",
      "42": "11111",
      "43": {
        "7": "840"
      },
      "44": {
        "1": "Approved or completed successfully",
        "3": "00",
        "4": "Approved or completed successfully"
      },
      "48": "OCT        07012020",
      "50": "840",
      "54": "00028402C00000000100000018402C000000001000",
      "58": "00000000022",
      "59": "0000000",
      "63": "VISA",
      "112": {
        "101": "10.00",
        "102": "10.00",
        "103": "840"
      },
      "113": {
        "2": "106",
        "32": "VISANET",
        "35": "API",
        "42": "DISBURSEMENT",
        "46": "true"
      },
      "123": "123 Main St.           "
    }
}
```


## Related topics

- [Core API Quick Start](/docs/developer-guides/core-api-quick-start.md)
- [Postman Collection for Simulations 2.0](/docs/core-api/postman-collection-simulations.md)
- [2023 Release Notes](/docs/developer-guides/release-notes-2023.md)
- [Building Your Powered By Marqeta Card Program](/docs/developer-guides/building-your-powered-card-program.md)
- [Building Your Managed By Marqeta Card Program](/docs/developer-guides/building-your-managed-card-program.md)
