components.payment_gateway.public.entities ¶
This module defines all the common entities that don't belong to a specific subcomponent. It also exports all the public entities from all the subcomponents.
Attributes¶
AuthorizationRequestId
module-attribute
¶
FinancialInstrumentId
module-attribute
¶
Unique identifier for a financial instrument.
Financial instruments are opaque from outside the Payment Gateway. This guarantees that the internal representation of a financial instrument is not exposed to the outside world for security and privacy reasons. All operations on a financial instrument should be done using its unique identifier.
LegalEntityId
module-attribute
¶
Unique identifier for a legal entity.
Legal entities are opaque from outside the Payment Gateway. This guarantees that the internal representation of a legal entity is not exposed to the outside world for security and privacy reasons. All operations on a legal entity should be done using its unique identifier.
OrganizationType
module-attribute
¶
OrganizationType = Literal[
"associationIncorporated",
"governmentalOrganization",
"listedPublicCompany",
"nonProfit",
"partnershipIncorporated",
"privateCompany",
]
RuleCriterion
module-attribute
¶
RuleCriterion = (
CountryCriterion
| ProcessingTypeCriterion
| MCCCriterion
| MerchantCriterion
| CurrencyCriterion
)
Criterion to match against a payment.
All criteria must be met for a rule to apply.
The order of the criteria doesn't matter, however each type of criterion should be used at most once.
Transfer
module-attribute
¶
TransferId
module-attribute
¶
UsageRestrictionRuleId
module-attribute
¶
Classes¶
AccountHolder
dataclass
¶
AccountTransfer
dataclass
¶
AccountTransfer(
id,
workspace_key,
external_id,
direction,
reference,
effective_date,
account_id,
transfer_history_id,
updates,
events,
raw,
)
Attributes¶
BalanceInformation
dataclass
¶
BankTransfer
dataclass
¶
BankTransfer(
id,
workspace_key,
external_id,
direction,
effective_date,
account_id,
transfer_history_id,
updates,
events,
sepa_mandate_id,
sepa_beneficiary_id,
raw,
)
Attributes¶
Card
dataclass
¶
Card(
id,
workspace_key,
external_id,
card_holder_id,
account_id,
form_factor,
display_name,
expiration_year,
expiration_month,
last_four_digits,
status,
description,
reference,
issued_at=isodatetime_field(),
issuance_reason=None,
suspension_source=None,
)
CardHolder
dataclass
¶
CardHolder(
id,
workspace_key,
external_id,
first_name,
last_name,
display_name=None,
short_name=None,
)
Person owning a card.
Attributes¶
CardOrder
dataclass
¶
CardPaymentMerchant
dataclass
¶
CardProvisioning
dataclass
¶
CardProvisioning(
id,
workspace_key,
external_id,
card_id,
provisioning_type,
provisioning_date,
wallet_provider,
)
CardProvisioning entity
Attributes¶
CardRevealPANData
dataclass
¶
CardRevealPINData
dataclass
¶
CardShipmentInfo
dataclass
¶
CardShipmentInfo(
first_name,
last_name,
address_line1,
postal_code,
city,
country,
phone_number=None,
address_line2=None,
state_or_province=None,
)
Name and address to which a physical card will be shipped.
Attributes¶
CardTransfer
dataclass
¶
CardTransfer(
id,
workspace_key,
external_id,
effective_date,
merchant,
card_id,
account_id,
updates,
events,
raw,
transfer_history_id,
)
Attributes¶
CountryCriterion
dataclass
¶
CurrencyCriterion
dataclass
¶
ExpenseLimitRule
dataclass
¶
ExpenseLimitRule(
id,
workspace_key,
external_id,
card_id,
description,
reference,
amount,
currency,
period,
criteria,
is_active,
first_day,
start,
end,
)
Expense limit rule that applies on payments made with a card.
Expense limits set a limit on the total amount that can be spent with a card over a given period (day, month, ...). Once this limit is reached, the card can't be used anymore until the period ends.
Expense limits are immutable except for their amount once created, they can't be changed or deleted. However, they can be activated or deactivated at any time.
The amount can also be changed at any time, however this can have unexpected effects in the middle of a validity period (for example, monthly expense caps). It is best to change the amount outside at the beginning or end of a period or on an inactive one.
All criteria must be met for the rule to apply.
All active rules apply simultaneously on each payment made with the card. The order in which they are created doesn't matter. If a payment exceeds any active limit then it is blocked.
Attributes¶
InternalTransfer
dataclass
¶
Ledger
dataclass
¶
LedgerEntry
dataclass
¶
LedgerEntry(
ledger_id,
opening_balance,
amount,
ending_balance,
occurred_at,
created_at,
description,
reference,
metadata,
)
Attributes¶
LegalEntityAddressParams
dataclass
¶
LegalEntityOnboardResult
dataclass
¶
MCCCriterion
dataclass
¶
MerchantCriterion
dataclass
¶
MerchantIdPair
dataclass
¶
MerchantInfo
dataclass
¶
MerchantInfo(
merchant_id,
acquirer_id=None,
mcc=None,
name=None,
postal_code=None,
city=None,
country=None,
)
Info about a merchant identified by its Merchant ID.
This is the (possibly incomplete) information we store about the merchant in our merchant registry. We try to keep it up-to-date with the information we receive from the PSP, using the Merchant ID as the key.
Note
Some fields may be None for various reasons: - They might not be relevant for the merchant (e.g. e-commerce platforms may not have a postal code) - They were missing from the events we received from the PSP, although we try to augment them as we go
PaymentRequest
dataclass
¶
PaymentRequest(
id,
workspace_key,
external_id,
type,
reference,
amount,
currency,
raw,
account_id,
bank_transfer_id,
)
Represents a payment request.
Attributes¶
PendingTransaction
dataclass
¶
PendingTransactionMerchantInfo
dataclass
¶
PendingTransactionMerchantInfo(
merchant_id,
acquirer_id,
mcc,
name,
country,
postal_code=None,
city=None,
)
Merchant information for a pending transaction.
Note
All fields are always present during authorization, those which are None might simply be irrelevant for the merchant (e.g. e-commerce platforms may not have a postal code)
Attributes¶
ProcessingTypeCriterion
dataclass
¶
SepaMandate
dataclass
¶
SepaMandate(
id,
workspace_key,
external_id,
account_holder_id,
sepa_creditor_identifier,
unique_mandate_reference,
debtor_name,
debtor_iban,
issued_at,
status,
)
Attributes¶
TransferEvent
dataclass
¶
TransferEvent(
id,
workspace_key,
external_id,
effective_date,
received,
reserved,
balance,
status,
raw,
)
Attributes¶
TransferUpdate
dataclass
¶
TransferUpdate(
id,
workspace_key,
external_transfer_id,
sequence_number,
transfer_id,
transfer_type,
direction,
occurred_at,
amount,
currency,
status,
external_transaction_id=None,
raw=None,
)
Attributes¶
UsageRestrictionRule
dataclass
¶
UsageRestrictionRule(
id,
workspace_key,
external_id,
account_id,
description,
reference,
criteria,
is_active,
start,
end,
)
Usage restriction rule that applies on payments made with any card linked to an account.
Usage restrictions are immutable; once created, they can't be changed or deleted. However, they can be activated or deactivated at any time.
All criteria must be met for the rule to apply.
All active rules apply simultaneously on each payment made with a card linked to the account. The order in which they are created doesn't matter. If a payment matches any active rule then it is blocked.