Simulate clearing

Clearing Transaction

amount

Type: integer
Value: ≤ 2000000000

Amount (in cents) to clear. Typically this will match the amount in the original authorization, but can be higher or lower. The sign of this amount will automatically match the sign of the original authorization's amount. For example, entering 100 in this field will result in a -100 amount in the transaction, if the original authorization is a credit authorization.

If amount is not set, the full amount of the transaction will be cleared. This endpoint may be called multiple times against the same authorization to simulate a multiple-completion scenario, with each call creating a separate clearing event.

token

Type: uuid
Required: Yes

The transaction token returned from the /v1/simulate/authorize response.

Response Codes

201 OK

400 Bad Request

401 Unauthorized

Description Reason
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

404 Not Found

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/clearing \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{
  "amount": 0,
  "token": "fabd829d-7f7b-4432-a8f2-07ea4889aaac"
}'

Example Response

{
  "debugging_request_id": "3ec51ef1-b68d-4243-be6c-2204229b09cf"
}