- checkPeerPushDebitdeprecated#
This operation is deprecated. Use checkPeerPushDebitV2 instead.
Check if initiating a peer push payment is possible based on the funds in the wallet. Unlike the V2 operation, an insufficient balance is reported via the
WALLET_PEER_PUSH_PAYMENT_INSUFFICIENT_BALANCEerror instead of a typed result.Request:
The request body must be a CheckPeerPushDebitRequest object.
Response:
On success, the result is a CheckPeerPushDebitOkResponse object.
Side effects:
May refresh the selected exchange’s key material over the network.
Expected errors:
The caller can handle the following errors inline:
WALLET_PEER_PUSH_PAYMENT_INSUFFICIENT_BALANCE(also reported when no exchange can serve the payment),WALLET_CORE_API_BAD_REQUEST.
interface CheckPeerPushDebitRequest {
// Preferred exchange to use for the p2p payment.
exchangeBaseUrl?: string;
// Instructed amount.
amount: AmountString;
// Restrict the scope of funds that can be spent via the given
// scope info.
restrictScope?: ScopeInfo;
progressToken?: string;
}
interface CheckPeerPushDebitOkResponse {
type: "ok";
amountRaw: AmountString;
amountEffective: AmountString;
// Exchange base URL.
exchangeBaseUrl: string;
// Maximum expiration date, based on how close the coins used for
// the payment are to expiry. The value is based on when the
// wallet would typically refresh the coins on its own, leaving
// enough time to get a refund for the push payment and refresh
// the coin.
maxExpirationDate: TalerProtocolTimestamp;
// Default expiration: the default given by the exchange
// (or 1 week if the exchange does not specify it), capped so
// that the purse does not outlive the coins' maxExpirationDate.
defaultExpiration: TalerProtocolDuration;
// Opaque description of the values reviewed by the caller.
// Passing this back to initiatePeerPushDebit makes wallet-core
// reject the operation when coin selection, fees or the selected
// exchange changed in the meantime. Optional for compatibility
// with older wallet-core implementations.
peerPushDebitQuote?: string;
}