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 (on_aurora | shared_on_aurora) |
Use Kay database: 'on-aurora' for Kay on Aurora, 'shared-on-aurora' for a shared Kay on Aurora | None |
--auth |
boolean | Force authentication and authorization (mostly for testing purposes) | False |
--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 (on_aurora | shared_on_aurora) |
Use Kay database: 'on-aurora' for Kay on Aurora, 'shared-on-aurora' for a shared Kay on Aurora | None |
--auth |
boolean | Force authentication and authorization (mostly for testing purposes) | False |
--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 |
list_missing_transfer_webhooks¶
List transfers with gaps in their Adyen webhook sequence.
Read-only. The output is ordered by number of missing webhooks descending, then by the oldest latest-known-update first.
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 (on_aurora | shared_on_aurora) |
Use Kay database: 'on-aurora' for Kay on Aurora, 'shared-on-aurora' for a shared Kay on Aurora | None |
--auth |
boolean | Force authentication and authorization (mostly for testing purposes) | False |
--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 |
--workspace-key |
text | Restrict to transfers in this PSP workspace. | None |
--min-age-hours |
integer | Ignore gaps whose newest known update is fresher than this. Late-arriving webhooks may still close such gaps on their own. | 6 |
--transfer-type |
choice (card_transfer | bank_transfer | account_transfer) |
Restrict to a single transfer type. | None |
--start-date |
datetime (%Y-%m-%d) |
Only consider transfers touched at or after this date. | None |
--end-date |
datetime (%Y-%m-%d) |
Only consider transfers touched strictly before this date. | None |
--limit |
integer | Maximum number of transfers to report (SQL-level LIMIT). | None |
--help |
boolean | Show this message and exit. | False |
reissue_missing_transfer_webhooks¶
Re-emit synthetic webhooks for missing sequences of one transfer.
Loads the known sibling webhook payloads from TransferUpdate.raw,
computes the gap, builds a synthetic Adyen webhook payload for each
missing sequence (optionally merging a redacted dashboard payload), and
publishes it to adyen_transfer_topic for downstream processing.
Idempotent: the existing record_transfer_update ON CONFLICT DO NOTHING
means a re-fire after the real webhook eventually arrives is a no-op.
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 (on_aurora | shared_on_aurora) |
Use Kay database: 'on-aurora' for Kay on Aurora, 'shared-on-aurora' for a shared Kay on Aurora | None |
--auth |
boolean | Force authentication and authorization (mostly for testing purposes) | False |
--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 |
--workspace-key |
text | PSP workspace key of the transfer. | _required |
--external-transfer-id |
text | Adyen transfer id (data.id) for which to reissue missing webhooks. | _required |
--sequence-numbers |
text | Comma-separated sequence numbers to reissue. Defaults to all detected gaps. | None |
--dashboard-payloads-file |
file | JSON file containing an array of (redacted) payloads copied from Adyen's webhook event log dashboard. Each payload's sequence is read from data.sequenceNumber. Sequences without a matching payload fall back to pure sibling extrapolation. | None |
--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
AdyenCardTransferProcessorPolicy, 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 (on_aurora | shared_on_aurora) |
Use Kay database: 'on-aurora' for Kay on Aurora, 'shared-on-aurora' for a shared Kay on Aurora | None |
--auth |
boolean | Force authentication and authorization (mostly for testing purposes) | False |
--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 (on_aurora | shared_on_aurora) |
Use Kay database: 'on-aurora' for Kay on Aurora, 'shared-on-aurora' for a shared Kay on Aurora | None |
--auth |
boolean | Force authentication and authorization (mostly for testing purposes) | False |
--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 |
list_missing_transfer_webhooks¶
List transfers with gaps in their Adyen webhook sequence.
Read-only. The output is ordered by number of missing webhooks descending, then by the oldest latest-known-update first.
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 (on_aurora | shared_on_aurora) |
Use Kay database: 'on-aurora' for Kay on Aurora, 'shared-on-aurora' for a shared Kay on Aurora | None |
--auth |
boolean | Force authentication and authorization (mostly for testing purposes) | False |
--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 |
--workspace-key |
text | Restrict to transfers in this PSP workspace. | None |
--min-age-hours |
integer | Ignore gaps whose newest known update is fresher than this. Late-arriving webhooks may still close such gaps on their own. | 6 |
--transfer-type |
choice (card_transfer | bank_transfer | account_transfer) |
Restrict to a single transfer type. | None |
--start-date |
datetime (%Y-%m-%d) |
Only consider transfers touched at or after this date. | None |
--end-date |
datetime (%Y-%m-%d) |
Only consider transfers touched strictly before this date. | None |
--limit |
integer | Maximum number of transfers to report (SQL-level LIMIT). | None |
--help |
boolean | Show this message and exit. | False |
reissue_missing_transfer_webhooks¶
Re-emit synthetic webhooks for missing sequences of one transfer.
Loads the known sibling webhook payloads from TransferUpdate.raw,
computes the gap, builds a synthetic Adyen webhook payload for each
missing sequence (optionally merging a redacted dashboard payload), and
publishes it to adyen_transfer_topic for downstream processing.
Idempotent: the existing record_transfer_update ON CONFLICT DO NOTHING
means a re-fire after the real webhook eventually arrives is a no-op.
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 (on_aurora | shared_on_aurora) |
Use Kay database: 'on-aurora' for Kay on Aurora, 'shared-on-aurora' for a shared Kay on Aurora | None |
--auth |
boolean | Force authentication and authorization (mostly for testing purposes) | False |
--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 |
--workspace-key |
text | PSP workspace key of the transfer. | _required |
--external-transfer-id |
text | Adyen transfer id (data.id) for which to reissue missing webhooks. | _required |
--sequence-numbers |
text | Comma-separated sequence numbers to reissue. Defaults to all detected gaps. | None |
--dashboard-payloads-file |
file | JSON file containing an array of (redacted) payloads copied from Adyen's webhook event log dashboard. Each payload's sequence is read from data.sequenceNumber. Sequences without a matching payload fall back to pure sibling extrapolation. | None |
--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
AdyenCardTransferProcessorPolicy, 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 (on_aurora | shared_on_aurora) |
Use Kay database: 'on-aurora' for Kay on Aurora, 'shared-on-aurora' for a shared Kay on Aurora | None |
--auth |
boolean | Force authentication and authorization (mostly for testing purposes) | False |
--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 |