interledger-pay icon indicating copy to clipboard operation
interledger-pay copied to clipboard

Handle payment intent expired webhook

Open linear[bot] opened this issue 3 weeks ago • 0 comments

When a payment intent expires, Rhyza will send a dedicated webhook. Today the wallet only handles intent created and completed, so an expired intent's transaction stays pending forever. Any funds that arrived before expiry are never credited either.

Under Rafiki, testnet treated incoming payment expiry like completion: it credited whatever had been received. The Rhyza handler should do the same.

Scope

  • Accept and validate the new payment intent expired webhook type.
  • If funds arrived before expiry, credit the receiver and complete the transaction with the amount received. Do the same follow-up as on completion: sender details and the "money received" notification.
  • If no funds arrived, mark the transaction expired without moving money.
  • Make the handler safe when the same webhook arrives twice, or arrives for an intent that's already completed.

Dependency

  • Blocked on Rhyza's payment intent expired webhook, which is still in progress. Once its event name and payload are final (they must include the amount received)

Acceptance criteria

  • An intent that expires partly paid credits the user exactly the amount received and shows as completed with that value.
  • An intent that expires unpaid shows as expired, and no ledger or GateHub transfer happens.
  • Receiving the webhook twice, or after completion, doesn't double-credit.

linear[bot] avatar Nov 09 '26 12:11 linear[bot]