Skip to content

Async methods fail with ImportError while sync methods work out of the box #1558

@geminimir

Description

@geminimir

Describe the bug

Noticed small inconsistency in dependency requirements between sync and async methods... Sync methods work immediately after installing the stripe package, while async methods fail with an ImportError unless additional dependencies are installed...

To Reproduce

  1. Install stripe: pip install stripe
  2. Try to use any async method without installing httpx/aiohttp
  3. Observe ImportError

Expected behavior

Both sync and async methods should either:

  • Work out of the box with the base installation, OR
  • Clearly document that async support requires additional dependencies

Code snippets

import stripe

client = stripe.StripeClient("sk_test_...")

# This works fine
customer = client.customers.retrieve("cus1")  

# This fails with ImportError
customer = await client.customers.retrieve_async("cus1")

OS

all

Language version

3.9+

Library version

Latest

API version

2025-08-29

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions