create-deposit-group.rst (2127B)
1 .. ts:op:: createDepositGroup 2 3 Create a new deposit group. Deposit groups are used to deposit 4 multiple coins to a bank account, usually the wallet user's own bank 5 account. 6 7 The deposit is executed asynchronously as a transaction; the response 8 returns the transaction identifier and its initial state. The fees 9 of the deposit can be reviewed beforehand with 10 :ts:op:`checkDeposit`. 11 12 **Request:** 13 14 The request body must be a `CreateDepositGroupRequest` object. 15 16 **Response:** 17 18 On success, the result is a `CreateDepositGroupResponse` object. 19 20 **Side effects:** 21 22 Creates a deposit group transaction and deposits the coins at the 23 exchange over the network. 24 25 **Expected errors:** 26 27 The caller can handle the following errors inline: 28 ``GENERIC_PAYTO_URI_MALFORMED``, ``WALLET_NO_SUITABLE_EXCHANGE``, 29 ``WALLET_DEPOSIT_GROUP_INSUFFICIENT_BALANCE``, 30 ``WALLET_KYC_LIMIT_EXCEEDED``. 31 32 .. ts:def:: CreateDepositGroupRequest 33 34 interface CreateDepositGroupRequest { 35 depositPaytoUri: string; 36 37 // Instructed amount used for deposit coin selection. 38 amount: AmountString; 39 40 // Restrict the deposit to a certain scope. 41 restrictScope?: ScopeInfo; 42 43 // Use a fixed merchant private key. 44 testingFixedPriv?: string; 45 46 // Optional wire deadline for the deposits. 47 wireDeadline?: TalerProtocolTimestamp; 48 49 // Pre-allocated transaction ID. Allows clients to easily handle 50 // notifications that occur while the operation has been created 51 // but before the creation request has returned. 52 transactionId?: TransactionIdStr; 53 54 progressToken?: string; 55 } 56 57 .. ts:def:: CreateDepositGroupResponse 58 59 // Response to a createDepositGroup request. 60 interface CreateDepositGroupResponse { 61 // Transaction ID of the newly created deposit transaction. 62 transactionId: TransactionIdStr; 63 64 // Current state of the new deposit transaction. Returned as a 65 // performance optimization, so that the UI doesn't have to do a 66 // separate getTransactionById. 67 txState: TransactionState; 68 69 // Deprecated, use transactionId instead. 70 depositGroupId: string; 71 }