// AUTO-GENERATED — do not edit by hand.
// Source: services.proto ∩ services/*.rs  |  Regenerate: make generate

use grpc_api_types::payments::{
    CustomerServiceCreateRequest,
    CustomerServiceGetRequest,
    DisputeServiceAcceptRequest,
    DisputeServiceDefendRequest,
    DisputeServiceSubmitEvidenceRequest,
    MerchantAuthenticationServiceCreateClientAuthenticationTokenRequest,
    MerchantAuthenticationServiceCreateServerAuthenticationTokenRequest,
    MerchantAuthenticationServiceCreateServerSessionAuthenticationTokenRequest,
    PaymentMethodAuthenticationServiceAuthenticateRequest,
    PaymentMethodAuthenticationServicePostAuthenticateRequest,
    PaymentMethodAuthenticationServicePreAuthenticateRequest,
    PaymentMethodServiceEligibilityRequest,
    PaymentMethodServiceRefreshRequest,
    PaymentMethodServiceTokenizeRequest,
    PaymentServiceAuthorizeRequest,
    PaymentServiceCaptureRequest,
    PaymentServiceCreateOrderRequest,
    PaymentServiceGetRequest,
    PaymentServiceIncrementalAuthorizationRequest,
    PaymentServiceProxyAuthorizeRequest,
    PaymentServiceProxySetupRecurringRequest,
    PaymentServiceRefundRequest,
    PaymentServiceReverseRequest,
    PaymentServiceSetupRecurringRequest,
    PaymentServiceTokenAuthorizeRequest,
    PaymentServiceTokenSetupRecurringRequest,
    PaymentServiceVoidRequest,
    RecurringPaymentServiceChargeRequest,
    RecurringPaymentServiceRevokeRequest,
    RefundServiceGetRequest,
};
use grpc_api_types::payouts::{
    PayoutMethodEligibilityRequest,
    PayoutServiceCreateLinkRequest,
    PayoutServiceCreateRecipientRequest,
    PayoutServiceCreateRequest,
    PayoutServiceEnrollDisburseAccountRequest,
    PayoutServiceGetRequest,
    PayoutServiceStageRequest,
    PayoutServiceTransferRequest,
    PayoutServiceVoidRequest,
};
use grpc_api_types::frm::{
    FrmServicePostRiskCheckRequest,
    FrmServicePreRiskCheckRequest,
};
use grpc_api_types::surcharge::{
    SurchargeServiceCalculateRequest,
};

use crate::handlers::payments::{
    accept_req_handler, accept_res_handler,
    authenticate_req_handler, authenticate_res_handler,
    authorize_req_handler, authorize_res_handler,
    capture_req_handler, capture_res_handler,
    charge_req_handler, charge_res_handler,
    create_client_authentication_token_req_handler, create_client_authentication_token_res_handler,
    create_order_req_handler, create_order_res_handler,
    create_server_authentication_token_req_handler, create_server_authentication_token_res_handler,
    create_server_session_authentication_token_req_handler, create_server_session_authentication_token_res_handler,
    customer_create_req_handler, customer_create_res_handler,
    customer_get_req_handler, customer_get_res_handler,
    defend_req_handler, defend_res_handler,
    eligibility_req_handler, eligibility_res_handler,
    get_req_handler, get_res_handler,
    incremental_authorization_req_handler, incremental_authorization_res_handler,
    payout_create_req_handler, payout_create_res_handler,
    payout_create_link_req_handler, payout_create_link_res_handler,
    payout_create_recipient_req_handler, payout_create_recipient_res_handler,
    payout_eligibility_req_handler, payout_eligibility_res_handler,
    payout_enroll_disburse_account_req_handler, payout_enroll_disburse_account_res_handler,
    payout_get_req_handler, payout_get_res_handler,
    payout_stage_req_handler, payout_stage_res_handler,
    payout_transfer_req_handler, payout_transfer_res_handler,
    payout_void_req_handler, payout_void_res_handler,
    post_authenticate_req_handler, post_authenticate_res_handler,
    post_risk_check_req_handler, post_risk_check_res_handler,
    pre_authenticate_req_handler, pre_authenticate_res_handler,
    pre_risk_check_req_handler, pre_risk_check_res_handler,
    proxy_authorize_req_handler, proxy_authorize_res_handler,
    proxy_setup_recurring_req_handler, proxy_setup_recurring_res_handler,
    recurring_revoke_req_handler, recurring_revoke_res_handler,
    refresh_req_handler, refresh_res_handler,
    refund_req_handler, refund_res_handler,
    refund_get_req_handler, refund_get_res_handler,
    reverse_req_handler, reverse_res_handler,
    setup_recurring_req_handler, setup_recurring_res_handler,
    submit_evidence_req_handler, submit_evidence_res_handler,
    surcharge_calculate_req_handler, surcharge_calculate_res_handler,
    token_authorize_req_handler, token_authorize_res_handler,
    token_setup_recurring_req_handler, token_setup_recurring_res_handler,
    tokenize_req_handler, tokenize_res_handler,
    void_req_handler, void_res_handler,
};

