djstripe.models.connect

ApplicationFee

Bases: StripeModel

When you collect a transaction fee on top of a charge made for your user (using Connect), an ApplicationFee is created in your account.

Please note the model field charge exists on the Stripe Connected Account while the application_fee modelfield on Charge model exists on the Platform Account!

Stripe documentation: https://stripe.com/docs/api?lang=python#application_fees

account

attribute  account

amount

property  amount

amount_refunded

property  amount_refunded

balance_transaction

attribute  balance_transaction

charge

attribute  charge

currency

property  currency

refunded

property  refunded

stripe_class

attribute  stripe_class

ApplicationFeeRefund

Bases: StripeModel

ApplicationFeeRefund objects allow you to refund an ApplicationFee that has previously been created but not yet refunded. Funds will be refunded to the Stripe account from which the fee was originally collected.

Stripe documentation: https://stripe.com/docs/api?lang=python#fee_refunds

amount

property  amount

balance_transaction

attribute  balance_transaction

currency

property  currency

fee

attribute  fee

stripe_class

attribute  stripe_class

CountrySpec

Bases: StripeBaseModel

Stripe documentation: https://stripe.com/docs/api?lang=python#country_specs

default_currency

attribute  default_currency

id

attribute  id

stripe_class

attribute  stripe_class

supported_bank_account_currencies

attribute  supported_bank_account_currencies

supported_payment_currencies

attribute  supported_payment_currencies

supported_payment_methods

attribute  supported_payment_methods

supported_transfer_countries

attribute  supported_transfer_countries

verification_fields

attribute  verification_fields

api_retrieve

api_retrieve(self, api_key: str | None = None, stripe_account = None)

sync_from_stripe_data

sync_from_stripe_data(cls, data, api_key = djstripe_settings.STRIPE_SECRET_KEY) -> CountrySpec

Syncs this object from the stripe data provided.

Foreign keys will also be retrieved and synced recursively.

:param data: stripe object :type data: dict :rtype: cls

Transfer

Bases: StripeModel

When Stripe sends you money or you initiate a transfer to a bank account, debit card, or connected Stripe account, a transfer object will be created.

Stripe documentation: https://stripe.com/docs/api?lang=python#transfers

amount

property  amount

amount_reversed

property  amount_reversed

balance_transaction

attribute  balance_transaction

currency

property  currency

destination

property  destination

destination_payment

property  destination_payment

expand_fields

attribute  expand_fields

fee

property  fee

objects

attribute  objects

reversed

property  reversed

source_transaction

property  source_transaction

source_type

property  source_type

stripe_class

attribute  stripe_class

stripe_dashboard_item_name

attribute  stripe_dashboard_item_name

transfer_group

property  transfer_group

get_stripe_dashboard_url

get_stripe_dashboard_url(self) -> str

TransferReversal

Bases: StripeModel

Stripe documentation: https://stripe.com/docs/api?lang=python#transfer_reversals

amount

property  amount

balance_transaction

attribute  balance_transaction

currency

property  currency

expand_fields

attribute  expand_fields

stripe_class

attribute  stripe_class

stripe_dashboard_item_name

attribute  stripe_dashboard_item_name

transfer

attribute  transfer

api_list

api_list(cls, api_key = djstripe_settings.STRIPE_SECRET_KEY, **kwargs)

Call the stripe API's list operation for this model. :param api_key: The api key to use for this request. Defaults to djstripe_settings.STRIPE_SECRET_KEY. :type api_key: string See Stripe documentation for accepted kwargs for each object. :returns: an iterator over all items in the query

api_retrieve

api_retrieve(self, api_key = None, stripe_account = None)

Call the stripe API's retrieve operation for this model. :param api_key: The api key to use for this request. Defaults to djstripe_settings.STRIPE_SECRET_KEY. :type api_key: string :param stripe_account: The optional connected account for which this request is being made. :type stripe_account: string

is_valid_object

is_valid_object(cls, data)

Returns whether the data is a valid object for the class