summaryrefslogtreecommitdiff
path: root/core/api-bank-integration.rst
diff options
context:
space:
mode:
Diffstat (limited to 'core/api-bank-integration.rst')
-rw-r--r--core/api-bank-integration.rst74
1 files changed, 0 insertions, 74 deletions
diff --git a/core/api-bank-integration.rst b/core/api-bank-integration.rst
index caf706a7..8f422fe5 100644
--- a/core/api-bank-integration.rst
+++ b/core/api-bank-integration.rst
@@ -242,80 +242,6 @@ for the withdrawal operation (the ``WITHDRAWAL_ID``) to interact with the withdr
transfer_done: boolean;
}
-.. http:post:: /withdrawal-operation/$WITHDRAWAL_ID/confirm
-
- Endpoint for providers to notify the bank about a payment having happened.
- This will cause the bank to validate the transaction and allow the
- withdrawal to proceed. The API is idempotent, meaning sending a payment
- notification for the same ``WITHDRAWAL_ID`` return successfuly but not
- change anything. This endpoint is always *optional*, the bank, exchange and
- wallet should all eventually notice the wire transfer with or without this
- endpoint being called. However, by calling this endpoint checks that might
- otherwise only happen periodically can be triggered immediately.
-
- .. note::
-
- A bank shall **never** just accept this claim that the payment was
- confirmed, but instead needs to internally attest that the payment was
- successful using provider-specific transaction validation logic! The point
- of this endpoint is merely to trigger this validation **now**.
-
- Since protocol **vC2EC**.
-
- FIXME: If this is *just* a trigger, what is the point in supplying the body?
- After all, a wallet could just do the same POST and then we'd store/process
- completely bogus information!
-
- FIXME: why not use /accounts/$USERNAME/withdrawals/$WITHDRAWAL_ID/confirm (and/or /accounts/$USERNAME/withdrawals?) instead?
-
- **Request:**
-
- The body of the request must be a `BankWithdrawalConfirmationRequest`.
-
- **Response:**
-
- :http:statuscode:`204 No content`:
- The payment notification was processed successfully.
- :http:statuscode:`404 Not found`:
- The withdrawal operation was not found.
- :http:statuscode:`409 Conflict`:
- The withdrawal operation has been aborted previously and can't be aborted
-
- **Details:**
-
- .. ts:def:: BankWithdrawalConfirmationRequest
-
- interface WithdrawalConfirmationRequest {
-
- // The provider specific transaction identifier.
- // This identifier is used by the bank to attest the
- // payment at the providers backend.
- //
- // FIXME: how is this used?
- // FIXME: what if it is wrong?
- provider_transaction_id: string;
-
- // An identifier, which identifies the device
- // processing the payment for the withdrawal
- // triggering the confirmation (e.g. Terminal
- // or ATM). This is needed to link the withdrawal
- // to a terminal owned by a specific provider.
- // This will decide about how the withdrawal
- // is attested. The device must be known to
- // the exchange and be somehow registered.
- //
- // FIXME: probably more general to use a *string*.
- // FIXME: how is this used?
- terminal_id: number;
-
- // The amount to withdraw. Fees are to be sent in the
- // separate field 'fees' and not included in the amount.
- amount: Amount;
-
- // The fees, the customer paid at the providers facility.
- card_fees: Amount;
- }
-
.. http:post:: /withdrawal-operation/$WITHDRAWAL_ID/abort