Skip to content

Checks

This endpoint manages checks that are received to be processed.

Check Object

AmpliFi represents checks by a JSON object. This table lists properties that may be included in a check object. Some details are optional.

Images are encoded in base 64. They may be one of several common file formats, but are interpreted only by the backoffice. At least one image should be present.

Property Type Required? (default) Description
AFiChequeId string yes AmpliFi id for this check
AFiUserId string yes Amplifi id for the user this check belongs to
amount number yes amount of the check
currency string yes 3-letter currency code
dtsCreated date yes date and time created
dtsModified date yes date and time last modified
isAccepted boolean no (false) true if check has been accepted
isPendingApproval boolean no (false) true if check is waiting for approval
isCredited boolean no (fasle) true if check has been credited to user's account
isDeleted boolean no (false) true if check has been deleted
isActive boolean no (true) true if check is active
imgFrontB64 string no (none) full image of the front of the check
imgBackB64 string no (none) full image of the back of the check
thumbFrontB64 string no (none) small (thumbnail) image of the front of the check
thumbBackB64 string no (none) small (thumbnail) image of the back of the check

New checks

POST /cheques/sync

This API receives an array of new checks as input and updates the existing list. It compares these checks with the existing records and removes duplicates. Large images are also removed.

Request body:

  [ // array of new check objects
  ]

Response:

  {
    "success": true,
    "cheques": [ // array of check objects    
    ]
  }

Add image to checks

PUT chequeimage/:AFiChequeId/:imageType

Allows you to add a picture to a previously created check. You can send a check without pictures through the new check API, and then add a picture using this method.

The check id and the image type are given as path parameters. Possible image types are "front", "back", "thumbFront", or "thumbBack".

Request body:

  {
    "b64": "iVBORw0KGgo...vcmeb7jwaAAAAAElFTkSuQmCC" //image encoded in Base64
  }

Response:

  {
    "success": true,
  }