Check Image Adapter Extension Tutorial

The CheckImage adapter type is invoked when clicking on a transaction with an image attached:

../../../_images/check_image_uux.png

First, let’s create the extension:

q2 create_extension
New Extension Name: CheckYourself
What type of extension are you creating?

    1) Online (default)
    2) SSO (Third Party Integration)
    3) Ardent (API)
    4) Q2Console (Backoffice)
    5) Central (Legacy Backoffice)
    6) Adapter <--------
    7) Audit Action
    8) Custom Health Check
    9) Message Bus
    10) Caliper API Custom Endpoint
    11) Base Extension

Please make a selection and press Return [1]: 6

Select adapter type to generate

    1) Account Details
    2) Authentication Token
    3) Check Image <--------
    4) Domestic Wire
    5) Deposit Item Image
    6) FX Rate
    7) Instant Payments
    8) International Wire
    9) Remote Deposit
    10) Statement Image

Please make a selection and press Return: 4

A simple adapter, there is only one method necessary to override:

async def get_check_images(self, check_image_request: CheckImageRequest) -> list[CheckImage]:

CheckImageRequest is an object with the metadata of the check being requested (check_number, amount, etc), and your responsibility is to return one or more CheckImage instances (for instance, a front and back image). By default, a mock front and back image are provided as per the screenshot above.

After a quick q2 install, your extension will be registered and any check image you click (for instance, in Q2 Business Savings account by default) will call back to your server.