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
Add incoming KYC middleware before account middleware to await ASE response
Success/failure API calls should have their KYC decision data dropped in Redis to be picked up by the middleware by bounded polling:
Cache key would be ase_decision:{incomingPaymentId}
We poll Redis every 50ms (no strong opinion on this duration) for key ase_decision:{incomingPaymentId} until the deadline (now - packet expiry + safety margin):
If value is missing by the deadline → proceed (next()).
If value is 'allow' → proceed (next()).
Else → reject with F99 + reason.
Until approvePartialPayment, continue processing the prepare packet in the next middlewares.
Until rejectPartialPayment, propagate the rejectionReason value (from the rejectPartialPayment API) in the reject packet
KYC middleware should only execute if there is any KYC data on the packet. This should be determined by the STREAM controller beforehand.
ase_decision:{incomingPaymentId}ase_decision:{incomingPaymentId}until the deadline (now - packet expiry + safety margin):approvePartialPayment, continue processing the prepare packet in the next middlewares.rejectPartialPayment, propagate the rejectionReason value (from the rejectPartialPayment API) in the reject packet