commit 1c5751f23df1fdb126f9d9e543b3b709300ff2e0 parent 05388518cd255a7f3df7dddad29f99a086fd6489 Author: Sebastian <sebasjm@gmail.com> Date: Wed, 29 Mar 2023 09:04:17 -0300 allow cashout estimation to calculate from credit amount Diffstat:
| M | libeufin/api-sandbox.rst | | | 18 | +++++++++++++++--- |
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/libeufin/api-sandbox.rst b/libeufin/api-sandbox.rst @@ -458,24 +458,36 @@ Cashouts ratio and fee to one input amount. Typically, frontends ask this endpoint before creating cash-out operations. There is **no** financial consequence to this endpoint and only - registered users are allowed to request. + registered users are allowed to request. At least one of + the two query parameters should be provided. Amounts should + always include the currency. **Request:** - :query amount_debit: this is the amount (including the regional currency) - that the user will get deducted from their regional bank account. + :query amount_debit: this is the amount that the user will get + deducted from their regional bank account. + + :query amount_credit: this is the amount that the user will get + will receive in their fiat regional bank account. **Response:** .. ts:def:: CashoutEstimate interface CashoutEstimate { + amount_debit: Amount; // Amount that the user will receive in their fiat // bank account, after having TAN-confirmed the cash-out // operation. amount_credit: Amount; } + :http:statuscode:`200 Ok`: + Response contains the calculated values + :http:statuscode:`400 Conflict`: + Both amount query parameters has been provided and the calculation is not correct or + non of them has been provided. + .. _cashout-rates: .. http:get:: /config