components.payment_gateway.public.enums ¶
This module defines all the common enums that don't belong to a specific subcomponent. It also exports all the public enums from all the subcomponents.
Classes¶
AccountStatus ¶
Bases: AlanBaseEnum
Account status on the provider.
Note: Suspended is a special state that can only be set by the Payment Service Provider.
Allowed transitions (self-transitions are allowed):
stateDiagram-v2
direction LR
[*] --> Inactive
Inactive --> Active
Inactive --> Closed
Active --> Inactive
Active --> Closed
Closed --> [*]
AuthorizationRequestDeclinedReason ¶
Bases: AlanBaseEnum
Reasons why the auth relay might declined a payment
AuthorizationRequestStatus ¶
AuthorizationResult ¶
CardFormFactor ¶
CardStatus ¶
Bases: AlanBaseEnum
Card status on the provider.
Allowed transitions (self-transitions are allowed):
stateDiagram-v2
direction LR
[*] --> Inactive
Inactive --> Active
Inactive --> Suspended
Inactive --> Closed
Active --> Suspended
Active --> Closed
Suspended --> Active
Suspended --> Closed
Closed --> [*]
CardSuspensionSource ¶
CountryCode ¶
Bases: AlanBaseEnum
Country codes used throughout the payment gateway.
Attributes¶
OTHER
class-attribute
instance-attribute
¶
For all other countries not listed above.
Functions¶
from_country_name
staticmethod
¶
Convert country name to CountryCode enum.
Source code in components/payment_gateway/public/enums.py
from_iso_alpha2
staticmethod
¶
Convert ISO 3166-1 alpha-2 country code to CountryCode enum.
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 ⧉
Source code in components/payment_gateway/public/enums.py
from_iso_alpha3
staticmethod
¶
Convert ISO 3166-1 alpha-3 country code to CountryCode enum.
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3 ⧉
Source code in components/payment_gateway/public/enums.py
to_country_name ¶
Convert CountryCode enum to country name.
Source code in components/payment_gateway/public/enums.py
to_iso_alpha2 ¶
Convert CountryCode enum to ISO 3166-1 alpha-2 country code.
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 ⧉
Source code in components/payment_gateway/public/enums.py
to_iso_alpha3 ¶
Convert CountryCode enum to ISO 3166-1 alpha-3 country code.
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3 ⧉
Source code in components/payment_gateway/public/enums.py
CurrencyCode ¶
ExpenseLimitPeriod ¶
Bases: AlanBaseEnum
Period of time over which the expense limit amounts are aggregated.
FinancialInstrumentType ¶
LegalEntityType ¶
ListMatch ¶
Bases: AlanBaseEnum
Condition to apply when matching against a list of values.
MCC ¶
Bases: AlanBaseEnum
Merchant Category Code
Declare all the MCCs we support here. The enum names are from the Stripe MCC database.
Although there is no standard list of MCCs and each vendor provides their own list, there is a pretty large list of common MCC values that work everywhere for the most common merchant types.
Citing the Stripe documentation ⧉:
" A frustrating aspect of MCCs is that there is not one universally
accepted set of merchant category codes used by all entities and
organizations. That said, the category code ranges are consistent."
References:
- Wikipedia: https://en.wikipedia.org/wiki/Merchant_category_code ⧉
- Visa:
https://usa.visa.com/content/dam/VCOM/download/merchants/visa-merchant-data-standards-manual.pdf ⧉
- Stripe: https://stripe.com/docs/issuing/categories ⧉
- python-iso18245: https://github.com/jleclanche/python-iso18245 ⧉
This library provides a list of MCCs from the ISO 18245 standard in CSV format.
Note: The MCCs are four-digit strings and not integers because some values have leading zeros.
Attributes¶
art_dealers_galleries
class-attribute
instance-attribute
¶
5971 Art Dealers and Galleries
automobile_rental_agencies
class-attribute
instance-attribute
¶
7512 Automobile Rental Agencies
candy_nut_and_confectionery_stores
class-attribute
instance-attribute
¶
5441 Candy, Nut, and Confectionery Stores
child_care_services
class-attribute
instance-attribute
¶
8351 Child Care Services
cigar_stores_and_stands
class-attribute
instance-attribute
¶
5993 Cigar Stores and Stands
civic_social_fraternal
class-attribute
instance-attribute
¶
8641 Civic, Social, and Fraternal Associations
commuter_transport_and_ferries
class-attribute
instance-attribute
¶
4111 Commuter Transport, Ferries
dairy_products_stores
class-attribute
instance-attribute
¶
5451 Dairy Products Stores
dating_escort_services
class-attribute
instance-attribute
¶
7273 Dating/Escort Services
eating_places_restaurants
class-attribute
instance-attribute
¶
5812 Eating Places, Restaurants
fast_food_restaurants
class-attribute
instance-attribute
¶
5814 Fast Food Restaurants
financial_institutions_merchandise
class-attribute
instance-attribute
¶
6012 Financial Institutions–Merchandise, Services, and Debt Repayment
government_horse_dog_racing
class-attribute
instance-attribute
¶
7802 Government Licensed Horse/Dog Racing
government_lotteries_other
class-attribute
instance-attribute
¶
9406 Government Owned Lotteries (Brazil, Norway, Poland, Sweden, or Canada)
government_lotteries_us
class-attribute
instance-attribute
¶
7800 Government Owned Lotteries (U.S. Region Only)
government_online_casinos
class-attribute
instance-attribute
¶
7801 Government Licensed On-Line Casinos
grocery_stores_supermarkets
class-attribute
instance-attribute
¶
5411 Grocery Stores, Supermarkets
insurance_sales
class-attribute
instance-attribute
¶
6300 Insurance sales (Only life insurance)
jewelry_stores
class-attribute
instance-attribute
¶
5944 Jewelry Stores, Watches, Clocks, and Silverware Stores
miscellaneous_food_stores
class-attribute
instance-attribute
¶
5499 Miscellaneous Food Stores
miscellaneous_recreation_services
class-attribute
instance-attribute
¶
7999 Miscellaneous Recreation Services
passenger_railways
class-attribute
instance-attribute
¶
4112 Passenger Railways
political_organizations
class-attribute
instance-attribute
¶
8651 Political Organizations
precious_stones_metals_wholesale
class-attribute
instance-attribute
¶
5094 Precious Stones and Metals, Watches and Jewelry
prepaid_services
class-attribute
instance-attribute
¶
4814 Prepaid Services
quasi_cash_customer_financial
class-attribute
instance-attribute
¶
6050 Quasi Cash—Customer Financial Institution
religious_organizations
class-attribute
instance-attribute
¶
8661 Religious Organizations
securities_brokers_dealers
class-attribute
instance-attribute
¶
6211 Securities—Brokers/Dealers
stamp_coin_stores
class-attribute
instance-attribute
¶
5972 Stamp and Coin Stores
stored_value_card_purchase
class-attribute
instance-attribute
¶
6540 Stored Value Card Purchase/Load
taxicabs_limousines
class-attribute
instance-attribute
¶
4121 Taxicabs, Limousines
wire_money_transfer
class-attribute
instance-attribute
¶
4829 Wire/Money Transfer
PaymentServiceProvider ¶
Bases: AlanBaseEnum
Supported Payment Service Providers (PSPs) used throughout the Payment Gateway.
Attributes¶
ProcessingType ¶
ProvisioningType ¶
Bases: AlanBaseEnum
Types of CardProvisioning
SepaBeneficiaryStatus ¶
SepaMandateStatus ¶
Bases: AlanBaseEnum
TransferDirection ¶
TransferUpdateTransferType ¶
WebhookLogTransferStatus ¶
Bases: AlanBaseEnum
Defines the possible statuses of a webhook log transfer.
- received: The transfer webhook event was correctly received from payment provider
- ingested: The transfer webhook event was correctly parsed, and ingested in our system. But we could not route it to the appropriate transfer type / transfer_history
- routed: Successfully ingested and routed the transfer webhook event
WebhookLogTransferType ¶
Bases: AlanBaseEnum
Defines the possible types of a webhook log transfer.
- internalTransfer: Transfer between two accounts
- bankTransfer: Transfer between an account and a bank
- payment: Payment made to a merchant