Simulate credit authorization advice
Parameters
amount
- Type: integer
- Required: Yes
- Constraints: 0 to 2000000000
- Description: Amount (in cents). Any value entered will be converted into a negative amount in the simulated transaction. For example, entering 100 in this field will appear as a -100 amount in the transaction.
descriptor
- Type: string
- Required: Yes
- Constraints: length between 1 and 25
- Description: Merchant descriptor.
mcc
- Type: string
- Description: 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.
merchant_acceptor_id
- Type: string
- Constraints: length between 1 and 15
- Description: Unique identifier to identify the payment card acceptor.
merchant_acceptor_city
- Type: string
- Constraints: length ≤ 13
- Description: Merchant acceptor city.
merchant_acceptor_state
- Type: string
- Constraints: length ≤ 3
- Description: Merchant acceptor state/province (ISO 3166-2 subdivision code).
merchant_acceptor_country
- Type: string
- Constraints: length between 3 and 3
- Description: Merchant acceptor country code (ISO 3166-1 alpha-3).
pan
- Type: string
- Required: Yes
- Constraints: length between 16 and 16
- Description: Sixteen-digit card number.
Response Codes
201 OK
- Type: object
- Fields:
- debugging_request_id: uuid
- token: uuid
400 Bad Request
- Description: A parameter in the query given in the request does not match the valid queries for the endpoint.
401 Unauthorized
| Error |
Description |
| User has not been authenticated |
Invalid or missing API key |
| API key is not active |
The API key used is no longer active |
| Could not find API key |
The API key provided is not associated with any user |
| Please provide API key in Authorization header |
The Authorization header is not in the request |
| Please provide API key in the form Authorization: [api-key] |
The Authorization header is not formatted properly |
| Insufficient privileges. Issuing API key required |
Write access requires an Issuing API key. Reach out at lithic.com/contact |
| Insufficient privileges to create virtual cards. |
Creating virtual cards requires an additional privilege |
422 Unprocessable Entity
429 Too Many Requests
| Description |
Reason |
| Rate limited, too many requests per second |
User has exceeded their per second rate limit |
| Rate limited, reached daily limit |
User has exceeded their daily rate limit |
| Rate limited, too many keys tried |
One IP has queried too many different API keys |
Example Request
curl --request POST \
--url https://sandbox.lithic.com/v1/simulate/credit_authorization_advice \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{\n "amount": 3831,\n "descriptor": "COFFEE SHOP",\n "merchant_acceptor_id": "XRKGDPOWEWQRRWU",\n "merchant_acceptor_city": "SEATTLE",\n "merchant_acceptor_state": "WA",\n "merchant_acceptor_country": "USA",\n "pan": "4111111289144142"\n}'
Example Response
{
"debugging_request_id": "d31645af-da9e-4952-b7dc-3ffb06618b39",
"token": "fabd829d-7f7b-4432-a8f2-07ea4889aaac"
}