Skip to content

feat(ISS-36): issuer-api acknowledge card authorization webhooks before deciding - #16

Merged
bosbaber merged 1 commit into
mainfrom
stephan/iss-36
Nov 26, 2026
Merged

bosbaber merged 1 commit into
mainfrom
stephan/iss-36

Conversation

@bosbaber

@bosbaber bosbaber commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Issuer API now acknowledges the card_authorization_requested webhook as soon as it has recorded the request, and authorizes the card transaction afterwards. The outcome reaches the Open Payments provider only through card auth verified, never through the webhook answer.

Changes

  • OpenPaymentsWebhookResult.status: processed is replaced by accepted.
  • POST /v1/webhooks/open-payments:
    • the description now covers the new order: the request is recorded, the webhook is answered, and then the transaction is authorized;
    • the outcome is approved, declined, or failed with a reason when no decision could be made;
    • a requestId received before is not authorized again, and its outcome is sent again once decided;
    • a 400 now means the event can never be processed;
    • the 200 response 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)
Loading

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
Loading

@bosbaber
bosbaber marked this pull request as ready for review November 26, 2026 07:54

@koekiebox koekiebox left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@bosbaber
bosbaber merged commit ef4a45d into main Nov 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants