juspay / juspay/hyperswitch

[BUG] : [Square] Card payments fail with Bad Request

Open
#3,974 0 comments 0 reactions 0 assignees View on GitHub
A-connector-compatibility A-connector-integration C-bug S-awaiting-triage
Dominant language
Rust
Stars
43.7k
Forks
5.1k
Avg merge
2d 20h
Merged PRs (30d)
205

Description

### Bug Description

Square payments fail with an invalid request error as shown below.
This error happens in Tokenization flow of square
`SquareErrorResponse { errors: [SquareErrorDetails { category: Some("INVALID_REQUEST_ERROR"), code: Some("BAD_REQUEST"), detail: Some("Bad request.`

### Expected Behavior

The payment request must be accepted by square

### Actual Behavior

The payment request is rejected by square

### Steps To Reproduce

Provide an unambiguous set of steps to reproduce this bug. Include code or configuration to reproduce, if relevant.
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
1. Make a card payment with square

### Context For The Bug

_No response_

### Environment

Are you using hyperswitch hosted version? Yes/No
If yes, please provide the value of the `x-request-id` response header to help us debug your issue.

If not (or if building/running locally), please provide the following details:
1. Operating System or Linux distribution:
2. Rust version (output of `rustc --version`): ``
3. App version (output of `cargo r --features vergen -- --version`): ``

### Have you spent some time checking if this bug has been raised before?

- [X] I checked and didn't find a similar issue

### Have you read the Contributing Guidelines?

- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)

### Are you willing to submit a PR?

None

Contributor guide

Open the contributing guide

Research direction

Start by reproducing a card payment through the Square tokenization flow and capture the complete error and request context. Check the Square payment integration entry points and compare the rejected request with Square's requirements. Done means the payment request is accepted without INVALID_REQUEST_ERROR and the behavior is covered by a reproducible test or documented verification.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
payments
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.