// accept: DisputeService.Accept — Concede dispute and accepts chargeback loss. Acknowledges liability and stops dispute defense process when evidence is insufficient.
define_ffi_flow!(accept, DisputeServiceAcceptRequest, accept_req_handler, accept_res_handler);
// authenticate: PaymentMethodAuthenticationService.Authenticate — Execute 3DS challenge or frictionless verification. Authenticates customer via bank challenge or behind-the-scenes verification for fraud prevention.
define_ffi_flow!(authenticate, PaymentMethodAuthenticationServiceAuthenticateRequest, authenticate_req_handler, authenticate_res_handler);
// authorize: PaymentService.Authorize — Authorize a payment amount on a payment method. This reserves funds without capturing them, essential for verifying availability before finalizing.
define_ffi_flow!(authorize, PaymentServiceAuthorizeRequest, authorize_req_handler, authorize_res_handler);
// capture: PaymentService.Capture — Finalize an authorized payment by transferring funds. Captures the authorized amount to complete the transaction and move funds to your merchant account.
define_ffi_flow!(capture, PaymentServiceCaptureRequest, capture_req_handler, capture_res_handler);
// charge: RecurringPaymentService.Charge — Charge using an existing stored recurring payment instruction. Processes repeat payments for subscriptions or recurring billing without collecting payment details.
define_ffi_flow!(charge, RecurringPaymentServiceChargeRequest, charge_req_handler, charge_res_handler);
// create_client_authentication_token: MerchantAuthenticationService.CreateClientAuthenticationToken — Initialize client-facing SDK sessions for wallets, device fingerprinting, etc. Returns structured data the client SDK needs to render payment/verification UI.
define_ffi_flow!(create_client_authentication_token, MerchantAuthenticationServiceCreateClientAuthenticationTokenRequest, create_client_authentication_token_req_handler, create_client_authentication_token_res_handler);
// create_order: PaymentService.CreateOrder — Create a payment order for later processing. Establishes a transaction context that can be authorized or captured in subsequent API calls.
define_ffi_flow!(create_order, PaymentServiceCreateOrderRequest, create_order_req_handler, create_order_res_handler);
// create_server_authentication_token: MerchantAuthenticationService.CreateServerAuthenticationToken — Generate short-lived connector authentication token. Provides secure credentials for connector API access without storing secrets client-side.
define_ffi_flow!(create_server_authentication_token, MerchantAuthenticationServiceCreateServerAuthenticationTokenRequest, create_server_authentication_token_req_handler, create_server_authentication_token_res_handler);
// create_server_session_authentication_token: MerchantAuthenticationService.CreateServerSessionAuthenticationToken — Create a server-side session with the connector. Establishes session state for multi-step operations like 3DS verification or wallet authorization.
define_ffi_flow!(create_server_session_authentication_token, MerchantAuthenticationServiceCreateServerSessionAuthenticationTokenRequest, create_server_session_authentication_token_req_handler, create_server_session_authentication_token_res_handler);
// customer_create: CustomerService.Create — Create customer record in the payment processor system. Stores customer details for future payment operations without re-sending personal information.
define_ffi_flow!(customer_create, CustomerServiceCreateRequest, customer_create_req_handler, customer_create_res_handler);
// customer_get: CustomerService.Get — Retrieves customer details from the payment processor. Callers typically use this before Create to implement get-or-create semantics for connectors that reject duplicates (e.g. Glomopay).
define_ffi_flow!(customer_get, CustomerServiceGetRequest, customer_get_req_handler, customer_get_res_handler);
// defend: DisputeService.Defend — Submit defense with reason code for dispute. Presents formal argument against customer's chargeback claim with supporting documentation.
define_ffi_flow!(defend, DisputeServiceDefendRequest, defend_req_handler, defend_res_handler);
// eligibility: PaymentMethodService.Eligibility — Check if the payment method is eligible for the transaction (e.g. BNPL pre-checkout check)
define_ffi_flow!(eligibility, PaymentMethodServiceEligibilityRequest, eligibility_req_handler, eligibility_res_handler);
// get: PaymentService.Get — Retrieve current payment status from the payment processor. Enables synchronization between your system and payment processors for accurate state tracking.
define_ffi_flow!(get, PaymentServiceGetRequest, get_req_handler, get_res_handler);
// incremental_authorization: PaymentService.IncrementalAuthorization — Increase the authorized amount for an existing payment. Enables you to capture additional funds when the transaction amount changes after initial authorization.
define_ffi_flow!(incremental_authorization, PaymentServiceIncrementalAuthorizationRequest, incremental_authorization_req_handler, incremental_authorization_res_handler);
// payout_create: PayoutService.Create — Creates a payout.
define_ffi_flow!(payout_create, PayoutServiceCreateRequest, payout_create_req_handler, payout_create_res_handler);
// payout_create_link: PayoutService.CreateLink — Creates a link between the recipient and the payout.
define_ffi_flow!(payout_create_link, PayoutServiceCreateLinkRequest, payout_create_link_req_handler, payout_create_link_res_handler);
// payout_create_recipient: PayoutService.CreateRecipient — Create payout recipient.
define_ffi_flow!(payout_create_recipient, PayoutServiceCreateRecipientRequest, payout_create_recipient_req_handler, payout_create_recipient_res_handler);
// payout_eligibility: PayoutService.Eligibility — Check eligibility of a payout before initiating it (e.g. SEPA VoP / payee verification).
define_ffi_flow!(payout_eligibility, PayoutMethodEligibilityRequest, payout_eligibility_req_handler, payout_eligibility_res_handler);
// payout_enroll_disburse_account: PayoutService.EnrollDisburseAccount — Enroll disburse account.
define_ffi_flow!(payout_enroll_disburse_account, PayoutServiceEnrollDisburseAccountRequest, payout_enroll_disburse_account_req_handler, payout_enroll_disburse_account_res_handler);
// payout_get: PayoutService.Get — Retrieve payout details.
define_ffi_flow!(payout_get, PayoutServiceGetRequest, payout_get_req_handler, payout_get_res_handler);
// payout_stage: PayoutService.Stage — Stage the payout.
define_ffi_flow!(payout_stage, PayoutServiceStageRequest, payout_stage_req_handler, payout_stage_res_handler);
// payout_transfer: PayoutService.Transfer — Creates a payout fund transfer.
define_ffi_flow!(payout_transfer, PayoutServiceTransferRequest, payout_transfer_req_handler, payout_transfer_res_handler);
// payout_void: PayoutService.Void — Void a payout.
define_ffi_flow!(payout_void, PayoutServiceVoidRequest, payout_void_req_handler, payout_void_res_handler);
// post_authenticate: PaymentMethodAuthenticationService.PostAuthenticate — Validate authentication results with the issuing bank. Processes bank's authentication decision to determine if payment can proceed.
define_ffi_flow!(post_authenticate, PaymentMethodAuthenticationServicePostAuthenticateRequest, post_authenticate_req_handler, post_authenticate_res_handler);
// post_risk_check: FraudAndRiskManagementService.PostRiskCheck — Evaluate fraud risk after payment processing. Analyzes payment outcomes and post-transaction signals to refine risk models and detect chargeback fraud.
define_ffi_flow!(post_risk_check, FrmServicePostRiskCheckRequest, post_risk_check_req_handler, post_risk_check_res_handler);
// pre_authenticate: PaymentMethodAuthenticationService.PreAuthenticate — Initiate 3DS flow before payment authorization. Collects device data and prepares authentication context for frictionless or challenge-based verification.
define_ffi_flow!(pre_authenticate, PaymentMethodAuthenticationServicePreAuthenticateRequest, pre_authenticate_req_handler, pre_authenticate_res_handler);
// pre_risk_check: FraudAndRiskManagementService.PreRiskCheck — Evaluate fraud risk before payment processing. Analyzes transaction details, customer behavior, and device fingerprints to determine if the payment should proceed, be rejected, or flagged for manual review.
define_ffi_flow!(pre_risk_check, FrmServicePreRiskCheckRequest, pre_risk_check_req_handler, pre_risk_check_res_handler);
// proxy_authorize: PaymentService.ProxyAuthorize — Authorize using vault-aliased card data. Proxy substitutes before connector.
define_ffi_flow!(proxy_authorize, PaymentServiceProxyAuthorizeRequest, proxy_authorize_req_handler, proxy_authorize_res_handler);
// proxy_setup_recurring: PaymentService.ProxySetupRecurring — Setup recurring mandate using vault-aliased card data.
define_ffi_flow!(proxy_setup_recurring, PaymentServiceProxySetupRecurringRequest, proxy_setup_recurring_req_handler, proxy_setup_recurring_res_handler);
// recurring_revoke: RecurringPaymentService.Revoke — Cancel an existing recurring payment mandate. Stops future automatic charges on customer's stored consent for subscription cancellations.
define_ffi_flow!(recurring_revoke, RecurringPaymentServiceRevokeRequest, recurring_revoke_req_handler, recurring_revoke_res_handler);
// refresh: PaymentMethodService.Refresh — Refresh a payment method the caller already holds in full. The request carries the instrument itself, not a reference to it: use Refresh when you own the complete payment method details and the provider exposes an endpoint that evaluates them.
define_ffi_flow!(refresh, PaymentMethodServiceRefreshRequest, refresh_req_handler, refresh_res_handler);
// refund: PaymentService.Refund — Process a partial or full refund for a captured payment. Returns funds to the customer when goods are returned or services are cancelled.
define_ffi_flow!(refund, PaymentServiceRefundRequest, refund_req_handler, refund_res_handler);
// refund_get: RefundService.Get — Retrieve refund status from the payment processor. Tracks refund progress through processor settlement for accurate customer communication.
define_ffi_flow!(refund_get, RefundServiceGetRequest, refund_get_req_handler, refund_get_res_handler);
// reverse: PaymentService.Reverse — Reverse a captured payment in full. Initiates a complete refund when you need to cancel a settled transaction rather than just an authorization.
define_ffi_flow!(reverse, PaymentServiceReverseRequest, reverse_req_handler, reverse_res_handler);
// setup_recurring: PaymentService.SetupRecurring — Configure a payment method for recurring billing. Sets up the mandate and payment details needed for future automated charges.
define_ffi_flow!(setup_recurring, PaymentServiceSetupRecurringRequest, setup_recurring_req_handler, setup_recurring_res_handler);
// submit_evidence: DisputeService.SubmitEvidence — Upload evidence to dispute customer chargeback. Provides documentation like receipts and delivery proof to contest fraudulent transaction claims.
define_ffi_flow!(submit_evidence, DisputeServiceSubmitEvidenceRequest, submit_evidence_req_handler, submit_evidence_res_handler);
// surcharge_calculate: SurchargeService.Calculate — Calculate surcharge fees for a payment amount before processing.
define_ffi_flow!(surcharge_calculate, SurchargeServiceCalculateRequest, surcharge_calculate_req_handler, surcharge_calculate_res_handler);
// token_authorize: PaymentService.TokenAuthorize — Authorize using a connector-issued payment method token.
define_ffi_flow!(token_authorize, PaymentServiceTokenAuthorizeRequest, token_authorize_req_handler, token_authorize_res_handler);
// token_setup_recurring: PaymentService.TokenSetupRecurring — Setup a recurring mandate using a connector token.
define_ffi_flow!(token_setup_recurring, PaymentServiceTokenSetupRecurringRequest, token_setup_recurring_req_handler, token_setup_recurring_res_handler);
// tokenize: PaymentMethodService.Tokenize — Tokenize payment method for secure storage. Replaces raw card details with secure token for one-click payments and recurring billing.
define_ffi_flow!(tokenize, PaymentMethodServiceTokenizeRequest, tokenize_req_handler, tokenize_res_handler);
// void: PaymentService.Void — Cancel an authorized payment that has not been captured. Releases held funds back to the customer's payment method when a transaction cannot be completed.
define_ffi_flow!(void, PaymentServiceVoidRequest, void_req_handler, void_res_handler);
