Contents

initiatePeerPushDebit#

Initiate an outgoing peer push payment.

Request:

The request body must be an InitiatePeerPushDebitRequest object.

Response:

On success, the result is an InitiatePeerPushDebitResponse object.

Side effects:

Creates an outgoing peer push payment transaction, locking the coins.

Expected errors:

The caller can handle the following errors inline: WALLET_PEER_PUSH_PAYMENT_INSUFFICIENT_BALANCE, WALLET_PEER_PUSH_PAYMENT_QUOTE_CHANGED, WALLET_CORE_API_BAD_REQUEST.

Details:

exchangeBaseUrl and restrictScope are mutually exclusive. The purse_expiration in partialContractTerms must be finite and in the future. When a peerPushDebitQuote obtained from checkPeerPushDebitV2 is passed, an explicit expiration is required, and wallet-core rejects the request when it does not match the quote or when the coin selection, fees or the selected exchange changed since the quote was made.

The taler://pay-push/ URI to hand to the receiver is not part of the response; it is available from the transaction (see getTransactionById) once the transaction is pending.

interface InitiatePeerPushDebitRequest {
  exchangeBaseUrl?: string;

  // Restrict the scope of funds that can be spent via the given
  // scope info.
  restrictScope?: ScopeInfo;

  // Quote returned by checkPeerPushDebitV2.
  peerPushDebitQuote?: string;

  partialContractTerms: PartialPeerContractTerms;
}
interface PartialPeerContractTerms {
  amount: AmountString;
  summary: string;
  icon_id?: string;
  purse_expiration?: TalerProtocolTimestamp;
}
interface InitiatePeerPushDebitResponse {
  exchangeBaseUrl: string;
  pursePub: string;
  mergePriv: string;
  contractPriv: string;
  transactionId: TransactionIdStr;
}