diff options
Diffstat (limited to 'taler-wallet.rst')
-rw-r--r-- | taler-wallet.rst | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/taler-wallet.rst b/taler-wallet.rst index 0889224e..12fee3cd 100644 --- a/taler-wallet.rst +++ b/taler-wallet.rst @@ -649,6 +649,51 @@ Prepare Pay :Name: ``"preparePay"`` :Description: Fetch information about a payment request from a merchant. +:Request: + .. ts:def:: PreparePayRequest + + interface PreparePayRequest { + talerPayUri: string; + } +:Response: + .. ts:def:: PreparePayResponse + + type PreparePayResponse = + | PreparePayPaymentPossibleResponse + | PreparePayAlreadyConfirmedResponse + | PreparePayInsufficientBalanceResponse; + + interface PreparePayPaymentPossibleResponse { + status: "payment-possible"; + + proposalId: string; + + // Verbatim contract terms as generated by the merchant. + contractTermsRaw: any; + } + + interface PreparePayInsufficientBalanceResponse { + status: "insufficient-balance"; + + proposalId: string; + + // Verbatim contract terms as generated by the merchant. + contractTermsRaw: any; + } + + interface PreparePayAlreadyConfirmedResponse { + status: "already-confirmed"; + + proposalId: string; + + // Did the payment succeed? + paid: boolean; + + // Redirect URL for the fulfillment page, + // only given if paid==true. + nextUrl?: string; + } + Confirm Payment ~~~~~~~~~~~~~~~ |