## Parameters

### amount
- **Type:** integer  
- **Required**  
- **Range:** 0 to 2000000000  
  
Amount (in cents) to authorize. For credit authorizations and financial credit authorizations, any value entered will be converted into a negative amount in the simulated transaction. For example, entering 100 in this field will result in a -100 amount in the transaction. For balance inquiries, this field must be set to 0.

### descriptor
- **Type:** string  
- **Required**  
- **Length:** 1 to 25  
  
Merchant descriptor.

### mcc
- **Type:** string  
  
Merchant category code for the transaction to be simulated. A four-digit number listed in ISO 18245.  
Supported merchant category codes can be found [here](https://docs.lithic.com/docs/transactions#merchant-category-codes-mccs).

### merchant_acceptor_id
- **Type:** string  
- **Length:** 1 to 15  
  
Unique identifier to identify the payment card acceptor.

### merchant_acceptor_city
- **Type:** string  
- **Length:** ≤ 13  
  
Merchant acceptor city

### merchant_acceptor_state
- **Type:** string  
- **Length:** ≤ 3  
  
Merchant acceptor state/province (ISO 3166-2 subdivision code)

### merchant_acceptor_country
- **Type:** string  
- **Length:** 3  
  
Merchant acceptor country code (ISO 3166-1 alpha-3)

### merchant_amount
- **Type:** integer  
  
Amount of the transaction to be simulated in currency specified in merchant_currency, including any acquirer fees.

### merchant_currency
- **Type:** string  
- **Length:** 3  
  
3-character alphabetic ISO 4217 currency code. Note: Simulator only accepts USD, GBP, EUR and defaults to GBP if another ISO 4217 code is provided

### pan
- **Type:** string  
- **Required**  
- **Length:** 16  
  
Sixteen digit card number.

### partial_approval_capable
- **Type:** boolean  
  
Set to true if the terminal is capable of partial approval otherwise false. Partial approval is when part of a transaction is approved and another payment must be used for the remainder.

### pin
- **Type:** string  
- **Length:** 4 to 12  
  
Simulate entering a PIN. If omitted, PIN check will not be performed.

### status
- **Type:** string  
- **Enum:**  
Defaults to AUTHORIZATION.
- **Values:**  
  - `AUTHORIZATION` is a dual message purchase authorization, meaning a subsequent clearing step is required to settle the transaction.  
  - `BALANCE_INQUIRY` is a $0 authorization requesting the balance held on the card, and is most often observed when a cardholder requests to view a card's balance at an ATM.  
  - `CREDIT_AUTHORIZATION` is a dual message request from a merchant to authorize a refund, meaning a subsequent clearing step is required to settle the transaction.  
  - `FINANCIAL_AUTHORIZATION` is a single message request from a merchant to debit funds immediately (such as an ATM withdrawal), and no subsequent clearing is required to settle the transaction.  
  - `FINANCIAL_CREDIT_AUTHORIZATION` is a single message request from a merchant to credit funds immediately, and no subsequent clearing is required to settle the transaction.

## Responses

### 200 OK
- **Type:** object  
- **Fields:**  
  - **debugging_request_id:** uuid  
    Debugging request ID to share with Lithic Support team.
  - **token:** uuid  
    A unique token to reference this transaction with later calls to void or clear the authorization.

### 400 Bad Request
- **Description:** A parameter in the query given in the request does not match the valid queries for the endpoint.

### 401 Unauthorized  
- **Description:** User has not been authenticated.

### 422 Unprocessable Entity

### 429 Too Many Requests  
- **Description:** Client has exceeded the number of allowed requests in a given time period.

## Example Request

```bash
curl --request POST \
     --url https://sandbox.lithic.com/v1/simulate/authorize \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '  
{  
  "amount": 3831,  
  "descriptor": "COFFEE SHOP",  
  "merchant_acceptor_city": "LOS ANGELES",  
  "merchant_acceptor_state": "CA",  
  "merchant_acceptor_country": "USA",  
  "pan": "4111111289144142",  
  "status": "AUTHORIZATION"  
}  
'  
```

## Example Response

```json
{  
  "debugging_request_id": "d31645af-da9e-4952-b7dc-3ffb06618b39",  
  "token": "fabd829d-7f7b-4432-a8f2-07ea4889aaac"  
}
```
