Skip to content

Instantly share code, notes, and snippets.

@miodeqqq
Last active April 23, 2021 15:25
Show Gist options
  • Save miodeqqq/985c6491f2b19f6804230981b7194bdf to your computer and use it in GitHub Desktop.
Save miodeqqq/985c6491f2b19f6804230981b7194bdf to your computer and use it in GitHub Desktop.
Django & Stripe - attach_identity_document.py
passport_front = stripe.File.create(
purpose="identity_document",
file=_file, # ContentFile object
stripe_account=user2.stripe_id,
)
individual = {
"verification": {
"document": {"front": passport_front.get("id"),},
"additional_document": {"front": passport_front.get("id"),},
}
}
stripe.Account.modify(user2.stripe_id, individual=individual)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment