hyperswitch
hyperswitch copied to clipboard
feat(router): add an api to enable `connector_agnostic_mit` feature
Type of Change
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
Description
This pr adds a api to enable usage of Network Transaction/Reference ID in recurring MIT payments. This will be a business profile level feature that a merchant specifies.
Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
Motivation and Context
How did you test it?
- Create a business profile for a merchant
- Use the below curl to enable
connector_agnostic_mit
feature for the business profile
curl --location 'http://localhost:8080/account/:merchant_id/business_profile/:profile_id/toggle_connector_agnostic_mit' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: api_key' \
--data '{
"enabled": true
}'
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
we need not add a separate endpoint for this, have a field in BusinessProfileUpdate
we need not add a separate endpoint for this, have a field in
BusinessProfileUpdate
We need to add api_key
auth support for this endpoint, which is not supported by BusinessProfileUpdate