[Cypress] Add E2E tests for Klarna SDK payment flow through Klarna
#9,600 opened on Sep 29, 2025
Repository metrics
- Stars
- (42,690 stars)
- PR merge metrics
- (Avg merge 6d 22h) (213 merged PRs in 30d)
Description
Feature Description
Description:
This task involves adding a connector for the klarna functionality in Cypress.
Pre-requisites:
- Understanding of Klarna SDK payment flow
- Experience with Cypress E2E testing
- Knowledge of payment processing flows (authorize, capture, void, refund)
- Please follow the README for guidelines
Possible Implementation
Steps:
-
Add the Klarna connector .js files under the PaymentUtils directory: PaymentUtils Directory
-
- Add the Klarna test configuration file
Klarna.js, following the format used in the Stripe.js connector.
- Add the Klarna test configuration file
-
In the Klarna connector config, map the test cases and statuses properly for klarna SDK flows. To do this, use the below dashboard credentials where Klarna should be configured, test the flows, and then assign the correct statuses.
URL: https://app.hyperswitch.io Username, Password: Please drop a comment requesting credentials. The Creds are only shared on request
Possible Implementation
Test Cases:
- Add test cases for Klarna pay-later payment method (payment_method: "pay_later", payment_method_type: "klarna")
- Include SDK flow (KlarnaSdk with token)
Test Scenarios to Include:
- Session creation flows
- Payment authorization for SDK flows
- Payment capture (manual and auto)
- Payment sync
- Payment void/cancel
- Refund (full and partial)
Note:
- Focus on pay_later payment method with Klarna payment_method_type
- Test cases for other payment methods should be skipped
Submission Process: Ask the maintainers for assignment of the issue, you can request for assignment by commenting on the issue itself. Once assigned, submit a pull request (PR). Maintainers will review and provide feedback, if any. Maintainers can unassign issues due to inactivity, read more here. Refer here for Terms and conditions for the contest.
Have you spent some time checking if this feature request has been raised before?
- I checked and didn't find a similar issue
Have you read the Contributing Guidelines?
- I have read the Contributing Guidelines
Are you willing to submit a PR?
None