Repository navigation
feat(core): a public-key credential for payment providers - #99
Open
alexasomba wants to merge 1 commit into
Open
alexasomba wants to merge 1 commit into
alexasomba wants to merge 1 commit into
Conversation
This was referenced Nov 24, 2026
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.
Part of the Flutterwave set described in #97. Item 2 — a generic core seam, independent of #85 (Paystack) and #98 (the Flutterwave package). No Flutterwave code in core.
Why
Flutterwave Inline, its on-page checkout, is a browser SDK initialised with the account's public key (
FLWPUBK-…). Core's provider settings stored onlysecretKeyandwebhookSecret, and a provider has no KV access, so the server could not hand the browser client the key it needs.The shortcut — deriving the public key from the secret key — is not available. I checked a real test pair:
FLWPUBK_TEST-991d…andFLWSECK_TEST-03d5…have different hash segments.What
PaymentProviderCredentials.publicKeyandcredentialFields.publicKey(label, prefixes, help).settings:<id>PublicKeyin the settings schema,providerCredentialSettingandGET admin/settings_providers, validated against the prefixes the provider declares and masked like the other credentials.loadPaymentProviderCredentialsreturnspublicKeywhen set.What does not change
publicKeyvalue is refused for them (so a typo cannot save a key nothing reads).Tests
provider-credentials-settings.test.ts: saves and loads the public key, validates its prefix, refuses one for a provider that does not declare it, never returns the value (only set/hint), and omits the row entirely for such a provider.tsc --noEmitclean.@dashcommerce/core.Next
Item 3 is #100: the provider declares the field, returns
on_pagewith{ publicKey, txRef, amount, currency, customer… }, and ships a./checkout-clientthat loadscheckout.flutterwave.com/v3.jsonly when the customer presses Pay. The split seams are #101 (core) and #102 (Flutterwave). All are open.