def check_stripe_api_version(app_configs=None, **kwargs):
    """Check the user has configured API version correctly."""
    from .settings import djstripe_settings

    messages = []
    default_version = djstripe_settings.DEFAULT_STRIPE_API_VERSION
    version = djstripe_settings.STRIPE_API_VERSION

    if not validate_stripe_api_version(version):
        msg = f"Invalid Stripe API version: {version!r}"
        hint = f"STRIPE_API_VERSION should be formatted as: YYYY-MM-DD. Example: {default_version}"
        messages.append(checks.Critical(msg, hint=hint, id="djstripe.C004"))

    return messages
Check the user has configured API version correctly.
djstripe/checks.py