Repository navigation
feat(ISS-36): issuer-api acknowledge card authorization webhooks before deciding - #16
Merged
Merged
Conversation
bosbaber
marked this pull request as ready for review
November 26, 2026 07:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Issuer API now acknowledges the
card_authorization_requestedwebhook as soon as it has recorded the request, and authorizes the card transaction afterwards. The outcome reaches the Open Payments provider only throughcard auth verified, never through the webhook answer.Changes
OpenPaymentsWebhookResult.status:processedis replaced byaccepted.POST /v1/webhooks/open-payments:approved,declined, orfailedwith a reason when no decision could be made;requestIdreceived before is not authorized again, and its outcome is sent again once decided;400now means the event can never be processed;200response is "Event accepted or ignored".OLD BEHAVIOUR
sequenceDiagram participant P as Rhyza participant I as issuer-api participant H as HSM adapter P->>I: POST /v1/webhooks/open-payments (card_authorization_requested) I->>H: AuthoriseTransaction H-->>I: ARC, auth code, ARPC I->>P: POST card auth verified (decision) P-->>I: 2xx I-->>P: 200 processed (acknowledgement)Proposed new behaviour
sequenceDiagram participant P as OpenPaymentsProvider participant I as issuer-api participant DB as DB participant H as HSM adapter P->>I: POST /v1/webhooks/open-payments (card_authorization_requested) I->>DB: record requestId (pending) I-->>P: 200 accepted (acknowledgement) I->>H: AuthoriseTransaction H-->>I: ARC, auth code, ARPC (or error → failed) I->>DB: store outcome I->>P: POST card auth verified (approved / declined / failed) P-->>I: 2xx I->>DB: delivered