Skip to content

Enable Klarna and PayPal on the Banxa buy path#6057

Merged
j0ntz merged 2 commits into
developfrom
jon/banxa-klarna-paypal
Jul 15, 2026
Merged

Enable Klarna and PayPal on the Banxa buy path#6057
j0ntz merged 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

Medium Risk
Touches fiat ramp payment routing and buy-method allowlists; incorrect mapping could hide or mislabel payment options, but scope is limited to Banxa buy configuration and presentation.

Overview
Banxa buy now surfaces Klarna and PayPal by teaching the ramp plugin to accept Banxa’s KLARNACKO and PRIMERPAYPAL codes, map them to Edge klarna / paypal types, and allow both under allowedPaymentTypes.buy (they were previously dropped during payment-method cleaning).

Supporting plumbing adds klarna to the shared fiat payment-type union, buy/sell settlement-range handling, display strings, theme Klarna logo wiring, and unit tests. CHANGELOG notes the new buy options; RampCreateScene gets a testID on the fiat dropdown for automation.

Reviewed by Cursor Bugbot for commit 97f01c4. 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 j0ntz force-pushed the jon/banxa-klarna-paypal branch from 9eb4943 to a0c8ac7 Compare July 14, 2026 00:02
@j0ntz j0ntz force-pushed the jon/banxa-klarna-paypal branch from a0c8ac7 to ddcbfab Compare July 14, 2026 23:57
@j0ntz j0ntz enabled auto-merge July 14, 2026 23:57
j0ntz added 2 commits July 14, 2026 18:43
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 ddcbfab to 97f01c4 Compare July 15, 2026 01:44
@j0ntz j0ntz merged commit 1c1839d into develop Jul 15, 2026
7 checks passed
@j0ntz j0ntz deleted the jon/banxa-klarna-paypal branch July 15, 2026 02:23
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