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

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

POST/simulate/reversal

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.

## Body field details

| Fields | Description |
| - | - |
| original\_transaction\_token string  Required | The unique identifier of the transaction to reverse. **Allowable Values:**  Existing transaction token. |
| amount decimal  Required | The amount of the transaction. **Allowable Values:**  Format: 0.00 |
| 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 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": "10.00",
  "original_transaction_token": "94c97e14-7915-4806-a609-dbb02c35c413"
}
```

## Sample response body

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


## Related topics

- [Simulating Transactions Overview](https://www.marqeta.com/docs/core-api/simulating-transactions.md)
- [Simulate authorization reversal](https://www.marqeta.com/docs/core-api/simulations-card-transactions/authorizations/simulate-authorization-reversal.md)
- [Simulate AFT authorization reversal](https://www.marqeta.com/docs/core-api/simulations-card-transactions/account-funding-transactions/simulate-aft-authorization-reversal.md)
- [Simulate PIN-debit reversal](https://www.marqeta.com/docs/core-api/simulations-card-transactions/pin-debit/simulate-pin-debit-reversal.md)
- [Simulate refund authorization reversal](https://www.marqeta.com/docs/core-api/simulations-card-transactions/refunds/simulate-refund-authorization-reversal.md)
