Issue:
feat(connector): add template code for stripebilling

add a template code for stripe billing connector

Resolution:
<think>
PR Context:
- Title: feat(connector): add template code for stripebilling
- Merged: 2025-03-03T10:35:30Z
- Files changed: 24 files
- Commits: 12 commits

Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
connector integration template code for stripe billing.

Issue: This PR closes the issue  #7212


### Additional Changes

- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
</think>

To implement this, you'll need to modify:


**Detailed Implementation:**


**Commit 1:** feat(connector): add template code for stripebilling (#7228)
Co-authored-by: Nishanth Challa <nishan
Files to modify:


**crates/common_enums/src/connector_enums.rs**
  Modify existing code

**crates/hyperswitch_connectors/src/connectors.rs**
  Add:
    - mod: pub::stripebilling

**crates/hyperswitch_connectors/src/connectors/stripebilling.rs**
  Add:
    - function: pub::new
    - function: private::build_headers
    - function: private::id
    - function: private::get_currency_unit
    - function: private::common_get_content_type
    - function: private::base_url
    - function: private::get_auth_header
    - function: private::build_error_response
    - function: private::get_headers
    - function: private::get_content_type
    - function: private::get_url
    - function: private::get_request_body
    - function: private::build_request
    - function: private::handle_response
    - function: private::get_error_response
    - function: private::get_headers
    - function: private::get_content_type
    - function: private::get_url
    - function: private::build_request
    - function: private::handle_response
    - function: private::get_error_response
    - function: private::get_headers
    - function: private::get_content_type
    - function: private::get_url
    - function: private::get_request_body
    - function: private::build_request
    - function: private::handle_response
    - function: private::get_error_response
    - function: private::get_headers
    - function: private::get_content_type
    - function: private::get_url
    - function: private::get_request_body
    - function: private::build_request
    - function: private::handle_response
    - function: private::get_error_response
    - function: private::get_headers
    - function: private::get_content_type
    - function: private::get_url
    - function: private::build_request
    - function: private::handle_response
    - function: private::get_error_response
    - function: private::get_webhook_object_reference_id
    - function: private::get_webhook_event_type
    - function: private::get_webhook_resource_object
    - struct: pub::Stripebilling
    - impl: impl Stripebilling
    - impl: impl api::Payment for Stripebilling
    - impl: impl api::PaymentSession for Stripebilling
    - impl: impl api::ConnectorAccessToken for Stripebilling
    - impl: impl api::MandateSetup for Stripebilling
    - impl: impl api::PaymentAuthorize for Stripebilling
    - impl: impl api::PaymentSync for Stripebilling
    - impl: impl api::PaymentCapture for Stripebilling
    - impl: impl api::PaymentVoid for Stripebilling
    - impl: impl api::Refund for Stripebilling
    - impl: impl api::RefundExecute for Stripebilling
    - impl: impl api::RefundSync for Stripebilling
    - impl: impl api::PaymentToken for Stripebilling
    - impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for Stripebilling
    - impl: impl ConnectorCommonExt<Flow, Request, Response> for Stripebilling
    - impl: impl ConnectorCommon for Stripebilling
    - impl: impl ConnectorValidation for Stripebilling
    - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Stripebilling
    - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Stripebilling
    - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Stripebilling
    - impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Stripebilling
    - impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Stripebilling
    - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Stripebilling
    - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Stripebilling
    - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Stripebilling
    - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Stripebilling
    - impl: impl webhooks::IncomingWebhook for Stripebilling
    - impl: impl ConnectorSpecifications for Stripebilling
    - mod: pub::transformers

**crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs**
  Add:
    - function: private::from
    - function: private::try_from
    - function: private::try_from
    - function: private::from
    - function: private::try_from
    - function: private::try_from
    - function: private::from
    - function: private::try_from
    - function: private::try_from
    - struct: pub::StripebillingRouterData
    - struct: pub::StripebillingPaymentsRequest
    - struct: pub::StripebillingCard
    - struct: pub::StripebillingAuthType
    - struct: pub::StripebillingPaymentsResponse
    - struct: pub::StripebillingRefundRequest
    - struct: pub::RefundResponse
    - struct: pub::StripebillingErrorResponse
    - enum: pub::StripebillingPaymentStatus
    - enum: pub::RefundStatus
    - impl: impl From<(StringMinorUnit, T)> for StripebillingRouterData<T>
    - impl: impl TryFrom<&StripebillingRouterData<&PaymentsAuthorizeRouterData>> for StripebillingPaymentsRequest
    - impl: impl TryFrom<&ConnectorAuthType> for StripebillingAuthType
    - impl: impl From<StripebillingPaymentStatus> for common_enums::AttemptStatus
    - impl: impl TryFrom<ResponseRouterData<F, StripebillingPaymentsResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData>
    - impl: impl TryFrom<&StripebillingRouterData<&RefundsRouterData<F>>> for StripebillingRefundRequest
    - impl: impl From<RefundStatus> for enums::RefundStatus
    - impl: impl TryFrom<RefundsResponseRouterData<Execute, RefundResponse>> for RefundsRouterData<Execute>
    - impl: impl TryFrom<RefundsResponseRouterData<RSync, RefundResponse>> for RefundsRouterData<RSync>

**crates/hyperswitch_connectors/src/default_implementations.rs**
  Modify existing code

**crates/hyperswitch_connectors/src/default_implementations_v2.rs**
  Modify existing code

**crates/hyperswitch_interfaces/src/configs.rs**
  Modify existing code

**crates/router/src/connector.rs**
  Modify existing code

**crates/router/src/core/payments/connector_integration_v2_impls.rs**
  Modify existing code

**crates/router/src/core/payments/flows.rs**
  Modify existing code

**crates/router/src/types/api.rs**
  Modify existing code

**crates/router/src/types/transformers.rs**
  Modify existing code

**crates/router/tests/connectors/main.rs**
  Add:
    - mod: private::stripebilling

**crates/router/tests/connectors/stripebilling.rs**
  Add:
    - function: private::get_data
    - function: private::get_auth_token
    - function: private::get_name
    - function: private::get_default_payment_info
    - function: private::payment_method_details
    - function: private::should_only_authorize_payment
    - function: private::should_capture_authorized_payment
    - function: private::should_partially_capture_authorized_payment
    - function: private::should_sync_authorized_payment
    - function: private::should_void_authorized_payment
    - function: private::should_refund_manually_captured_payment
    - function: private::should_partially_refund_manually_captured_payment
    - function: private::should_sync_manually_captured_refund
    - function: private::should_make_payment
    - function: private::should_sync_auto_captured_payment
    - function: private::should_refund_auto_captured_payment
    - function: private::should_partially_refund_succeeded_payment
    - function: private::should_refund_succeeded_payment_multiple_times
    - function: private::should_sync_refund
    - function: private::should_fail_payment_for_incorrect_cvc
    - function: private::should_fail_payment_for_invalid_exp_month
    - function: private::should_fail_payment_for_incorrect_expiry_year
    - function: private::should_fail_void_payment_for_auto_capture
    - function: private::should_fail_capture_for_invalid_payment
    - function: private::should_fail_for_refund_amount_higher_than_payment_amount
    - struct: private::StripebillingTest
    - impl: impl ConnectorActions for StripebillingTest
    - impl: impl utils::Connector for StripebillingTest

**crates/test_utils/src/connector_auth.rs**
  Modify existing code