Contents

createDepositGroup#

Create a new deposit group. Deposit groups are used to deposit multiple coins to a bank account, usually the wallet user’s own bank account.

The deposit is executed asynchronously as a transaction; the response returns the transaction identifier and its initial state. The fees of the deposit can be reviewed beforehand with checkDeposit.

Request:

The request body must be a CreateDepositGroupRequest object.

Response:

On success, the result is a CreateDepositGroupResponse object.

Side effects:

Creates a deposit group transaction and deposits the coins at the exchange over the network.

Expected errors:

The caller can handle the following errors inline: GENERIC_PAYTO_URI_MALFORMED, WALLET_NO_SUITABLE_EXCHANGE, WALLET_DEPOSIT_GROUP_INSUFFICIENT_BALANCE, WALLET_KYC_LIMIT_EXCEEDED.

interface CreateDepositGroupRequest {
  depositPaytoUri: string;

  // Instructed amount used for deposit coin selection.
  amount: AmountString;

  // Restrict the deposit to a certain scope.
  restrictScope?: ScopeInfo;

  // Use a fixed merchant private key.
  testingFixedPriv?: string;

  // Optional wire deadline for the deposits.
  wireDeadline?: TalerProtocolTimestamp;

  // Pre-allocated transaction ID.  Allows clients to easily handle
  // notifications that occur while the operation has been created
  // but before the creation request has returned.
  transactionId?: TransactionIdStr;

  progressToken?: string;
}
// Response to a createDepositGroup request.
interface CreateDepositGroupResponse {
  // Transaction ID of the newly created deposit transaction.
  transactionId: TransactionIdStr;

  // Current state of the new deposit transaction.  Returned as a
  // performance optimization, so that the UI doesn't have to do a
  // separate getTransactionById.
  txState: TransactionState;

  // Deprecated, use transactionId instead.
  depositGroupId: string;
}