rafiki
rafiki copied to clipboard
Support outgoing payment withdrawal without event id
Account provider may prefer to poll the state of a created and funded outgoing payment to check for completion/failure and withdraw remaining liquidity.
Outgoing payment liquidity withdrawal is currently only possible with the outgoing_payment.completed
/outgoing_payment.failed
webhook event id:
https://github.com/interledger/rafiki/blob/main/packages/backend/src/graphql/schema.graphql#L101
This would require including the liquidity account balance in the query response. This could also be expanded to apply to incoming payments and payment pointers (SPSP)
We need to re-evaluate whether we should decouple events from withdrawing liquidity.
If we can query for events (by type), this should not be necessary anymore.
I think @DonChangfoot inspired this issue from his initial Rafiki integration attempt. I'm not sure if it'd be preferable for an ASE to poll specific events vs a specific outgoing payment. I'm not not sure if we'd want or be able to support querying events by specific outgoing payment id.
Thank you @wilsonianb. I'll check with @DonChangfoot.
Hey @sabineschaller @wilsonianb. Thanks for checking up on this
We prefer keeping track of just the id
of the outgoing payment and mapping it 1-1 to our internal representation of it. We also prefer using the id
of the payment to poll for its status, make a decision, and then make subsequent calls to drive it to the state we want.
Having a single id
makes that a little easier. Hope that helps.