Skip to content

Instantly share code, notes, and snippets.

@atwalsh
Created May 12, 2023 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atwalsh/e6b834f178777e29f884292cd877d7de to your computer and use it in GitHub Desktop.
Save atwalsh/e6b834f178777e29f884292cd877d7de to your computer and use it in GitHub Desktop.
Stripe Connect account update business icon
import stripe
stripe.api_key = ''
file_path = ''
connected_account_id = ''
with open(file_path, "rb") as fp:
# Upload file to the platform account
file = stripe.File.create(
purpose="business_icon",
file=fp
)
# Set file as account icon on the connect account
stripe.Account.modify(
connected_account_id,
settings={"branding": {"icon": file['id']}},
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment