Repository navigation
Feat/kkiapay widget flow - #8
Merged
Merged
Conversation
Some providers (Kkiapay, and most checkout-style aggregators) cannot start
a payment from the server: the customer starts it in the provider's
widget, and the server verifies it afterwards.
- NextAction `widget` ({ provider, params }) tells the front end which
widget to open
- Capability `widget` + CollectRequest `supportedWidgets`: widget routes
are only used when the front end can open them; they can serve as a
fallback after a server-push provider failed safely
- ProviderResult `merchantReference` and `amount`, recorded on attempts
- payenv.confirm(key, providerRef) links the provider transaction after
checking with the provider that it carries this payment's merchant
reference and amount, so a customer cannot confirm an order with
another (e.g. cheaper) transaction; rejected confirmations leave the
payment unchanged
- refresh leaves a widget payment untouched until it is confirmed
- new error code REFERENCE_MISMATCH
Anti-fraud tests were checked against removing each verification.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Jules Mahounou <234069818+jules-mahounou@users.noreply.github.com>
Kkiapay payments start in its widget; the official server SDK can only verify (`/api/v1/transactions/status`) and refund. The connector: - returns a `widget` next action with the widget parameters (public key only; partnerId = the payment's idempotency key), only when the front end lists `kkiapay` in supportedWidgets - verifies transactions server-side (status, amount, partnerId, failure codes) for payenv.confirm - verifies (constant-time shared secret) and parses webhooks - opt-in sandbox tests driven by .env demo: loads the Kkiapay widget, "Simuler une panne FedaPay" makes FedaPay fail before any money can move so Payenv falls back to the widget, and the widget's transaction id is confirmed server-side. Verified with the server: fallback, refusal without widget support, rejected confirmation leaves the payment unchanged, normal path stays on FedaPay. docs: ADR 0005, architecture, getting started, connectors, quirks, and a changeset (minor) adding the connector to the fixed version group. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Jules Mahounou <234069818+jules-mahounou@users.noreply.github.com>
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.
What & why
Checklist
git commit -s) — see DCOCHANGELOG.md(Unreleased) updated if behavior changed