Skip to content

Enable Klarna and PayPal on the Banxa buy path#6057

Open
j0ntz wants to merge 2 commits into
developfrom
jon/banxa-klarna-paypal
Open

Enable Klarna and PayPal on the Banxa buy path#6057
j0ntz wants to merge 2 commits into
developfrom
jon/banxa-klarna-paypal

Conversation

@j0ntz

@j0ntz j0ntz commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Description

Enables Klarna and PayPal as Buy payment options on the Banxa ramp path.

Banxa already exposes both methods through its payment-methods API (verified live: KLARNACKO for Klarna in SEK and PRIMERPAYPAL for PayPal in EUR, both ACTIVE / FIAT_TO_CRYPTO), but the GUI dropped them because their payment-type codes were not recognized by the Banxa ramp plugin's cleaner. This adds the two codes, maps them to Edge payment types, and allows them on the buy path so they surface in the ramp option list.

Changes (all in the live src/plugins/ramps architecture, which powers the current Buy flow):

  • Add klarna to the FiatPaymentType union (paypal already existed).
  • Banxa ramp plugin: recognize KLARNACKO and PRIMERPAYPAL, map them to klarna / paypal, and set klarna: true / paypal: true under allowedPaymentTypes.buy.
  • Add klarna cases to the buy and sell settlement-range switches and a klarna entry to the payment-type icon map (falls back to the provider icon until a dedicated Klarna asset is added by design).
  • Add the Klarna display name and unit tests for the new display name and icon mapping.

Asana: https://app.asana.com/0/1215088146871429/1215175793390820

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

Testing notes: tsc, jest (436 tests), and verify-repo all pass. The in-app Banxa Buy ramp scene could not be driven on the iOS simulator because RampCreateScene hits a reproducible debug-build RN Fabric RCTTextLayoutManager crash on render (unrelated to this data-only change). Behavior was instead verified directly against the mechanism the UI routes through: the live Banxa payment-methods response was run through the committed typeMap and allowedPaymentTypes.buy, confirming KLARNACKO -> klarna and PRIMERPAYPAL -> paypal are now recognized and allowed on the buy path. A follow-up is noted for design to supply an official Klarna logo asset.


Note

Low Risk
Scoped to fiat ramp payment-type mapping and presentation; no auth, custody, or payment execution logic changes beyond surfacing existing Banxa methods.

Overview
Klarna and PayPal now appear as Banxa buy payment options by wiring Banxa’s KLARNACKO and PRIMERPAYPAL codes through the ramp plugin (recognition, typeMap, and allowedPaymentTypes.buy).

The new klarna fiat payment type is added end-to-end: union type, settlement-time ranges, display strings, theme logo asset, and icon/display helpers, with unit test coverage. RampCreateScene gets testID="rampFiatDropdown" on the fiat currency dropdown for automation.

Reviewed by Cursor Bugbot for commit a0c8ac7. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread src/util/paymentTypeIcons.ts Outdated
@j0ntz j0ntz force-pushed the jon/banxa-klarna-paypal branch from c254821 to 9eb4943 Compare July 13, 2026 23:56
@j0ntz

j0ntz commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

📸 Test evidence: Klarna logo on Banxa buy path (Sweden/SEK)

agent proof 1215175793390820 01 klarna badge banxa buy

agent proof 1215175793390820 01 klarna badge banxa buy

Captured by the agent's in-app test run (build-and-test).

j0ntz added 2 commits July 13, 2026 17:01
Banxa already exposes Klarna (KLARNACKO, SEK) and PayPal (PRIMERPAYPAL,
EUR) via its payment-methods API, but the GUI dropped both because their
payment-type codes were not recognized. Add a klarna FiatPaymentType,
map the two Banxa codes, and allow both on the Banxa buy path so the
options surface in the ramp flow.

PayPal reuses the existing logo and string; Klarna falls back to the
provider icon until a dedicated asset is added.
@j0ntz j0ntz force-pushed the jon/banxa-klarna-paypal branch from 9eb4943 to a0c8ac7 Compare July 14, 2026 00:02
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