Commands
Transfer Histories¶
create_transfer_history¶
Create a new transfer history
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
-k, --use-kay-data |
boolean | Use remote database with anonymized production dump | False |
--use-shared-kay |
boolean | Use a Kay database shared with all engineers, refreshed daily | False |
--use-kay |
choice (personal | shared | on_aurora) |
Use Kay database: 'personal' for your own database, 'shared' for the shared Kay database, 'on-aurora' for Kay on Aurora | None |
--profile-memory |
boolean | Memory usage profiler is activated | False |
--profile-methods-dump |
boolean | Activate profiler for method calls and output one .prof file per run | False |
--profile-methods |
boolean | Activate profiler for method calls | False |
--tracking |
boolean | Activate tracking on dev environment | False |
-m, --mailer |
boolean | Activate mailer on dev environment | False |
--debug-transactions |
boolean | Print transaction debug information | False |
--show-logs / --hide-logs |
boolean | Display application logs in the console. Don't use on detached one-offs to avoid duplicated logs. | None |
--monitor |
boolean | Monitor command and send a notification to Slack if it fails | False |
--dry-run / --execute |
boolean | Perform a dry run (default) or a live run | True |
--help |
boolean | Show this message and exit. | False |
Adyen-specific¶
Card Payment Transfers¶
audit_transfer_webhooks¶
Audit Adyen transfer webhooks to ensure that all transfers are processed
This command will iterate over all Adyen transfer webhooks stored in the
database as WebhookLog and check if all transfers and transfer events have
been processed. To do so, it will check if the transfer and transfer event
IDs are present in the database. All missing entities will be logged as
errors.
Transfer webhooks use the following types:
balancePlatform.transfer.createdbalancePlatform.transfer.updated
Transfer events are stored in the TransferEvent table.
Transfers are stored in the following tables depending on the transfer type:
CardTransferfor transfers of typepaymentBankTransferfor transfers of typebankTransferAccountTransferfor transfers of typeinternalTransferOther types are unhandled.
All models have an external_id field that can be used to match the
transfer and transfer event IDs.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
-k, --use-kay-data |
boolean | Use remote database with anonymized production dump | False |
--use-shared-kay |
boolean | Use a Kay database shared with all engineers, refreshed daily | False |
--use-kay |
choice (personal | shared | on_aurora) |
Use Kay database: 'personal' for your own database, 'shared' for the shared Kay database, 'on-aurora' for Kay on Aurora | None |
--profile-memory |
boolean | Memory usage profiler is activated | False |
--profile-methods-dump |
boolean | Activate profiler for method calls and output one .prof file per run | False |
--profile-methods |
boolean | Activate profiler for method calls | False |
--tracking |
boolean | Activate tracking on dev environment | False |
-m, --mailer |
boolean | Activate mailer on dev environment | False |
--debug-transactions |
boolean | Print transaction debug information | False |
--show-logs / --hide-logs |
boolean | Display application logs in the console. Don't use on detached one-offs to avoid duplicated logs. | None |
--monitor |
boolean | Monitor command and send a notification to Slack if it fails | False |
--start-date |
datetime (%Y-%m-%d) |
Start date (inclusive) | None |
--end-date |
datetime (%Y-%m-%d) |
End date (exclusive) | None |
-cp, --card-transfers |
boolean | Include card transfers | False |
-bt, --bank-transfers |
boolean | Include bank transfers | False |
-at, --account-transfers |
boolean | Include account transfers | False |
--help |
boolean | Show this message and exit. | False |
simulate_card_payment_transfer_created¶
Simulate an inbound balancePlatform.transfer.created webhook from Adyen resulting from a card payment
This builds a webhook data payload from the arguments and publishes it on
the adyen_transfer_topic for downstream processing.
The main purpose of this command is to allow end-to-end testing of the
CardTransferProcessorPolicy, as the Adyen test platform does not provide
adequate tools for testing that would cover all our business rules. Indeed
the existing simulate_payment command uses Alan's merchant account and
there's no way for us to change it. Moveover, we don't control the timing of
the successive events which can span several hours or days.
This command will also help us improve the resilience of our code under adverse conditions, like high loadß or out-of-order events.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
-k, --use-kay-data |
boolean | Use remote database with anonymized production dump | False |
--use-shared-kay |
boolean | Use a Kay database shared with all engineers, refreshed daily | False |
--use-kay |
choice (personal | shared | on_aurora) |
Use Kay database: 'personal' for your own database, 'shared' for the shared Kay database, 'on-aurora' for Kay on Aurora | None |
--profile-memory |
boolean | Memory usage profiler is activated | False |
--profile-methods-dump |
boolean | Activate profiler for method calls and output one .prof file per run | False |
--profile-methods |
boolean | Activate profiler for method calls | False |
--tracking |
boolean | Activate tracking on dev environment | False |
-m, --mailer |
boolean | Activate mailer on dev environment | False |
--debug-transactions |
boolean | Print transaction debug information | False |
--show-logs / --hide-logs |
boolean | Display application logs in the console. Don't use on detached one-offs to avoid duplicated logs. | None |
--monitor |
boolean | Monitor command and send a notification to Slack if it fails | False |
--dry-run / --execute |
boolean | Perform a dry run (default) or a live run | True |
--seed |
text | Random seed to use for generating bogus data (if not provided, a random one will be generated) | None |
--amount_cents |
text | Amount of the transfer in cents (default=100) | 100 |
--merchant_mcc |
text | MCC of the merchant (default=randomly chosen among known MCCs) | None |
--payment_instrument_id |
text | Payment instrument ID of the card (if not provided, a bogus one will be generated) | None |
--help |
boolean | Show this message and exit. | False |
Transfer Webhooks¶
audit_transfer_webhooks¶
Audit Adyen transfer webhooks to ensure that all transfers are processed
This command will iterate over all Adyen transfer webhooks stored in the
database as WebhookLog and check if all transfers and transfer events have
been processed. To do so, it will check if the transfer and transfer event
IDs are present in the database. All missing entities will be logged as
errors.
Transfer webhooks use the following types:
balancePlatform.transfer.createdbalancePlatform.transfer.updated
Transfer events are stored in the TransferEvent table.
Transfers are stored in the following tables depending on the transfer type:
CardTransferfor transfers of typepaymentBankTransferfor transfers of typebankTransferAccountTransferfor transfers of typeinternalTransferOther types are unhandled.
All models have an external_id field that can be used to match the
transfer and transfer event IDs.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
-k, --use-kay-data |
boolean | Use remote database with anonymized production dump | False |
--use-shared-kay |
boolean | Use a Kay database shared with all engineers, refreshed daily | False |
--use-kay |
choice (personal | shared | on_aurora) |
Use Kay database: 'personal' for your own database, 'shared' for the shared Kay database, 'on-aurora' for Kay on Aurora | None |
--profile-memory |
boolean | Memory usage profiler is activated | False |
--profile-methods-dump |
boolean | Activate profiler for method calls and output one .prof file per run | False |
--profile-methods |
boolean | Activate profiler for method calls | False |
--tracking |
boolean | Activate tracking on dev environment | False |
-m, --mailer |
boolean | Activate mailer on dev environment | False |
--debug-transactions |
boolean | Print transaction debug information | False |
--show-logs / --hide-logs |
boolean | Display application logs in the console. Don't use on detached one-offs to avoid duplicated logs. | None |
--monitor |
boolean | Monitor command and send a notification to Slack if it fails | False |
--start-date |
datetime (%Y-%m-%d) |
Start date (inclusive) | None |
--end-date |
datetime (%Y-%m-%d) |
End date (exclusive) | None |
-cp, --card-transfers |
boolean | Include card transfers | False |
-bt, --bank-transfers |
boolean | Include bank transfers | False |
-at, --account-transfers |
boolean | Include account transfers | False |
--help |
boolean | Show this message and exit. | False |
simulate_card_payment_transfer_created¶
Simulate an inbound balancePlatform.transfer.created webhook from Adyen resulting from a card payment
This builds a webhook data payload from the arguments and publishes it on
the adyen_transfer_topic for downstream processing.
The main purpose of this command is to allow end-to-end testing of the
CardTransferProcessorPolicy, as the Adyen test platform does not provide
adequate tools for testing that would cover all our business rules. Indeed
the existing simulate_payment command uses Alan's merchant account and
there's no way for us to change it. Moveover, we don't control the timing of
the successive events which can span several hours or days.
This command will also help us improve the resilience of our code under adverse conditions, like high loadß or out-of-order events.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
-k, --use-kay-data |
boolean | Use remote database with anonymized production dump | False |
--use-shared-kay |
boolean | Use a Kay database shared with all engineers, refreshed daily | False |
--use-kay |
choice (personal | shared | on_aurora) |
Use Kay database: 'personal' for your own database, 'shared' for the shared Kay database, 'on-aurora' for Kay on Aurora | None |
--profile-memory |
boolean | Memory usage profiler is activated | False |
--profile-methods-dump |
boolean | Activate profiler for method calls and output one .prof file per run | False |
--profile-methods |
boolean | Activate profiler for method calls | False |
--tracking |
boolean | Activate tracking on dev environment | False |
-m, --mailer |
boolean | Activate mailer on dev environment | False |
--debug-transactions |
boolean | Print transaction debug information | False |
--show-logs / --hide-logs |
boolean | Display application logs in the console. Don't use on detached one-offs to avoid duplicated logs. | None |
--monitor |
boolean | Monitor command and send a notification to Slack if it fails | False |
--dry-run / --execute |
boolean | Perform a dry run (default) or a live run | True |
--seed |
text | Random seed to use for generating bogus data (if not provided, a random one will be generated) | None |
--amount_cents |
text | Amount of the transfer in cents (default=100) | 100 |
--merchant_mcc |
text | MCC of the merchant (default=randomly chosen among known MCCs) | None |
--payment_instrument_id |
text | Payment instrument ID of the card (if not provided, a bogus one will be generated) | None |
--help |
boolean | Show this message and exit. | False |