You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when we create an outgoing payment, we send a outgoing_payment.created webhook to the ASE such that the ASE can check the user account, place a hold on the account for the payment amount, and then call fundOutgoingPayment, to deposit liquidity into the payment. Then, the ILP payment starts sending into the incoming payment.
Sometimes, however, the sending user account may not have enough balance to fulfill the outgoing payment amount. Rafiki does not provide a way for the ASE to notify about this possibility, and as a result, the outgoing payment will indefinitely stay in a FUNDING state.
We should allow the ASE to notify Rafiki about this possibility through a new Admin API, cancelOutgoingPayment (name always up for discussion). cancelOutgoingPayment will take in the outgoingPaymentId and update the state of the outgoing payment to a new state CANCELLED.
The only time an outgoing payment can be marked CANCELLED is if it is in a FUNDING state.
Make sure to also update the OutgoingPayment.failed getter in the model to include this state, so that we properly return failed: true when it is fetched via Open Payments.
Also, there is no need to send a webhook when an outgoing payment has been cancelled.
Todos
Create cancelOutgoingPayment mutation
Update the OutgoingPaymentState enum in the GraphQL API
Update the mock ASE to call this mutation when a user does not have enough balance.
Make sure to add description to the mutation
The text was updated successfully, but these errors were encountered:
Context
Currently, when we create an outgoing payment, we send a
outgoing_payment.created
webhook to the ASE such that the ASE can check the user account, place a hold on the account for the payment amount, and then callfundOutgoingPayment
, to deposit liquidity into the payment. Then, the ILP payment starts sending into the incoming payment.Sometimes, however, the sending user account may not have enough balance to fulfill the outgoing payment amount. Rafiki does not provide a way for the ASE to notify about this possibility, and as a result, the outgoing payment will indefinitely stay in a FUNDING state.
We should allow the ASE to notify Rafiki about this possibility through a new Admin API,
cancelOutgoingPayment
(name always up for discussion).cancelOutgoingPayment
will take in theoutgoingPaymentId
and update the state of the outgoing payment to a new stateCANCELLED
.The only time an outgoing payment can be marked CANCELLED is if it is in a FUNDING state.
Make sure to also update the
OutgoingPayment.failed
getter in the model to include this state, so that we properly returnfailed: true
when it is fetched via Open Payments.Also, there is no need to send a webhook when an outgoing payment has been cancelled.
Todos
cancelOutgoingPayment
mutationOutgoingPaymentState
enum in the GraphQL APIThe text was updated successfully, but these errors were encountered: