Skip to content

Enable Klarna and PayPal on the Banxa buy path#6057

Open
j0ntz wants to merge 1 commit into
developfrom
jon/banxa-klarna-paypal
Open

Enable Klarna and PayPal on the Banxa buy path#6057
j0ntz wants to merge 1 commit 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
Data-layer ramp configuration and UI labels only; no auth or payment execution logic changes in-app.

Overview
Banxa buy now surfaces Klarna and PayPal by recognizing Banxa API codes KLARNACKO and PRIMERPAYPAL, mapping them to klarna / paypal, and allowing both under allowedPaymentTypes.buy (PayPal was already a known FiatPaymentType but was not wired for Banxa buy).

Adds klarna to the fiat payment type union, localized Klarna label, settlement-range cases for Klarna on buy/sell, and icon handling where Klarna intentionally has no dedicated asset (null → provider icon). Unit tests cover the new display name and null icon behavior.

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

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.
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.

1 participant