API Reference

/extraction/

This endpoint is the backbone of the credit card image data extraction process.

The extraction endpoint is used to process validated credit card images and extract readable fields like card number and expiration date. Although it is recommended to validate the image first using the /validation/ endpoint, this method can operate independently.

Request format

Request contains keys as described by the form on this page.

The request JSON body is split into three main sections:

  1. AcceptTermsAndConditions – must be set to true
  2. DataFields – contains the image and metadata
  3. Settings – optional flags to modify extraction behavior

Settings structure

Settings contains useful settings that tailor responses to your needs. Each used setting is as follows:

  1. ShouldReturnDocumentImage - indicates if the cropped image of the card should be returned (we recommend that this image is displayed to the user so the user can verify that the image was properly cropped)
  2. SkipDocumentSizeCheck - if set to true, any problems tied to input image size (card too far away from the camera or similar) will be added to warnings list and will not raise a BAD REQUEST 400 response
  3. SkipImageSizeCheck - if set to true, any problems tied to low image resolution will be added to warnings list and will not raise a BAD REQUEST 400 response
  4. CanStoreImages - allows the service to store the images that could be used for any troubleshooting or service improvements if set to true
  5. DontUseValidation - if set to true, the service runs one validation call prior to extraction and terminates the transaction if the image is inadequate, currently this option is true by default and extraction does not perform one additional validation call

Response

The service responds with JSON body containing extraction results as given below:

{
  "TransactionID": "<TRANSACTION-UUID>",
  "UploadedAt": "<TIMESTAMP>",
  "ProductName": "Scan App v<VERSION>",
  "Errors":["<ERROR1>", ...],
  "Warnings":["<WARNING1>", ...],
  "Status": 200,
  "Method": "Extraction",
  "InfoCode": <INFO-CODE>,
  "Data": {
    "CardNumber": {
      "Read": true,
      "Value": "1234 5678 9012 3456"
    },
    "ExpiryDate": {
      "Read": true,
      "Value": "12/28"
    },
    {
   	 …
     },
  },
  "ImageData": {
    "CreditCardImage": "<base64-encoded-cropped-image>"
  },
  "AnalysisTime": "693.21 ms"
  }

Response contains fields similar to the /validation endpoint with a couple of differences. You can check info codes and their meaning here

Response data

The most important response field is Data - a key-value dictionary where the keys are credit card fields (ex. name, surname, ...) and values are dictionaries with key-value structure:

"FieldKey":
{
	"Read": true,
	"Value": "<Value-read-from-the-card>"  
}\`
Language
Click Try It! to start a request and see the response here!