- checkPeerPushDebitV2#
Check if initiating a peer push payment is possible based on the funds in the wallet.
Request:
The request body must be a CheckPeerPushDebitRequest object.
Response:
On success, the result is a CheckPeerPushDebitResponse object, a discriminated union on the
typefield:"ok"(CheckPeerPushDebitOkResponse) carries the reviewed amounts and a quote for initiatePeerPushDebit;"insufficient-balance"(CheckPeerPushDebitInsufficientBalanceResponse) explains why the wallet cannot cover the payment.Side effects:
May refresh the selected exchange’s key material over the network.
Expected errors:
The caller can handle the following errors inline:
WALLET_CORE_API_BAD_REQUEST.An insufficient balance (including the case where no exchange can serve the payment) is not reported as an error but via the typed
"insufficient-balance"result.
type CheckPeerPushDebitResponse =
| CheckPeerPushDebitOkResponse
| CheckPeerPushDebitInsufficientBalanceResponse;
interface CheckPeerPushDebitInsufficientBalanceResponse {
type: "insufficient-balance";
insufficientBalanceDetails: PaymentInsufficientBalanceDetails;
}