diff --git a/.github/data/cards_info.csv b/.github/data/cards_info.csv
index 4e7a19e4b23..f358214cc90 100644
--- a/.github/data/cards_info.csv
+++ b/.github/data/cards_info.csv
@@ -11,3 +11,4 @@ card_iin,card_issuer,card_network,card_type,card_subtype,card_issuing_country,ba
491761,BANKPOLSKAKASAOPIEKIS.A.(BANKPEKAOSA),Visa,CREDIT,BUSINESS,POLAND,,,,2015-09-07 12:58:50,,
510510,BANKOFHAWAII,Mastercard,CREDIT,,UNITEDSTATES,,,,2015-07-30 05:18:28,,
520474,MASTERCARD INTERNATIONAL,Visa,DEBIT,,UNITEDSTATES,,,840,2016-05-12 18:51:16,2022-12-12 15:17:33,Visa
+378282,AmericanExpress,AmericanExpress,CREDIT,SMALLCORPORATE,INDIA,107,JP_AMEX,,2015-07-25 06:22:06,2021-02-23 07:37:55,
\ No newline at end of file
diff --git a/.github/workflows/CI-pr.yml b/.github/workflows/CI-pr.yml
index d01c26d5112..b337a179959 100644
--- a/.github/workflows/CI-pr.yml
+++ b/.github/workflows/CI-pr.yml
@@ -90,7 +90,7 @@ jobs:
env:
# Use `sccache` for caching compilation artifacts
- RUSTC_WRAPPER: sccache
+ # RUSTC_WRAPPER: sccache
RUSTFLAGS: "-D warnings"
strategy:
@@ -126,11 +126,16 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- - name: Install sccache
- uses: taiki-e/install-action@v2.33.28
- with:
- tool: sccache
- checksum: true
+ # - name: Install sccache
+ # uses: taiki-e/install-action@v2.33.28
+ # with:
+ # tool: sccache
+ # checksum: true
+
+ - name: Install rust cache
+ uses: Swatinem/rust-cache@v2.7.7
+ with:
+ save-if: false
- name: Install cargo-hack
uses: taiki-e/install-action@v2.33.28
@@ -181,7 +186,7 @@ jobs:
env:
# Use `sccache` for caching compilation artifacts
- RUSTC_WRAPPER: sccache
+ # RUSTC_WRAPPER: sccache
RUSTFLAGS: "-D warnings"
strategy:
@@ -229,11 +234,16 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- - name: Install sccache
- uses: taiki-e/install-action@v2.33.28
- with:
- tool: sccache
- checksum: true
+ # - name: Install sccache
+ # uses: taiki-e/install-action@v2.33.28
+ # with:
+ # tool: sccache
+ # checksum: true
+
+ - name: Install rust cache
+ uses: Swatinem/rust-cache@v2.7.7
+ with:
+ save-if: false
- name: Install cargo-hack
uses: taiki-e/install-action@v2.33.28
@@ -259,7 +269,7 @@ jobs:
- name: Run clippy
shell: bash
- run: just clippy --jobs 2
+ run: just clippy
- name: Check Cargo.lock changed
if: ${{ (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name) }}
@@ -315,7 +325,9 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install rust cache
- uses: Swatinem/rust-cache@v2.7.0
+ uses: Swatinem/rust-cache@v2.7.7
+ with:
+ save-if: false
- name: Install just
uses: taiki-e/install-action@v2.41.10
diff --git a/.github/workflows/CI-push.yml b/.github/workflows/CI-push.yml
index e17ce46d850..306e6812594 100644
--- a/.github/workflows/CI-push.yml
+++ b/.github/workflows/CI-push.yml
@@ -43,7 +43,7 @@ jobs:
env:
# Use `sccache` for caching compilation artifacts
- RUSTC_WRAPPER: sccache
+ # RUSTC_WRAPPER: sccache
RUSTFLAGS: "-D warnings"
strategy:
@@ -78,15 +78,15 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- - name: Install sccache
- uses: taiki-e/install-action@v2.33.28
- with:
- tool: sccache
- checksum: true
-
- # - uses: Swatinem/rust-cache@v2.7.0
+ # - name: Install sccache
+ # uses: taiki-e/install-action@v2.33.28
# with:
- # save-if: ${{ github.event_name == 'push' }}
+ # tool: sccache
+ # checksum: true
+
+ - uses: Swatinem/rust-cache@v2.7.7
+ with:
+ save-if: ${{ github.event_name == 'push' }}
- name: Install cargo-hack
uses: baptiste0928/cargo-install@v2.2.0
@@ -140,7 +140,7 @@ jobs:
env:
# Use `sccache` for caching compilation artifacts
- RUSTC_WRAPPER: sccache
+ # RUSTC_WRAPPER: sccache
RUSTFLAGS: "-D warnings"
strategy:
@@ -170,11 +170,11 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- - name: Install sccache
- uses: taiki-e/install-action@v2.33.28
- with:
- tool: sccache
- checksum: true
+ # - name: Install sccache
+ # uses: taiki-e/install-action@v2.33.28
+ # with:
+ # tool: sccache
+ # checksum: true
- name: Install cargo-hack
uses: baptiste0928/cargo-install@v2.2.0
@@ -196,13 +196,13 @@ jobs:
# with:
# crate: cargo-nextest
- # - uses: Swatinem/rust-cache@v2.7.0
- # with:
- # save-if: ${{ github.event_name == 'push' }}
+ - uses: Swatinem/rust-cache@v2.7.7
+ with:
+ save-if: ${{ github.event_name == 'push' }}
- name: Run clippy
shell: bash
- run: just clippy --jobs 2
+ run: just clippy
- name: Cargo hack
if: ${{ github.event_name == 'push' }}
@@ -249,7 +249,7 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install rust cache
- uses: Swatinem/rust-cache@v2.7.0
+ uses: Swatinem/rust-cache@v2.7.7
- name: Run cargo check enabling only the release and v2 features
shell: bash
diff --git a/.github/workflows/connector-sanity-tests.yml b/.github/workflows/connector-sanity-tests.yml
index 48e6a946a45..1f10828de9d 100644
--- a/.github/workflows/connector-sanity-tests.yml
+++ b/.github/workflows/connector-sanity-tests.yml
@@ -86,7 +86,9 @@ jobs:
with:
toolchain: stable 2 weeks ago
- - uses: Swatinem/rust-cache@v2.7.0
+ - uses: Swatinem/rust-cache@v2.7.7
+ with:
+ save-if: false
- name: Decrypt connector auth file
env:
diff --git a/.github/workflows/connector-ui-sanity-tests.yml b/.github/workflows/connector-ui-sanity-tests.yml
index f3d4635ab11..9cad6191f06 100644
--- a/.github/workflows/connector-ui-sanity-tests.yml
+++ b/.github/workflows/connector-ui-sanity-tests.yml
@@ -122,7 +122,9 @@ jobs:
toolchain: stable
- name: Build and Cache Rust Dependencies
- uses: Swatinem/rust-cache@v2.7.0
+ uses: Swatinem/rust-cache@v2.7.7
+ with:
+ save-if: false
- name: Install Diesel CLI with Postgres Support
uses: baptiste0928/cargo-install@v2.2.0
diff --git a/.github/workflows/cypress-tests-runner.yml b/.github/workflows/cypress-tests-runner.yml
index 72429627ff7..4de046499ab 100644
--- a/.github/workflows/cypress-tests-runner.yml
+++ b/.github/workflows/cypress-tests-runner.yml
@@ -170,13 +170,6 @@ jobs:
tool: sccache
checksum: true
- - name: Install cargo-nextest
- if: ${{ env.RUN_TESTS == 'true' }}
- uses: taiki-e/install-action@v2.41.10
- with:
- tool: cargo-nextest
- checksum: true
-
- name: Install Diesel CLI
if: ${{ env.RUN_TESTS == 'true' }}
uses: baptiste0928/cargo-install@v3.1.1
@@ -266,3 +259,211 @@ jobs:
path: |
cypress-tests/cypress/reports/
retention-days: 1
+
+ runner_v2:
+ name: Run Cypress tests on v2 and generate coverage report
+ runs-on: hyperswitch-runners
+ env:
+ CODECOV_FILE: "lcov.info"
+
+ services:
+ redis:
+ image: "public.ecr.aws/docker/library/redis:alpine"
+ options: >-
+ --health-cmd "redis-cli ping"
+ --health-interval 10s
+ --health-timeout 5s
+ --health-retries 5
+ ports:
+ - 6379:6379
+ postgres:
+ image: "public.ecr.aws/docker/library/postgres:alpine"
+ env:
+ POSTGRES_USER: db_user
+ POSTGRES_PASSWORD: db_pass
+ POSTGRES_DB: hyperswitch_db
+ options: >-
+ --health-cmd pg_isready
+ --health-interval 10s
+ --health-timeout 5s
+ --health-retries 5
+ ports:
+ - 5432:5432
+
+ steps:
+ - name: Skip tests for PRs from forks
+ shell: bash
+ if: ${{ env.RUN_TESTS == 'false' }}
+ run: echo 'Skipping tests for PRs from forks'
+
+ - name: Checkout repository
+ if: ${{ env.RUN_TESTS == 'true' }}
+ uses: actions/checkout@v4
+
+ - name: Download Encrypted TOML from S3 and Decrypt
+ if: ${{ env.RUN_TESTS == 'true' }}
+ env:
+ AWS_ACCESS_KEY_ID: ${{ secrets.CONNECTOR_CREDS_AWS_ACCESS_KEY_ID }}
+ AWS_REGION: ${{ secrets.CONNECTOR_CREDS_AWS_REGION }}
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.CONNECTOR_CREDS_AWS_SECRET_ACCESS_KEY }}
+ CONNECTOR_AUTH_PASSPHRASE: ${{ secrets.CONNECTOR_AUTH_PASSPHRASE }}
+ CONNECTOR_CREDS_S3_BUCKET_URI: ${{ secrets.CONNECTOR_CREDS_S3_BUCKET_URI}}
+ DESTINATION_FILE_NAME: "creds.json.gpg"
+ S3_SOURCE_FILE_NAME: "aa328308-b34e-41b7-a590-4fe45cfe7991.json.gpg"
+ shell: bash
+ run: |
+ mkdir -p ".github/secrets" ".github/test"
+
+ aws s3 cp "${CONNECTOR_CREDS_S3_BUCKET_URI}/${S3_SOURCE_FILE_NAME}" ".github/secrets/${DESTINATION_FILE_NAME}"
+ gpg --quiet --batch --yes --decrypt --passphrase="${CONNECTOR_AUTH_PASSPHRASE}" --output ".github/test/creds.json" ".github/secrets/${DESTINATION_FILE_NAME}"
+
+ - name: Set paths in env
+ if: ${{ env.RUN_TESTS == 'true' }}
+ shell: bash
+ run: |
+ echo "CYPRESS_CONNECTOR_AUTH_FILE_PATH=${{ github.workspace }}/.github/test/creds.json" >> $GITHUB_ENV
+
+ - name: Fetch keys
+ if: ${{ env.RUN_TESTS == 'true' }}
+ env:
+ TOML_PATH: "./config/development.toml"
+ run: |
+ LOCAL_ADMIN_API_KEY=$(yq '.secrets.admin_api_key' ${TOML_PATH})
+ echo "CYPRESS_ADMINAPIKEY=${LOCAL_ADMIN_API_KEY}" >> $GITHUB_ENV
+
+ - name: Install mold linker
+ if: ${{ runner.os == 'Linux' && env.RUN_TESTS == 'true' }}
+ uses: rui314/setup-mold@v1
+ with:
+ make-default: true
+
+ - name: Install Rust
+ if: ${{ env.RUN_TESTS == 'true' }}
+ uses: dtolnay/rust-toolchain@master
+ with:
+ toolchain: stable 2 weeks ago
+ components: llvm-tools-preview
+
+ - name: Install sccache
+ if: ${{ env.RUN_TESTS == 'true' }}
+ uses: taiki-e/install-action@v2.41.10
+ with:
+ tool: sccache
+ checksum: true
+
+ - name: Install Diesel CLI
+ if: ${{ env.RUN_TESTS == 'true' }}
+ uses: baptiste0928/cargo-install@v3.1.1
+ with:
+ crate: diesel_cli
+ features: postgres
+ args: --no-default-features
+
+ - name: Install grcov
+ if: ${{ env.RUN_TESTS == 'true' }}
+ uses: taiki-e/install-action@v2.41.10
+ with:
+ tool: grcov
+ checksum: true
+
+ - name: Install Just
+ if: ${{ env.RUN_TESTS == 'true' }}
+ uses: taiki-e/install-action@v2.41.10
+ with:
+ tool: just
+ checksum: true
+
+ - name: Install Node.js
+ if: ${{ env.RUN_TESTS == 'true' }}
+ uses: actions/setup-node@v4
+ with:
+ node-version: '20'
+ cache: 'npm'
+
+ - name: Install Cypress and dependencies
+ if: ${{ env.RUN_TESTS == 'true' }}
+ run: |
+ npm ci --prefix ./cypress-tests-v2
+
+ - name: Run database migrations
+ if: ${{ env.RUN_TESTS == 'true' }}
+ shell: bash
+ env:
+ DATABASE_URL: postgres://db_user:db_pass@localhost:5432/hyperswitch_db
+ run: just migrate_v2 run --locked-schema
+
+ - name: Insert card info into the database
+ if: ${{ env.RUN_TESTS == 'true' }}
+ run: |
+ PGPASSWORD=db_pass psql --host=localhost --port=5432 --username=db_user --dbname=hyperswitch_db --command "\copy cards_info FROM '.github/data/cards_info.csv' DELIMITER ',' CSV HEADER;"
+
+ - name: Build project
+ if: ${{ env.RUN_TESTS == 'true' }}
+ env:
+ RUSTFLAGS: "-Cinstrument-coverage"
+ run: just build_v2 --jobs 3
+
+ - name: Setup Local Server
+ if: ${{ env.RUN_TESTS == 'true' }}
+ env:
+ LLVM_PROFILE_FILE: "coverage.profraw"
+ run: |
+ # Start the server in the background
+ target/debug/router &
+
+ SERVER_PID=$!
+ echo "PID=${SERVER_PID}" >> $GITHUB_ENV
+
+ # Wait for the server to start in port 8080
+ COUNT=0
+ while ! nc -z localhost 8080; do
+ if [ $COUNT -gt 12 ]; then # Wait for up to 2 minutes (12 * 10 seconds)
+ echo "Server did not start within a reasonable time. Exiting."
+ kill ${SERVER_PID}
+ exit 1
+ else
+ COUNT=$((COUNT+1))
+ sleep 10
+ fi
+ done
+
+ - name: Run Cypress tests
+ if: ${{ env.RUN_TESTS == 'true' }}
+ env:
+ CYPRESS_BASEURL: "http://localhost:8080"
+ ROUTER__SERVER__WORKERS: 4
+ shell: bash -leuo pipefail {0}
+ continue-on-error: true
+ # We aren't specifying `command` and `jobs` arguments currently
+ run: scripts/execute_cypress.sh "" "" "cypress-tests-v2"
+
+ - name: Stop running server
+ if: ${{ env.RUN_TESTS == 'true' }} && always()
+ run: |
+ kill "${{ env.PID }}"
+
+ - name: Upload Cypress test results
+ if: env.RUN_TESTS == 'true' && failure()
+ uses: actions/upload-artifact@v4
+ with:
+ name: cypress-v2-test-results
+ path: |
+ cypress-tests-v2/cypress/reports/
+ retention-days: 1
+
+ # Notes:
+ # - The `router` process must be killed (using SIGINT/SIGTERM) to generate the `coverage.profraw` file, otherwise the coverage will only be generated for the buildscripts
+ # - Trying to generate branch coverage using "-Z coverage-options=branch" currently fails. Both grcov and cargo-llvm-cov crash when trying
+ # to process the generated `.profraw` files.
+ # - --keep-only argument is used to exclude external crates in generated lcov.info file (~500MiB -> ~70MiB)
+ - name: Process coverage report
+ if: ${{ env.RUN_TESTS == 'true' && github.event_name != 'merge_group' }}
+ run: grcov . --source-dir . --output-types lcov --output-path ${{ env.CODECOV_FILE }} --binary-path ./target/debug --keep-only "crates/*"
+
+ - name: Upload coverage reports to Codecov
+ uses: codecov/codecov-action@v5
+ if: ${{ env.RUN_TESTS == 'true' && github.event_name != 'merge_group'}}
+ with:
+ token: ${{ secrets.CODECOV_TOKEN }}
+ files: ${{ env.CODECOV_FILE }}
+ disable_search: true
\ No newline at end of file
diff --git a/.github/workflows/postman-collection-runner.yml b/.github/workflows/postman-collection-runner.yml
index b8ce65f4b6c..bc6bd7849fe 100644
--- a/.github/workflows/postman-collection-runner.yml
+++ b/.github/workflows/postman-collection-runner.yml
@@ -92,7 +92,9 @@ jobs:
- name: Build and Cache Rust Dependencies
if: ${{ ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name)) || (github.event_name == 'merge_group')}}
- uses: Swatinem/rust-cache@v2.7.0
+ uses: Swatinem/rust-cache@v2.7.7
+ with:
+ save-if: false
- name: Install Protoc
if: ${{ ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name)) || (github.event_name == 'merge_group')}}
diff --git a/.gitignore b/.gitignore
index dcbeddf7ada..d53145b33ee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -241,6 +241,7 @@ $RECYCLE.BIN/
# hyperswitch Project specific excludes
# code coverage report
*.profraw
+lcov.info
html/
coverage.json
# other
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f8594f6be28..8ed7f89e30e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,70 @@ All notable changes to HyperSwitch will be documented here.
- - -
+## 2025.01.31.0
+
+### Miscellaneous Tasks
+
+- **postman:** Update Postman collection files ([`3af63a7`](https://github.com/juspay/hyperswitch/commit/3af63a7c92033cd1aeedf90e31209de088e5b78d))
+
+**Full Changelog:** [`2025.01.30.0...2025.01.31.0`](https://github.com/juspay/hyperswitch/compare/2025.01.30.0...2025.01.31.0)
+
+- - -
+
+## 2025.01.30.0
+
+### Features
+
+- **connector:** Add template code for chargebee ([#7036](https://github.com/juspay/hyperswitch/pull/7036)) ([`ad5491f`](https://github.com/juspay/hyperswitch/commit/ad5491f15bd8f61b2a918f584fe85132986176ad))
+- **router:** Add accept-language from request headers into browser-info ([#7074](https://github.com/juspay/hyperswitch/pull/7074)) ([`5381eb9`](https://github.com/juspay/hyperswitch/commit/5381eb992228164b552260c7ebb8a4cdbc1b3cb3))
+
+### Refactors
+
+- **euclid:** Update proto file for elimination routing ([#7032](https://github.com/juspay/hyperswitch/pull/7032)) ([`275958a`](https://github.com/juspay/hyperswitch/commit/275958af14d0eb4385c995308fbf958c6b620e4f))
+
+### Miscellaneous Tasks
+
+- Run clippy with default number of jobs in github workflows ([#7088](https://github.com/juspay/hyperswitch/pull/7088)) ([`337095b`](https://github.com/juspay/hyperswitch/commit/337095bce8c57be9a9a2ff8356ca9b70917b9851))
+
+**Full Changelog:** [`2025.01.29.0...2025.01.30.0`](https://github.com/juspay/hyperswitch/compare/2025.01.29.0...2025.01.30.0)
+
+- - -
+
+## 2025.01.29.0
+
+### Bug Fixes
+
+- **multitenancy:** Add a fallback for get commands in redis ([#7043](https://github.com/juspay/hyperswitch/pull/7043)) ([`5707297`](https://github.com/juspay/hyperswitch/commit/5707297621538ccf47f7314ca564783d6f289317))
+
+### Refactors
+
+- **currency_conversion:** Re frame the currency_conversion crate to make api calls on background thread ([#6906](https://github.com/juspay/hyperswitch/pull/6906)) ([`858866f`](https://github.com/juspay/hyperswitch/commit/858866f9f361c16b76ed79b42814b648f2050f08))
+- **router:** Prioritise `connector_mandate_id` over `network_transaction_id` during MITs ([#7081](https://github.com/juspay/hyperswitch/pull/7081)) ([`5ff57fa`](https://github.com/juspay/hyperswitch/commit/5ff57fa3374cd4bb6ff211057d7280b6fd1ea321))
+
+### Miscellaneous Tasks
+
+- Fix `toml` format to address wasm build failure ([#6967](https://github.com/juspay/hyperswitch/pull/6967)) ([`ecab2b1`](https://github.com/juspay/hyperswitch/commit/ecab2b1f512eb7e78ca2e75c20b3adc753b97a2f))
+- Add stripe to network transaction id support ([#7096](https://github.com/juspay/hyperswitch/pull/7096)) ([`4cf011f`](https://github.com/juspay/hyperswitch/commit/4cf011f9886de419b48576f5d4ef77fdcfc2d4ad))
+
+**Full Changelog:** [`2025.01.27.0...2025.01.29.0`](https://github.com/juspay/hyperswitch/compare/2025.01.27.0...2025.01.29.0)
+
+- - -
+
+## 2025.01.27.0
+
+### Bug Fixes
+
+- **connectors:** [worldpay] send decoded token for ApplePay ([#7069](https://github.com/juspay/hyperswitch/pull/7069)) ([`7fd3551`](https://github.com/juspay/hyperswitch/commit/7fd3551afd7122ed28fe5532639e4a256863de6b))
+- **cypress:** Uncaught exceptions thrown by `hyperswitch.io` ([#7092](https://github.com/juspay/hyperswitch/pull/7092)) ([`cf82861`](https://github.com/juspay/hyperswitch/commit/cf82861e855bbd055fcbfc2367b23eaa58d8f842))
+
+### Refactors
+
+- **cypress:** Move memory cache tests out of payment for misc ([#6992](https://github.com/juspay/hyperswitch/pull/6992)) ([`4382fc6`](https://github.com/juspay/hyperswitch/commit/4382fc650ae586e5244f2c68ec0fba536caa88a9))
+
+**Full Changelog:** [`2025.01.23.0...2025.01.27.0`](https://github.com/juspay/hyperswitch/compare/2025.01.23.0...2025.01.27.0)
+
+- - -
+
## 2025.01.23.0
### Features
diff --git a/README.md b/README.md
index c09176b172a..5b5518d31fc 100644
--- a/README.md
+++ b/README.md
@@ -19,6 +19,10 @@ Single API to access the payments ecosystem and its features
+
+
diff --git a/api-reference-v2/openapi_spec.json b/api-reference-v2/openapi_spec.json
index b7a6c3a203c..92394521a2c 100644
--- a/api-reference-v2/openapi_spec.json
+++ b/api-reference-v2/openapi_spec.json
@@ -5696,6 +5696,11 @@
"type": "string",
"description": "The device model of the client",
"nullable": true
+ },
+ "accept_language": {
+ "type": "string",
+ "description": "Accept-language of the browser",
+ "nullable": true
}
}
},
diff --git a/api-reference/mint.json b/api-reference/mint.json
index 1130da2ffb0..a134b3c5b2b 100644
--- a/api-reference/mint.json
+++ b/api-reference/mint.json
@@ -15,10 +15,6 @@
}
},
"tabs": [
- {
- "name": "API Reference",
- "url": "api-reference"
- },
{
"name": "Locker API Reference",
"url": "locker-api-reference"
@@ -38,212 +34,222 @@
]
},
{
- "group": "Payments",
- "pages": [
- "api-reference/payments/payments--create",
- "api-reference/payments/payments--update",
- "api-reference/payments/payments--confirm",
- "api-reference/payments/payments--retrieve",
- "api-reference/payments/payments--cancel",
- "api-reference/payments/payments--capture",
- "api-reference/payments/payments--incremental-authorization",
- "api-reference/payments/payments--session-token",
- "api-reference/payments/payments-link--retrieve",
- "api-reference/payments/payments--list",
- "api-reference/payments/payments--external-3ds-authentication",
- "api-reference/payments/payments--complete-authorize"
- ]
- },
- {
- "group": "Payment Methods",
- "pages": [
- "api-reference/payment-methods/paymentmethods--create",
- "api-reference/payment-methods/payment-method--retrieve",
- "api-reference/payment-methods/payment-method--update",
- "api-reference/payment-methods/payment-method--delete",
- "api-reference/payment-methods/payment-method--set-default-payment-method-for-customer",
- "api-reference/payment-methods/list-payment-methods-for-a-merchant",
- "api-reference/payment-methods/list-customer-saved-payment-methods-for-a-payment",
- "api-reference/payment-methods/list-payment-methods-for-a-customer",
- "api-reference/customer-set-default-payment-method/customers--set-default-payment-method"
- ]
- },
- {
- "group": "Customers",
- "pages": [
- "api-reference/customers/customers--create",
- "api-reference/customers/customers--retrieve",
- "api-reference/customers/customers--update",
- "api-reference/customers/customers--delete",
- "api-reference/customers/customers--list"
- ]
- },
- {
- "group": "Mandates",
- "pages": [
- "api-reference/mandates/mandates--revoke-mandate",
- "api-reference/mandates/mandates--retrieve-mandate",
- "api-reference/mandates/mandates--customer-mandates-list"
- ]
- },
- {
- "group": "Refunds",
- "pages": [
- "api-reference/refunds/refunds--create",
- "api-reference/refunds/refunds--update",
- "api-reference/refunds/refunds--retrieve",
- "api-reference/refunds/refunds--list"
- ]
- },
- {
- "group": "Disputes",
- "pages": [
- "api-reference/disputes/disputes--retrieve",
- "api-reference/disputes/disputes--list"
- ]
- },
- {
- "group": "Organization",
- "pages": [
- "api-reference/organization/organization--create",
- "api-reference/organization/organization--retrieve",
- "api-reference/organization/organization--update"
- ]
- },
- {
- "group": "Merchant Account",
- "pages": [
- "api-reference/merchant-account/merchant-account--create",
- "api-reference/merchant-account/merchant-account--retrieve",
- "api-reference/merchant-account/merchant-account--update",
- "api-reference/merchant-account/merchant-account--delete",
- "api-reference/merchant-account/merchant-account--kv-status"
- ]
- },
- {
- "group": "Business Profile",
- "pages": [
- "api-reference/business-profile/business-profile--create",
- "api-reference/business-profile/business-profile--update",
- "api-reference/business-profile/business-profile--retrieve",
- "api-reference/business-profile/business-profile--delete",
- "api-reference/business-profile/business-profile--list"
- ]
- },
- {
- "group": "API Key",
+ "group": "API Reference",
"pages": [
- "api-reference/api-key/api-key--create",
- "api-reference/api-key/api-key--retrieve",
- "api-reference/api-key/api-key--update",
- "api-reference/api-key/api-key--revoke",
- "api-reference/api-key/api-key--list"
+ {
+ "group": "Payments",
+ "pages": [
+ "api-reference/payments/payments--create",
+ "api-reference/payments/payments--update",
+ "api-reference/payments/payments--confirm",
+ "api-reference/payments/payments--retrieve",
+ "api-reference/payments/payments--cancel",
+ "api-reference/payments/payments--capture",
+ "api-reference/payments/payments--incremental-authorization",
+ "api-reference/payments/payments--session-token",
+ "api-reference/payments/payments-link--retrieve",
+ "api-reference/payments/payments--list",
+ "api-reference/payments/payments--external-3ds-authentication",
+ "api-reference/payments/payments--complete-authorize"
+ ]
+ },
+ {
+ "group": "Payment Methods",
+ "pages": [
+ "api-reference/payment-methods/paymentmethods--create",
+ "api-reference/payment-methods/payment-method--retrieve",
+ "api-reference/payment-methods/payment-method--update",
+ "api-reference/payment-methods/payment-method--delete",
+ "api-reference/payment-methods/payment-method--set-default-payment-method-for-customer",
+ "api-reference/payment-methods/list-payment-methods-for-a-merchant",
+ "api-reference/payment-methods/list-customer-saved-payment-methods-for-a-payment",
+ "api-reference/payment-methods/list-payment-methods-for-a-customer",
+ "api-reference/customer-set-default-payment-method/customers--set-default-payment-method"
+ ]
+ },
+ {
+ "group": "Customers",
+ "pages": [
+ "api-reference/customers/customers--create",
+ "api-reference/customers/customers--retrieve",
+ "api-reference/customers/customers--update",
+ "api-reference/customers/customers--delete",
+ "api-reference/customers/customers--list"
+ ]
+ },
+ {
+ "group": "Mandates",
+ "pages": [
+ "api-reference/mandates/mandates--revoke-mandate",
+ "api-reference/mandates/mandates--retrieve-mandate",
+ "api-reference/mandates/mandates--customer-mandates-list"
+ ]
+ },
+ {
+ "group": "Refunds",
+ "pages": [
+ "api-reference/refunds/refunds--create",
+ "api-reference/refunds/refunds--update",
+ "api-reference/refunds/refunds--retrieve",
+ "api-reference/refunds/refunds--list"
+ ]
+ },
+ {
+ "group": "Disputes",
+ "pages": [
+ "api-reference/disputes/disputes--retrieve",
+ "api-reference/disputes/disputes--list"
+ ]
+ },
+ {
+ "group": "Organization",
+ "pages": [
+ "api-reference/organization/organization--create",
+ "api-reference/organization/organization--retrieve",
+ "api-reference/organization/organization--update"
+ ]
+ },
+ {
+ "group": "Merchant Account",
+ "pages": [
+ "api-reference/merchant-account/merchant-account--create",
+ "api-reference/merchant-account/merchant-account--retrieve",
+ "api-reference/merchant-account/merchant-account--update",
+ "api-reference/merchant-account/merchant-account--delete",
+ "api-reference/merchant-account/merchant-account--kv-status"
+ ]
+ },
+ {
+ "group": "Business Profile",
+ "pages": [
+ "api-reference/business-profile/business-profile--create",
+ "api-reference/business-profile/business-profile--update",
+ "api-reference/business-profile/business-profile--retrieve",
+ "api-reference/business-profile/business-profile--delete",
+ "api-reference/business-profile/business-profile--list"
+ ]
+ },
+ {
+ "group": "API Key",
+ "pages": [
+ "api-reference/api-key/api-key--create",
+ "api-reference/api-key/api-key--retrieve",
+ "api-reference/api-key/api-key--update",
+ "api-reference/api-key/api-key--revoke",
+ "api-reference/api-key/api-key--list"
+ ]
+ },
+ {
+ "group": "Merchant Connector Account",
+ "pages": [
+ "api-reference/merchant-connector-account/merchant-connector--create",
+ "api-reference/merchant-connector-account/merchant-connector--retrieve",
+ "api-reference/merchant-connector-account/merchant-connector--update",
+ "api-reference/merchant-connector-account/merchant-connector--delete",
+ "api-reference/merchant-connector-account/merchant-connector--list"
+ ]
+ },
+ {
+ "group": "Payouts",
+ "pages": [
+ "api-reference/payouts/payouts--create",
+ "api-reference/payouts/payouts--update",
+ "api-reference/payouts/payouts--cancel",
+ "api-reference/payouts/payouts--fulfill",
+ "api-reference/payouts/payouts--confirm",
+ "api-reference/payouts/payouts--retrieve",
+ "api-reference/payouts/payouts--list",
+ "api-reference/payouts/payouts--list-filters",
+ "api-reference/payouts/payouts--filter"
+ ]
+ },
+ {
+ "group": "Event",
+ "pages": [
+ "api-reference/event/events--list",
+ "api-reference/event/events--delivery-attempt-list",
+ "api-reference/event/events--manual-retry"
+ ]
+ },
+ {
+ "group": "GSM (Global Status Mapping)",
+ "pages": [
+ "api-reference/gsm/gsm--create",
+ "api-reference/gsm/gsm--get",
+ "api-reference/gsm/gsm--update",
+ "api-reference/gsm/gsm--delete"
+ ]
+ },
+ {
+ "group": "Poll",
+ "pages": ["api-reference/poll/poll--retrieve-poll-status"]
+ },
+ {
+ "group": "Blocklist",
+ "pages": [
+ "api-reference/blocklist/get-blocklist",
+ "api-reference/blocklist/post-blocklist",
+ "api-reference/blocklist/delete-blocklist",
+ "api-reference/blocklist/post-blocklisttoggle"
+ ]
+ },
+ {
+ "group": "Routing",
+ "pages": [
+ "api-reference/routing/routing--list",
+ "api-reference/routing/routing--create",
+ "api-reference/routing/routing--retrieve-config",
+ "api-reference/routing/routing--deactivate",
+ "api-reference/routing/routing--retrieve-default-config",
+ "api-reference/routing/routing--update-default-config",
+ "api-reference/routing/routing--retrieve-default-for-profile",
+ "api-reference/routing/routing--update-default-for-profile",
+ "api-reference/routing/routing--retrieve",
+ "api-reference/routing/routing--activate-config"
+ ]
+ },
+ {
+ "group": "Relay",
+ "pages": [
+ "api-reference/relay/relay",
+ "api-reference/relay/relay--retrieve"
+ ]
+ },
+ {
+ "group": "Schemas",
+ "pages": ["api-reference/schemas/outgoing--webhook"]
+ }
]
},
- {
- "group": "Merchant Connector Account",
- "pages": [
- "api-reference/merchant-connector-account/merchant-connector--create",
- "api-reference/merchant-connector-account/merchant-connector--retrieve",
- "api-reference/merchant-connector-account/merchant-connector--update",
- "api-reference/merchant-connector-account/merchant-connector--delete",
- "api-reference/merchant-connector-account/merchant-connector--list"
- ]
- },
- {
- "group": "Payouts",
- "pages": [
- "api-reference/payouts/payouts--create",
- "api-reference/payouts/payouts--update",
- "api-reference/payouts/payouts--cancel",
- "api-reference/payouts/payouts--fulfill",
- "api-reference/payouts/payouts--confirm",
- "api-reference/payouts/payouts--retrieve",
- "api-reference/payouts/payouts--list",
- "api-reference/payouts/payouts--list-filters",
- "api-reference/payouts/payouts--filter"
- ]
- },
- {
- "group": "Event",
- "pages": [
- "api-reference/event/events--list",
- "api-reference/event/events--delivery-attempt-list",
- "api-reference/event/events--manual-retry"
- ]
- },
- {
- "group": "GSM (Global Status Mapping)",
- "pages": [
- "api-reference/gsm/gsm--create",
- "api-reference/gsm/gsm--get",
- "api-reference/gsm/gsm--update",
- "api-reference/gsm/gsm--delete"
- ]
- },
- {
- "group": "Poll",
- "pages": ["api-reference/poll/poll--retrieve-poll-status"]
- },
{
"group": "Hyperswitch Card Vault",
"pages": ["locker-api-reference/overview"]
},
{
- "group": "Locker - Health",
- "pages": ["locker-api-reference/locker-health/get-health"]
- },
- {
- "group": "Locker - Key Custodian",
- "pages": [
- "locker-api-reference/key-custodian/provide-key-1",
- "locker-api-reference/key-custodian/provide-key-2",
- "locker-api-reference/key-custodian/unlock-the-locker"
- ]
- },
- {
- "group": "Locker - Cards",
+ "group": "API Reference",
"pages": [
- "locker-api-reference/cards/add-data-in-locker",
- "locker-api-reference/cards/delete-data-from-locker",
- "locker-api-reference/cards/retrieve-data-from-locker",
- "locker-api-reference/cards/get-or-insert-the-card-fingerprint"
+ {
+ "group": "Locker - Health",
+ "pages": ["locker-api-reference/locker-health/get-health"]
+ },
+ {
+ "group": "Locker - Key Custodian",
+ "pages": [
+ "locker-api-reference/key-custodian/provide-key-1",
+ "locker-api-reference/key-custodian/provide-key-2",
+ "locker-api-reference/key-custodian/unlock-the-locker"
+ ]
+ },
+ {
+ "group": "Locker - Cards",
+ "pages": [
+ "locker-api-reference/cards/add-data-in-locker",
+ "locker-api-reference/cards/delete-data-from-locker",
+ "locker-api-reference/cards/retrieve-data-from-locker",
+ "locker-api-reference/cards/get-or-insert-the-card-fingerprint"
+ ]
+ }
]
- },
- {
- "group": "Blocklist",
- "pages": [
- "api-reference/blocklist/get-blocklist",
- "api-reference/blocklist/post-blocklist",
- "api-reference/blocklist/delete-blocklist",
- "api-reference/blocklist/post-blocklisttoggle"
- ]
- },
- {
- "group": "Routing",
- "pages": [
- "api-reference/routing/routing--list",
- "api-reference/routing/routing--create",
- "api-reference/routing/routing--retrieve-config",
- "api-reference/routing/routing--deactivate",
- "api-reference/routing/routing--retrieve-default-config",
- "api-reference/routing/routing--update-default-config",
- "api-reference/routing/routing--retrieve-default-for-profile",
- "api-reference/routing/routing--update-default-for-profile",
- "api-reference/routing/routing--retrieve",
- "api-reference/routing/routing--activate-config"
- ]
- },
- {
- "group": "Relay",
- "pages": [
- "api-reference/relay/relay",
- "api-reference/relay/relay--retrieve"
- ]
- },
- {
- "group": "Schemas",
- "pages": ["api-reference/schemas/outgoing--webhook"]
}
],
"footerSocials": {
@@ -256,12 +262,12 @@
},
"analytics": {
"gtm": {
- "tagId": "GTM-PLBNKQFQ"
+ "tagId": "GTM-PLBNKQFQ"
}
},
"analytics": {
"mixpanel": {
- "projectToken": "b00355f29d9548d1333608df71d5d53d"
+ "projectToken": "b00355f29d9548d1333608df71d5d53d"
}
}
}
diff --git a/config/config.example.toml b/config/config.example.toml
index df64cb54e4d..75374e2a381 100644
--- a/config/config.example.toml
+++ b/config/config.example.toml
@@ -74,13 +74,10 @@ max_feed_count = 200 # The maximum number of frames that will be fe
# This section provides configs for currency conversion api
[forex_api]
-call_delay = 21600 # Api calls are made after every 6 hrs
-local_fetch_retry_count = 5 # Fetch from Local cache has retry count as 5
-local_fetch_retry_delay = 1000 # Retry delay for checking write condition
-api_timeout = 20000 # Api timeouts once it crosses 20000 ms
-api_key = "YOUR API KEY HERE" # Api key for making request to foreign exchange Api
-fallback_api_key = "YOUR API KEY" # Api key for the fallback service
-redis_lock_timeout = 26000 # Redis remains write locked for 26000 ms once the acquire_redis_lock is called
+call_delay = 21600 # Expiration time for data in cache as well as redis in seconds
+api_key = "" # Api key for making request to foreign exchange Api
+fallback_api_key = "" # Api key for the fallback service
+redis_lock_timeout = 100 # Redis remains write locked for 100 s once the acquire_redis_lock is called
# Logging configuration. Logging can be either to file or console or both.
@@ -196,6 +193,7 @@ bluesnap.secondary_base_url = "https://sandpay.bluesnap.com/"
boku.base_url = "https://$-api4-stage.boku.com"
braintree.base_url = "https://payments.sandbox.braintree-api.com/graphql"
cashtocode.base_url = "https://cluster05.api-test.cashtocode.com"
+chargebee.base_url = "https://$.chargebee.com/api/"
checkout.base_url = "https://api.sandbox.checkout.com/"
coinbase.base_url = "https://api.commerce.coinbase.com"
cryptopay.base_url = "https://business-sandbox.cryptopay.me"
diff --git a/config/deployments/env_specific.toml b/config/deployments/env_specific.toml
index 811c6e4d0f5..4e5fa3dba44 100644
--- a/config/deployments/env_specific.toml
+++ b/config/deployments/env_specific.toml
@@ -104,13 +104,10 @@ bucket_name = "bucket" # The AWS S3 bucket name for file storage
# This section provides configs for currency conversion api
[forex_api]
-call_delay = 21600 # Api calls are made after every 6 hrs
-local_fetch_retry_count = 5 # Fetch from Local cache has retry count as 5
-local_fetch_retry_delay = 1000 # Retry delay for checking write condition
-api_timeout = 20000 # Api timeouts once it crosses 20000 ms
-api_key = "YOUR API KEY HERE" # Api key for making request to foreign exchange Api
-fallback_api_key = "YOUR API KEY" # Api key for the fallback service
-redis_lock_timeout = 26000 # Redis remains write locked for 26000 ms once the acquire_redis_lock is called
+call_delay = 21600 # Expiration time for data in cache as well as redis in seconds
+api_key = "" # Api key for making request to foreign exchange Api
+fallback_api_key = "" # Api key for the fallback service
+redis_lock_timeout = 100 # Redis remains write locked for 100 s once the acquire_redis_lock is called
[jwekey] # 3 priv/pub key pair
vault_encryption_key = "" # public key in pem format, corresponding private key in rust locker
diff --git a/config/deployments/integration_test.toml b/config/deployments/integration_test.toml
index b6e487e5a3b..d606f192e4e 100644
--- a/config/deployments/integration_test.toml
+++ b/config/deployments/integration_test.toml
@@ -39,6 +39,7 @@ bluesnap.secondary_base_url = "https://sandpay.bluesnap.com/"
boku.base_url = "https://$-api4-stage.boku.com"
braintree.base_url = "https://payments.sandbox.braintree-api.com/graphql"
cashtocode.base_url = "https://cluster05.api-test.cashtocode.com"
+chargebee.base_url = "https://$.chargebee.com/api/"
checkout.base_url = "https://api.sandbox.checkout.com/"
coinbase.base_url = "https://api.commerce.coinbase.com"
cryptopay.base_url = "https://business-sandbox.cryptopay.me"
diff --git a/config/deployments/production.toml b/config/deployments/production.toml
index 3537834fd07..ff5abd3fb03 100644
--- a/config/deployments/production.toml
+++ b/config/deployments/production.toml
@@ -43,6 +43,7 @@ bluesnap.secondary_base_url = "https://pay.bluesnap.com/"
boku.base_url = "https://country-api4-stage.boku.com"
braintree.base_url = "https://payments.braintree-api.com/graphql"
cashtocode.base_url = "https://cluster14.api.cashtocode.com"
+chargebee.base_url = "https://$.chargebee.com/api/"
checkout.base_url = "https://api.checkout.com/"
coinbase.base_url = "https://api.commerce.coinbase.com"
cryptopay.base_url = "https://business.cryptopay.me/"
@@ -191,7 +192,7 @@ card.credit = { connector_list = "cybersource" } # Update Mandate sup
card.debit = { connector_list = "cybersource" } # Update Mandate supported payment method type and connector for card
[network_transaction_id_supported_connectors]
-connector_list = "adyen"
+connector_list = "adyen,stripe"
[payouts]
payout_eligibility = true # Defaults the eligibility of a payout method to true in case connector does not provide checks for payout eligibility
diff --git a/config/deployments/sandbox.toml b/config/deployments/sandbox.toml
index 7242f263672..208621433bb 100644
--- a/config/deployments/sandbox.toml
+++ b/config/deployments/sandbox.toml
@@ -44,6 +44,7 @@ boku.base_url = "https://$-api4-stage.boku.com"
braintree.base_url = "https://payments.sandbox.braintree-api.com/graphql"
cashtocode.base_url = "https://cluster05.api-test.cashtocode.com"
checkout.base_url = "https://api.sandbox.checkout.com/"
+chargebee.base_url = "https://$.chargebee.com/api/"
coinbase.base_url = "https://api.commerce.coinbase.com"
cryptopay.base_url = "https://business-sandbox.cryptopay.me"
cybersource.base_url = "https://apitest.cybersource.com/"
diff --git a/config/development.toml b/config/development.toml
index 3f793ad426d..dc4773db908 100644
--- a/config/development.toml
+++ b/config/development.toml
@@ -78,12 +78,9 @@ ttl_for_storage_in_secs = 220752000
[forex_api]
call_delay = 21600
-local_fetch_retry_count = 5
-local_fetch_retry_delay = 1000
-api_timeout = 20000
-api_key = "YOUR API KEY HERE"
-fallback_api_key = "YOUR API KEY HERE"
-redis_lock_timeout = 26000
+api_key = ""
+fallback_api_key = ""
+redis_lock_timeout = 100
[jwekey]
vault_encryption_key = ""
@@ -215,6 +212,7 @@ bluesnap.secondary_base_url = "https://sandpay.bluesnap.com/"
boku.base_url = "https://$-api4-stage.boku.com"
braintree.base_url = "https://payments.sandbox.braintree-api.com/graphql"
cashtocode.base_url = "https://cluster05.api-test.cashtocode.com"
+chargebee.base_url = "https://$.chargebee.com/api/"
checkout.base_url = "https://api.sandbox.checkout.com/"
coinbase.base_url = "https://api.commerce.coinbase.com"
cryptopay.base_url = "https://business-sandbox.cryptopay.me"
diff --git a/config/docker_compose.toml b/config/docker_compose.toml
index 4296a5931dc..656d4fa7ecb 100644
--- a/config/docker_compose.toml
+++ b/config/docker_compose.toml
@@ -31,12 +31,9 @@ pool_size = 5
[forex_api]
call_delay = 21600
-local_fetch_retry_count = 5
-local_fetch_retry_delay = 1000
-api_timeout = 20000
-api_key = "YOUR API KEY HERE"
-fallback_api_key = "YOUR API KEY HERE"
-redis_lock_timeout = 26000
+api_key = ""
+fallback_api_key = ""
+redis_lock_timeout = 100
[replica_database]
username = "db_user"
@@ -128,6 +125,7 @@ bluesnap.secondary_base_url = "https://sandpay.bluesnap.com/"
boku.base_url = "https://$-api4-stage.boku.com"
braintree.base_url = "https://payments.sandbox.braintree-api.com/graphql"
cashtocode.base_url = "https://cluster05.api-test.cashtocode.com"
+chargebee.base_url = "https://$.chargebee.com/api/"
checkout.base_url = "https://api.sandbox.checkout.com/"
coinbase.base_url = "https://api.commerce.coinbase.com"
cryptopay.base_url = "https://business-sandbox.cryptopay.me"
diff --git a/crates/analytics/docs/README.md b/crates/analytics/docs/README.md
index e24dc6c5af7..71190613a10 100644
--- a/crates/analytics/docs/README.md
+++ b/crates/analytics/docs/README.md
@@ -115,8 +115,8 @@ To configure the Forex APIs, update the `config/development.toml` or `config/doc
```toml
[forex_api]
-api_key = "YOUR API KEY HERE" # Replace the placeholder with your Primary API Key
-fallback_api_key = "YOUR API KEY HERE" # Replace the placeholder with your Fallback API Key
+api_key = ""
+fallback_api_key = ""
```
### Important Note
```bash
@@ -159,4 +159,4 @@ To view the data on the OpenSearch dashboard perform the following steps:
- Select a time field that will be used for time-based queries
- Save the index pattern
-Now, head on to `Discover` under the `OpenSearch Dashboards` tab, to select the newly created index pattern and query the data
\ No newline at end of file
+Now, head on to `Discover` under the `OpenSearch Dashboards` tab, to select the newly created index pattern and query the data
diff --git a/crates/common_enums/src/connector_enums.rs b/crates/common_enums/src/connector_enums.rs
index 0402ae06459..288520722c3 100644
--- a/crates/common_enums/src/connector_enums.rs
+++ b/crates/common_enums/src/connector_enums.rs
@@ -65,6 +65,7 @@ pub enum RoutableConnectors {
Boku,
Braintree,
Cashtocode,
+ // Chargebee,
Checkout,
Coinbase,
Cryptopay,
@@ -199,6 +200,7 @@ pub enum Connector {
Boku,
Braintree,
Cashtocode,
+ // Chargebee,
Checkout,
Coinbase,
Cryptopay,
@@ -350,6 +352,7 @@ impl Connector {
| Self::Boku
| Self::Braintree
| Self::Cashtocode
+ // | Self::Chargebee
| Self::Coinbase
| Self::Cryptopay
| Self::Deutschebank
diff --git a/crates/common_utils/src/types.rs b/crates/common_utils/src/types.rs
index 9e71ca76733..4e88d5c0fde 100644
--- a/crates/common_utils/src/types.rs
+++ b/crates/common_utils/src/types.rs
@@ -1408,6 +1408,9 @@ pub struct BrowserInformation {
/// The device model of the client
pub device_model: Option,
+
+ /// Accept-language of the browser
+ pub accept_language: Option,
}
#[cfg(feature = "v2")]
diff --git a/crates/connector_configs/toml/production.toml b/crates/connector_configs/toml/production.toml
index 35f2f14c748..5b963e07801 100644
--- a/crates/connector_configs/toml/production.toml
+++ b/crates/connector_configs/toml/production.toml
@@ -1478,6 +1478,7 @@ key2="Certificate Key"
payment_method_type = "Visa"
[jpmorgan.connector_auth.BodyKey]
api_key="Access Token"
+key1="Client Secret"
[klarna]
[[klarna.pay_later]]
diff --git a/crates/connector_configs/toml/sandbox.toml b/crates/connector_configs/toml/sandbox.toml
index ed903812219..50c13dc8596 100644
--- a/crates/connector_configs/toml/sandbox.toml
+++ b/crates/connector_configs/toml/sandbox.toml
@@ -1714,6 +1714,7 @@ key2="Certificate Key"
payment_method_type = "Visa"
[jpmorgan.connector_auth.BodyKey]
api_key="Access Token"
+key1="Client Secret"
[klarna]
[[klarna.pay_later]]
@@ -4374,7 +4375,7 @@ placeholder="Enter locale"
required=true
type="Text"
-[[ctp_mastercard.metadata.card_brands]]
+[ctp_mastercard.metadata.card_brands]
name="card_brands"
label="Card Brands"
placeholder="Enter Card Brands"
@@ -4382,28 +4383,28 @@ required=true
type="MultiSelect"
options=["visa","mastercard"]
-[[ctp_mastercard.metadata.acquirer_bin]]
+[ctp_mastercard.metadata.acquirer_bin]
name="acquirer_bin"
label="Acquire Bin"
placeholder="Enter Acquirer Bin"
required=true
type="Text"
-[[ctp_mastercard.metadata.acquirer_merchant_id]]
+[ctp_mastercard.metadata.acquirer_merchant_id]
name="acquirer_merchant_id"
label="Acquire Merchant Id"
placeholder="Enter Acquirer Merchant Id"
required=true
type="Text"
-[[ctp_mastercard.metadata.merchant_category_code]]
+[ctp_mastercard.metadata.merchant_category_code]
name="merchant_category_code"
label="Merchant Category Code"
placeholder="Enter Merchant Category Code"
required=true
type="Text"
-[[ctp_mastercard.metadata.merchant_country_code]]
+[ctp_mastercard.metadata.merchant_country_code]
name="merchant_country_code"
label="Merchant Country Code"
placeholder="Enter Merchant Country Code"
diff --git a/crates/drainer/src/health_check.rs b/crates/drainer/src/health_check.rs
index 2ca2c1cc79c..aaf455663f5 100644
--- a/crates/drainer/src/health_check.rs
+++ b/crates/drainer/src/health_check.rs
@@ -165,21 +165,21 @@ impl HealthCheckInterface for Store {
let redis_conn = self.redis_conn.clone();
redis_conn
- .serialize_and_set_key_with_expiry("test_key", "test_value", 30)
+ .serialize_and_set_key_with_expiry(&"test_key".into(), "test_value", 30)
.await
.change_context(HealthCheckRedisError::SetFailed)?;
logger::debug!("Redis set_key was successful");
redis_conn
- .get_key::<()>("test_key")
+ .get_key::<()>(&"test_key".into())
.await
.change_context(HealthCheckRedisError::GetFailed)?;
logger::debug!("Redis get_key was successful");
redis_conn
- .delete_key("test_key")
+ .delete_key(&"test_key".into())
.await
.change_context(HealthCheckRedisError::DeleteFailed)?;
@@ -187,7 +187,7 @@ impl HealthCheckInterface for Store {
redis_conn
.stream_append_entry(
- TEST_STREAM_NAME,
+ &TEST_STREAM_NAME.into(),
&redis_interface::RedisEntryId::AutoGeneratedID,
TEST_STREAM_DATA.to_vec(),
)
@@ -216,7 +216,7 @@ impl HealthCheckInterface for Store {
redis_conn
.stream_trim_entries(
- TEST_STREAM_NAME,
+ &TEST_STREAM_NAME.into(),
(
redis_interface::StreamCapKind::MinID,
redis_interface::StreamCapTrim::Exact,
diff --git a/crates/drainer/src/stream.rs b/crates/drainer/src/stream.rs
index f5b41c53672..9e092b038e8 100644
--- a/crates/drainer/src/stream.rs
+++ b/crates/drainer/src/stream.rs
@@ -31,7 +31,7 @@ impl Store {
match self
.redis_conn
- .set_key_if_not_exists_with_expiry(stream_key_flag.as_str(), true, None)
+ .set_key_if_not_exists_with_expiry(&stream_key_flag.as_str().into(), true, None)
.await
{
Ok(resp) => resp == redis::types::SetnxReply::KeySet,
@@ -43,7 +43,7 @@ impl Store {
}
pub async fn make_stream_available(&self, stream_name_flag: &str) -> errors::DrainerResult<()> {
- match self.redis_conn.delete_key(stream_name_flag).await {
+ match self.redis_conn.delete_key(&stream_name_flag.into()).await {
Ok(redis::DelReply::KeyDeleted) => Ok(()),
Ok(redis::DelReply::KeyNotDeleted) => {
logger::error!("Tried to unlock a stream which is already unlocked");
@@ -87,14 +87,14 @@ impl Store {
common_utils::date_time::time_it::, _, _>(|| async {
let trim_result = self
.redis_conn
- .stream_trim_entries(stream_name, (trim_kind, trim_type, trim_id))
+ .stream_trim_entries(&stream_name.into(), (trim_kind, trim_type, trim_id))
.await
.map_err(errors::DrainerError::from)?;
// Since xtrim deletes entries below given id excluding the given id.
// Hence, deleting the minimum entry id
self.redis_conn
- .stream_delete_entries(stream_name, minimum_entry_id)
+ .stream_delete_entries(&stream_name.into(), minimum_entry_id)
.await
.map_err(errors::DrainerError::from)?;
diff --git a/crates/hyperswitch_connectors/src/connectors.rs b/crates/hyperswitch_connectors/src/connectors.rs
index bd646c95eb9..15345c8221f 100644
--- a/crates/hyperswitch_connectors/src/connectors.rs
+++ b/crates/hyperswitch_connectors/src/connectors.rs
@@ -8,6 +8,7 @@ pub mod bitpay;
pub mod bluesnap;
pub mod boku;
pub mod cashtocode;
+pub mod chargebee;
pub mod coinbase;
pub mod cryptopay;
pub mod ctp_mastercard;
@@ -59,16 +60,17 @@ pub mod zsl;
pub use self::{
airwallex::Airwallex, amazonpay::Amazonpay, bambora::Bambora, bamboraapac::Bamboraapac,
bankofamerica::Bankofamerica, billwerk::Billwerk, bitpay::Bitpay, bluesnap::Bluesnap,
- boku::Boku, cashtocode::Cashtocode, coinbase::Coinbase, cryptopay::Cryptopay,
- ctp_mastercard::CtpMastercard, cybersource::Cybersource, datatrans::Datatrans,
- deutschebank::Deutschebank, digitalvirgo::Digitalvirgo, dlocal::Dlocal, elavon::Elavon,
- fiserv::Fiserv, fiservemea::Fiservemea, fiuu::Fiuu, forte::Forte, globepay::Globepay,
- gocardless::Gocardless, helcim::Helcim, inespay::Inespay, jpmorgan::Jpmorgan, mollie::Mollie,
- multisafepay::Multisafepay, nexinets::Nexinets, nexixpay::Nexixpay, nomupay::Nomupay,
- novalnet::Novalnet, paybox::Paybox, payeezy::Payeezy, payu::Payu, placetopay::Placetopay,
- powertranz::Powertranz, prophetpay::Prophetpay, rapyd::Rapyd, razorpay::Razorpay,
- redsys::Redsys, shift4::Shift4, square::Square, stax::Stax, taxjar::Taxjar, thunes::Thunes,
- tsys::Tsys, unified_authentication_service::UnifiedAuthenticationService, volt::Volt,
+ boku::Boku, cashtocode::Cashtocode, chargebee::Chargebee, coinbase::Coinbase,
+ cryptopay::Cryptopay, ctp_mastercard::CtpMastercard, cybersource::Cybersource,
+ datatrans::Datatrans, deutschebank::Deutschebank, digitalvirgo::Digitalvirgo, dlocal::Dlocal,
+ elavon::Elavon, fiserv::Fiserv, fiservemea::Fiservemea, fiuu::Fiuu, forte::Forte,
+ globepay::Globepay, gocardless::Gocardless, helcim::Helcim, inespay::Inespay,
+ jpmorgan::Jpmorgan, mollie::Mollie, multisafepay::Multisafepay, nexinets::Nexinets,
+ nexixpay::Nexixpay, nomupay::Nomupay, novalnet::Novalnet, paybox::Paybox, payeezy::Payeezy,
+ payu::Payu, placetopay::Placetopay, powertranz::Powertranz, prophetpay::Prophetpay,
+ rapyd::Rapyd, razorpay::Razorpay, redsys::Redsys, shift4::Shift4, square::Square, stax::Stax,
+ taxjar::Taxjar, thunes::Thunes, tsys::Tsys,
+ unified_authentication_service::UnifiedAuthenticationService, volt::Volt,
wellsfargo::Wellsfargo, worldline::Worldline, worldpay::Worldpay, xendit::Xendit, zen::Zen,
zsl::Zsl,
};
diff --git a/crates/hyperswitch_connectors/src/connectors/chargebee.rs b/crates/hyperswitch_connectors/src/connectors/chargebee.rs
new file mode 100644
index 00000000000..40dd137c281
--- /dev/null
+++ b/crates/hyperswitch_connectors/src/connectors/chargebee.rs
@@ -0,0 +1,568 @@
+pub mod transformers;
+
+use common_utils::{
+ errors::CustomResult,
+ ext_traits::BytesExt,
+ request::{Method, Request, RequestBuilder, RequestContent},
+ types::{AmountConvertor, StringMinorUnit, StringMinorUnitForConnector},
+};
+use error_stack::{report, ResultExt};
+use hyperswitch_domain_models::{
+ router_data::{AccessToken, ConnectorAuthType, ErrorResponse, RouterData},
+ router_flow_types::{
+ access_token_auth::AccessTokenAuth,
+ payments::{Authorize, Capture, PSync, PaymentMethodToken, Session, SetupMandate, Void},
+ refunds::{Execute, RSync},
+ },
+ router_request_types::{
+ AccessTokenRequestData, PaymentMethodTokenizationData, PaymentsAuthorizeData,
+ PaymentsCancelData, PaymentsCaptureData, PaymentsSessionData, PaymentsSyncData,
+ RefundsData, SetupMandateRequestData,
+ },
+ router_response_types::{PaymentsResponseData, RefundsResponseData},
+ types::{
+ PaymentsAuthorizeRouterData, PaymentsCaptureRouterData, PaymentsSyncRouterData,
+ RefundSyncRouterData, RefundsRouterData,
+ },
+};
+use hyperswitch_interfaces::{
+ api::{
+ self, ConnectorCommon, ConnectorCommonExt, ConnectorIntegration, ConnectorSpecifications,
+ ConnectorValidation,
+ },
+ configs::Connectors,
+ errors,
+ events::connector_api_logs::ConnectorEvent,
+ types::{self, Response},
+ webhooks,
+};
+use masking::{ExposeInterface, Mask};
+use transformers as chargebee;
+
+use crate::{constants::headers, types::ResponseRouterData, utils};
+
+#[derive(Clone)]
+pub struct Chargebee {
+ amount_converter: &'static (dyn AmountConvertor