juspay/hyperswitch

[BUG] : [SHIFT4] ThreeDs Payments Failing in Payments Flow

Open

#9376 opened on Sep 15, 2025

View on GitHub
 (6 comments) (0 reactions) (1 assignee)Rust (42,690 stars) (4,676 forks)batch import
S-unassignedgood first issuehacktoberfest

Description

Feature Description/Summary

In the Shift4 connector, 3DS payment requests are failing due to a request payload mismatch. The connector is returning an error indicating that the field card[number] is not recognized.

Context

While integrating with Shift4 for 3DS payments, the connector rejects the request payload. The error suggests that the field card[number] is invalid or incorrectly structured. According to the Shift4 API documentation, card details are expected in a different format. This issue prevents successful processing of 3DS payment flows and needs to be fixed by aligning the request payload with Shift4’s expected schema.

Starter Tasks

  • Investigate why this issue is occuring and what is the format in which the connector (Shift4) is expecting the card[number] field.
  • Look deeper into functions like get_request_body in crates/hyperswitch_connectors/src/connectors/shift4.rs and look for the respective try_form in crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs.

Implementation Hints

  • You can go to the connector documentation (URL) and try and make successful payments for 3ds via the connector's Direct cURLs and then make relevant changes in the Hyperswitch codebase.

Acceptance Criteria

  • Request and Response body added for each of the flows where integrity check is applied.
  • All the required GitHub checks passing
  • Formatted the code using cargo +nightly fmt --all

How to Test it

  • Create a Merchant Account in local
  • Create an API Key
  • Add the connector - Shift4
  • Test out the flows

Mentor Contact

  • Tag @bsayak03 [Sayak Bhattacharya] in the comments if you have any doubts/queries

Resources

Here is the connector documentation link: URL

Pre-Flight

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?

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.

Contributor guide