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

# Simulate authorization advice

> An authorization advice allows an amount to be decreased after the authorization.

POST/simulate/authorization/advice

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.

## Body field details

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

## The transaction\_options object

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

## The network\_fees object

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

## The webhook object

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

## Sample request body

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

## Sample response body

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


## Related topics

- [Simulate authorization advice](https://www.marqeta.com/docs/core-api/simulations-card-transactions/authorizations/simulate-authorization-advice-v2.md)
- [Authorization Simulations Overview](https://www.marqeta.com/docs/core-api/simulations-card-transactions/authorizations.md)
- [Simulating Transactions Overview](https://www.marqeta.com/docs/core-api/simulating-transactions.md)
- [Simulations 2.0 — Card Transactions Overview](https://www.marqeta.com/docs/core-api/simulations-card-transactions.md)
- [Simulate financial advice](https://www.marqeta.com/docs/core-api/simulating-transactions/simulate-financial-advice.md)
