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

# Simulate Card Transaction

> Sandbox-only test spend and credits on virtual cards

Use this endpoint to **test card spend and transaction history** without real merchant charges. PayVessel records the simulation via webhook and updates the card balance.

<Warning>
  **Sandbox only.** Not exposed in production. Your integration should only call this when using sandbox API keys and `https://sandbox.payvessel.com`.
</Warning>

## How it works

1. **Create and activate** a card ([Create a Card](/virtual-cards/create-customer-card), then poll [Get a Card](/virtual-cards/get-card) until `ACTIVE`).
2. **POST a simulation** with `amount` and `type` (`DEBIT` or `CREDIT`).
3. **PayVessel processes the event**: the transaction is recorded and the card balance is refreshed.
4. **Verify** with [Get Card Transactions](/virtual-cards/list-transactions).

## Request fields

| Field    | Required | Description                                         |
| -------- | -------- | --------------------------------------------------- |
| `amount` | Yes      | USD amount (e.g. `"1.50"`)                          |
| `type`   | No       | `DEBIT` (default) = spend; `CREDIT` = refund/credit |

## When to use

* End-to-end testing of spend notifications in your app
* QA of transaction lists and balances in sandbox
* Demo environments without real card networks

## Limitations

* Card must be **ACTIVE** (not pending activation)
* Balance shown in the response may change again after the webhook syncs
* Production requests return a validation error

<Card title="API Reference: Try it" icon="play" href="/api-reference/virtual-cards/mock-transaction">
  Run this endpoint in the browser (sandbox)
</Card>
