hyperswitch
hyperswitch copied to clipboard
feat(authentication): Initial commit to modular authentication create
Type of Change
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
Description
Initial commit to modular authentication create
Additional Changes
- [x] This PR modifies the API contract
- [x] This PR modifies the database schema
Motivation and Context
Create authentication create api for modular authentication
Request
curl --location 'localhost:8080/authentication/create' \
--header 'Content-Type: application/json' \
--header 'api-key: dev_OUNohkfDdQJBZQ7bWHdrfhezONhOhEjO5ilOc33GocU1AXH1P8TmYX5tViJYoIc5' \
--data '{
"amount": 10,
"currency": "USD",
"acquirer_details": {
"bin": "13443",
"merchant_id": null,
"country_code": null
}
}'
Response
{
"authentication_id": "authn_NtY3TDSs37gFli7vYgwD",
"merchant_id": "sahkal",
"status": "started",
"client_secret": "authn_NtY3TDSs37gFli7vYgwD_secret_MUxz520URz0BqowhxY84",
"amount": 10,
"currency": "USD",
"customer": null,
"force_3ds_challenge": false,
"authentication_connector": null,
"return_url": null,
"created_at": "2025-05-22T10:13:10.312Z",
"error_code": null,
"error_message": null,
"metadata": null,
"profile_id": "pro_RAtfSMf2Fo8ejkcX5Aoc",
"browser_info": null,
"psd2_sca_exemption_type": null,
"acquirer_details": {
"bin": "13443",
"merchant_id": null,
"country_code": null
}
}
How did you test it?
Checklist
- [x] I formatted the code
cargo +nightly fmt --all - [x] I addressed lints thrown by
cargo clippy - [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
Changed Files
Need to run migrations for clickhouse to make authentication_connector as Nullable.
Need to discuss the approach and determine whether the existing test data needs to be retained or not
Analytics and Dashboard changes look fine