Skip to content

[ENHANCEMENT] update payments API response #7794

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kashif-m opened this issue Apr 11, 2025 · 0 comments · Fixed by #7801
Closed

[ENHANCEMENT] update payments API response #7794

kashif-m opened this issue Apr 11, 2025 · 0 comments · Fixed by #7801
Assignees

Comments

@kashif-m
Copy link
Contributor

kashif-m commented Apr 11, 2025

This issue is around two specific fields in the payments API

  1. Payments response -error_code and error_message

HyperSwitch should not propagate the intermediary dummy error codes and error messages to the API response. Currently, ErrorResponse in connector integration mandates setting an error_code and error_message. But some connectors might not have this available during transaction failures. For this reason, current HyperSwitch integration uses NO_ERROR_CODE for error_code and NO_ERROR_MESSAGE for error_message. These are constant strings which are propagated from connector integration to core layer and later sent back in the response. It doesn't make sense to have these in the API response as HyperSwitch should not 'invent' new codes and messages. This should be removed from the API response in such cases.

  1. Payments request - return_url

HyperSwitch should always validate the presence of return_url during payment link creation as it is a required field in payment link flows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant