- preparePeerPullDebit#
Prepare for an incoming peer pull payment: another wallet requests to be paid by this wallet. The request is identified either by a
taler://pay-pull/URI received from the other party or by thetransactionIdof an existing peer-pull-debit transaction.Request:
The request body must be a PreparePeerPullDebitRequest object. Either
talerUriortransactionIdmust be specified.Response:
On success, the result is a PreparePeerPullDebitResponse object, carrying the contract terms and the amounts, so that the user can review the request before paying with confirmPeerPullDebit.
Side effects:
Fetches the contract and purse status from the exchange over the network and creates a peer pull debit transaction in dialog state.
Expected errors:
The caller can handle the following errors inline:
WALLET_PEER_CONTRACT_NOT_FOUND,WALLET_PEER_PULL_DEBIT_PURSE_GONE,WALLET_PEER_PULL_DEBIT_ALREADY_PAID,WALLET_PEER_PULL_PAYMENT_INSUFFICIENT_BALANCE,WALLET_TALER_URI_MALFORMED,WALLET_TRANSACTION_NOT_FOUND.
// Either talerUri or transactionId must be specified.
interface PreparePeerPullDebitRequest {
talerUri?: string;
transactionId?: string;
progressToken?: string;
}
interface PreparePeerPullDebitResponse {
contractTerms: PeerContractTerms;
amountRaw: AmountString;
amountEffective: AmountString;
transactionId: TransactionIdStr;
// State of the existing or newly created transaction.
txState: TransactionState;
exchangeBaseUrl: string;
scopeInfo: ScopeInfo;
// Deprecated: redundant field with bad name, will be removed soon.
amount: AmountString;
}