AllDotPy / AllDotPy/EasySwitch
**Klarna**(Europe)
Open
@Sakshi146-eng is already working on this.
Since Oct 20, 2025.
Adapters
enhancement
Hactoberfest
- Dominant language
- Python
- Stars
- 21
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
Tasks / Implementation Steps
Create Adapter Class
- File: easyswitch/integrators/klarna.py
- Class: KlarnaAdapter(BaseAdapter)
- Register with AdaptersRegistry.
Core Functionalities
- validate_credentials() → Validate Klarna API credentials (username, password, or API key).
- _get_access_token() → Implement authentication using Klarna’s OAuth or Basic Auth API.
- send_payment() → Initiate payment via Klarna’s /payments/v1/authorizations or similar endpoint.
- check_status() → Query payment status using Klarna’s /payments/v1/orders/{order_id} endpoint.
- refund() → Handle full/partial refunds using Klarna’s /payments/v1/orders/{order_id}/captures/{capture_id}/refunds.
- validate_webhook() and parse_webhook() → Validate and parse Klarna webhook events (signature validation and event parsing).
Transaction Normalization
- Map Klarna’s payment states (AUTHORIZED, CAPTURED, CANCELLED, REFUNDED, etc.) to EasySwitch’s TransactionStatus enum.
- Ensure consistent PaymentResponse, TransactionDetail, and TransactionStatusResponse structures.
- Currency & Region Support
- Add supported currencies such as EUR, USD, GBP, SEK, NOK, DKK.
- Define minimum and maximum transaction limits per currency.
Expected Outcome
- KlarnaAdapter integrates seamlessly with the EasySwitch SDK.
- Supports payment, status check, and refund workflows.
- Fully validated and documented according to the EasySwitch adapter pattern.
Can you please assign this task under Hacktoberfest?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.