Transfers Pydantic Models
In order to simplify and standardize the data that is passed between the client and the Revolut Business API, PyRevolut uses Pydantic models to define the structure of the data.
Below are the Pydantic models used by the Transfers
endpoint.
ResourceTransfer
Bases: BaseModel
Transfer resource model.
Source code in pyrevolut/api/transfers/resources/transfer.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
|
GetTransferReasons
In order to initiate a transfer in certain currencies and countries, you must provide a transfer reason. With this endpoint you can retrieve all transfer reasons available to your business account per country and currency.
After you retrieve the results, use the appropriate reason code in the transfer_reason_code field when making a transfer to a counterparty or creating a payout link.
Source code in pyrevolut/api/transfers/get/get_transfer_reasons.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
|
Params
Bases: BaseModel
The query parameters for the request.
Source code in pyrevolut/api/transfers/get/get_transfer_reasons.py
23 24 25 26 27 28 |
|
Response
Bases: BaseModel
The response model for the request.
Source code in pyrevolut/api/transfers/get/get_transfer_reasons.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
|
CreateTransferToAnotherAccount
Make a payment to a counterparty. The resulting transaction has the type transfer.
If you make the payment to another Revolut account, either business or personal, the transaction is executed instantly.
If the counterparty has multiple payment methods available, for example, 2 accounts, or 1 account and 1 card, you must specify the account or card to which you want to transfer the money (receiver.account_id or receiver.card_id respectively).
Caution
Due to PSD2 Strong Customer Authentication regulations, this endpoint is only available for customers on Revolut Business Company plans. If you're a freelancer and wish to make payments via our API, we advise that you instead leverage our Payment drafts (/payment-drafts) endpoint.
Source code in pyrevolut/api/transfers/post/create_transfer_to_another_account.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
|
Body
Bases: BaseModel
The body of the request.
Source code in pyrevolut/api/transfers/post/create_transfer_to_another_account.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
|
ModelReceiver
Bases: BaseModel
The details of the transfer recipient.
If the counterparty has multiple payment methods available (e.g. 2 accounts, or 1 account and 1 card), you must specify the account (account_id) or card (card_id) to which you want to transfer the money.
Source code in pyrevolut/api/transfers/post/create_transfer_to_another_account.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
|
Response
Bases: ResourceTransfer
The response model of the request.
Source code in pyrevolut/api/transfers/post/create_transfer_to_another_account.py
152 153 154 155 156 157 |
|
MoveMoneyBetweenAccounts
Move money between the Revolut accounts of the business in the same currency.
The resulting transaction has the type transfer.
Source code in pyrevolut/api/transfers/post/move_money_between_accounts.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
|
Body
Bases: BaseModel
The body of the request.
Source code in pyrevolut/api/transfers/post/move_money_between_accounts.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
|
Response
Bases: ResourceTransfer
The response model of the request.
Source code in pyrevolut/api/transfers/post/move_money_between_accounts.py
69 70 71 72 73 74 |
|