import {z} from 'zod' export type AchBasisPoints = number; export type AchCreditReturnFixedFee = number | null; export type AchDebitReturnFixedFee = number | null; export type AchFixedFee = number; export type BasisPoints = number; export type CardCrossBorderBasisPoints = number | null; export type DisputeFixedFee = number | null; export type FixedFee = number | null; export type CreateFeeProfileBlended = {ach_basis_points?: AchBasisPoints | undefined, ach_credit_return_fixed_fee?: AchCreditReturnFixedFee | undefined, ach_debit_return_fixed_fee?: AchDebitReturnFixedFee | undefined, ach_fixed_fee?: AchFixedFee | undefined, basis_points?: BasisPoints | undefined, card_cross_border_basis_points?: CardCrossBorderBasisPoints | undefined, dispute_fixed_fee?: DisputeFixedFee | undefined, fixed_fee?: FixedFee | undefined}; export type ChargeInterchange = boolean; export type CreateFeeProfileInterchangePlus = {ach_basis_points?: AchBasisPoints | undefined, ach_credit_return_fixed_fee?: AchCreditReturnFixedFee | undefined, ach_debit_return_fixed_fee?: AchDebitReturnFixedFee | undefined, ach_fixed_fee?: AchFixedFee | undefined, basis_points?: BasisPoints | undefined, charge_interchange?: ChargeInterchange | undefined, dispute_fixed_fee?: DisputeFixedFee | undefined, fixed_fee?: FixedFee | undefined}; export type ChargeDuesAssessments = boolean | null; export type CreateFeeProfileInterchangePlusDuesAssessments = {ach_basis_points?: AchBasisPoints | undefined, ach_credit_return_fixed_fee?: AchCreditReturnFixedFee | undefined, ach_debit_return_fixed_fee?: AchDebitReturnFixedFee | undefined, ach_fixed_fee?: AchFixedFee | undefined, basis_points?: BasisPoints | undefined, charge_dues_assessments?: ChargeDuesAssessments | undefined, charge_interchange?: ChargeInterchange | undefined, dispute_fixed_fee?: DisputeFixedFee | undefined, fixed_fee?: FixedFee | undefined}; export type AchBasisPointsFeeLimit = number | null; export type AchNoticeOfChangeCreditFixedFee = number | null; export type AchNoticeOfChangeDebitFixedFee = number | null; export type AchValidationPlaidFixedFee = number | null; export type AfterpayBasisPoints = number | null; export type AfterpayFixedFee = number | null; export type AmericanExpressAssessmentBasisPoints = number | null; export type AmericanExpressBasisPoints = number | null; export type AmericanExpressChargeDuesAssessments = number | null; export type AmericanExpressChargeInterchange = boolean | null; export type AmericanExpressExternallyFundedBasisPoints = number | null; export type AmericanExpressExternallyFundedFixedFee = number | null; export type AmericanExpressFixedFee = number | null; export type AncillaryFixedFeePrimary = number | null; export type AncillaryFixedFeeSecondary = number | null; export type CardAccountUpdaterFixedFee = number | null; export type CardCrossBorderFixedFee = number | null; export type CardNameVerificationFixedFee = number | null; export type CardNetworkTokenFixedFee = number | null; export type CashAppPayBasisPoints = number | null; export type CashAppPayFixedFee = number | null; export type ChargeAllAuthorizationRequests = boolean | null; export type ChargeAllReversalRequests = boolean | null; export type ChargeAllTransferRequests = boolean | null; export type ComplianceFormsOverdueFixedFee = number | null; export type DinersClubBasisPoints = number | null; export type DinersClubChargeInterchange = boolean | null; export type DinersClubFixedFee = number | null; export type DiscoverAssessmentsBasisPoints = number | null; export type DiscoverBasisPoints = number | null; export type DiscoverChargeDuesAssessments = number | null; export type DiscoverChargeInterchange = boolean | null; export type DiscoverDataUsageFixedFee = number | null; export type DiscoverExternallyFundedBasisPoints = number | null; export type DiscoverExternallyFundedFixedFee = number | null; export type DiscoverFixedFee = number | null; export type DiscoverNetworkAuthorizationFixedFee = number | null; export type DisputeInquiryFixedFee = number | null; export type EftBasisPoints = number | null; export type EftBasisPointsFeeLimit = number | null; export type EftCreditReturnFixedFee = number | null; export type EftDebitReturnFixedFee = number | null; export type EftFixedFee = number | null; export type EftValidationPlaidFixedFee = number | null; export type ExternallyFundedBasisPoints = number | null; export type ExternallyFundedFixedFee = number | null; export type GrossMonthlyFeesAchBasisPoints = number | null; export type GrossMonthlyFeesAchFixedFee = number | null; export type GrossMonthlyFeesCardBasisPoints = number | null; export type GrossMonthlyFeesCardFixedFee = number | null; export type GrossMonthlyFeesEftBasisPoints = number | null; export type GrossMonthlyFeesEftFixedFee = number | null; export type InteracBasisPoints = number | null; export type InteracFixedFee = number | null; export type JcbBasisPoints = number | null; export type JcbChargeInterchange = boolean | null; export type JcbFixedFee = number | null; export type MastercardAcquirerFeesBasisPoints = number | null; export type MastercardAssessmentsOver1kBasisPoints = number | null; export type MastercardAssessmentsUnder1kBasisPoints = number | null; export type MastercardBasisPoints = number | null; export type MastercardChargeDuesAssessments = number | null; export type MastercardChargeInterchange = boolean | null; export type MastercardFixedFee = number | null; export type PaymentInstrumentTokenizationFixedFee = number | null; export type SettlementFundingTransferAchBasisPoints = number | null; export type SettlementFundingTransferAchBasisPointsFeeLimit = number | null; export type SettlementFundingTransferAchCreditReturnFixedFee = number | null; export type SettlementFundingTransferAchDebitReturnFixedFee = number | null; export type SettlementFundingTransferAchFixedFee = number | null; export type SettlementFundingTransferEftBasisPoints = number | null; export type SettlementFundingTransferEftBasisPointsFeeLimit = number | null; export type SettlementFundingTransferEftCreditReturnFixedFee = number | null; export type SettlementFundingTransferEftDebitReturnFixedFee = number | null; export type SettlementFundingTransferEftFixedFee = number | null; export type SettlementFundingTransferInstantPayoutCardBasisPoints = number | null; export type SettlementFundingTransferInstantPayoutCardBasisPointsFeeLimit = number | null; export type SettlementFundingTransferInstantPayoutCardFixedFee = number | null; export type SettlementFundingTransferNocCreditFixedFee = number | null; export type SettlementFundingTransferNocDebitFixedFee = number | null; export type SettlementFundingTransferSameDayAchBasisPoints = number | null; export type SettlementFundingTransferSameDayAchBasisPointsFeeLimit = number | null; export type SettlementFundingTransferSameDayAchFixedFee = number | null; export type SubscriptionAchBasisPoints = number | null; export type SubscriptionAchBasisPointsFeeLimit = number | null; export type SubscriptionAchFixedFee = number | null; export type SubscriptionCardBasisPoints = number | null; export type SubscriptionCardFixedFee = number | null; export type SubscriptionEftBasisPoints = number | null; export type SubscriptionEftBasisPointsFeeLimit = number | null; export type SubscriptionEftFixedFee = number | null; export type TapToPayBasisPoints = number | null; export type TapToPayFixedFee = number | null; export type ThirdPartyGatewayCybersourceBasisPoints = number | null; export type ThirdPartyGatewayCybersourceFixedFee = number | null; export type VisaAcquirerProcessingFixedFee = number | null; export type VisaAssessmentsBasisPoints = number | null; export type VisaBasisPoints = number | null; export type VisaChargeDuesAssessments = number | null; export type VisaChargeInterchange = boolean | null; export type VisaCreditVoucherFixedFee = number | null; export type VisaFixedFee = number | null; export type VisaKilobyteAccessFixedFee = number | null; export type CreateFeeProfile = {ach_basis_points?: AchBasisPoints | undefined, ach_basis_points_fee_limit?: AchBasisPointsFeeLimit | undefined, ach_credit_return_fixed_fee?: AchCreditReturnFixedFee | undefined, ach_debit_return_fixed_fee?: AchDebitReturnFixedFee | undefined, ach_fixed_fee?: AchFixedFee | undefined, ach_notice_of_change_credit_fixed_fee?: AchNoticeOfChangeCreditFixedFee | undefined, ach_notice_of_change_debit_fixed_fee?: AchNoticeOfChangeDebitFixedFee | undefined, ach_validation_plaid_fixed_fee?: AchValidationPlaidFixedFee | undefined, afterpay_basis_points?: AfterpayBasisPoints | undefined, afterpay_fixed_fee?: AfterpayFixedFee | undefined, american_express_assessment_basis_points?: AmericanExpressAssessmentBasisPoints | undefined, american_express_basis_points?: AmericanExpressBasisPoints | undefined, american_express_charge_dues_assessments?: AmericanExpressChargeDuesAssessments | undefined, american_express_charge_interchange?: AmericanExpressChargeInterchange | undefined, american_express_externally_funded_basis_points?: AmericanExpressExternallyFundedBasisPoints | undefined, american_express_externally_funded_fixed_fee?: AmericanExpressExternallyFundedFixedFee | undefined, american_express_fixed_fee?: AmericanExpressFixedFee | undefined, ancillary_fixed_fee_primary?: AncillaryFixedFeePrimary | undefined, ancillary_fixed_fee_secondary?: AncillaryFixedFeeSecondary | undefined, basis_points?: BasisPoints | undefined, card_account_updater_fixed_fee?: CardAccountUpdaterFixedFee | undefined, card_cross_border_basis_points?: CardCrossBorderBasisPoints | undefined, card_cross_border_fixed_fee?: CardCrossBorderFixedFee | undefined, card_name_verification_fixed_fee?: CardNameVerificationFixedFee | undefined, card_network_token_fixed_fee?: CardNetworkTokenFixedFee | undefined, cash_app_pay_basis_points?: CashAppPayBasisPoints | undefined, cash_app_pay_fixed_fee?: CashAppPayFixedFee | undefined, charge_all_authorization_requests?: ChargeAllAuthorizationRequests | undefined, charge_all_reversal_requests?: ChargeAllReversalRequests | undefined, charge_all_transfer_requests?: ChargeAllTransferRequests | undefined, charge_dues_assessments?: ChargeDuesAssessments | undefined, charge_interchange?: ChargeInterchange | undefined, compliance_forms_overdue_fixed_fee?: ComplianceFormsOverdueFixedFee | undefined, diners_club_basis_points?: DinersClubBasisPoints | undefined, diners_club_charge_interchange?: DinersClubChargeInterchange | undefined, diners_club_fixed_fee?: DinersClubFixedFee | undefined, discover_assessments_basis_points?: DiscoverAssessmentsBasisPoints | undefined, discover_basis_points?: DiscoverBasisPoints | undefined, discover_charge_dues_assessments?: DiscoverChargeDuesAssessments | undefined, discover_charge_interchange?: DiscoverChargeInterchange | undefined, discover_data_usage_fixed_fee?: DiscoverDataUsageFixedFee | undefined, discover_externally_funded_basis_points?: DiscoverExternallyFundedBasisPoints | undefined, discover_externally_funded_fixed_fee?: DiscoverExternallyFundedFixedFee | undefined, discover_fixed_fee?: DiscoverFixedFee | undefined, discover_network_authorization_fixed_fee?: DiscoverNetworkAuthorizationFixedFee | undefined, dispute_fixed_fee?: DisputeFixedFee | undefined, dispute_inquiry_fixed_fee?: DisputeInquiryFixedFee | undefined, eft_basis_points?: EftBasisPoints | undefined, eft_basis_points_fee_limit?: EftBasisPointsFeeLimit | undefined, eft_credit_return_fixed_fee?: EftCreditReturnFixedFee | undefined, eft_debit_return_fixed_fee?: EftDebitReturnFixedFee | undefined, eft_fixed_fee?: EftFixedFee | undefined, eft_validation_plaid_fixed_fee?: EftValidationPlaidFixedFee | undefined, externally_funded_basis_points?: ExternallyFundedBasisPoints | undefined, externally_funded_fixed_fee?: ExternallyFundedFixedFee | undefined, fixed_fee?: FixedFee | undefined, gross_monthly_fees_ach_basis_points?: GrossMonthlyFeesAchBasisPoints | undefined, gross_monthly_fees_ach_fixed_fee?: GrossMonthlyFeesAchFixedFee | undefined, gross_monthly_fees_card_basis_points?: GrossMonthlyFeesCardBasisPoints | undefined, gross_monthly_fees_card_fixed_fee?: GrossMonthlyFeesCardFixedFee | undefined, gross_monthly_fees_eft_basis_points?: GrossMonthlyFeesEftBasisPoints | undefined, gross_monthly_fees_eft_fixed_fee?: GrossMonthlyFeesEftFixedFee | undefined, interac_basis_points?: InteracBasisPoints | undefined, interac_fixed_fee?: InteracFixedFee | undefined, jcb_basis_points?: JcbBasisPoints | undefined, jcb_charge_interchange?: JcbChargeInterchange | undefined, jcb_fixed_fee?: JcbFixedFee | undefined, mastercard_acquirer_fees_basis_points?: MastercardAcquirerFeesBasisPoints | undefined, mastercard_assessments_over1k_basis_points?: MastercardAssessmentsOver1kBasisPoints | undefined, mastercard_assessments_under1k_basis_points?: MastercardAssessmentsUnder1kBasisPoints | undefined, mastercard_basis_points?: MastercardBasisPoints | undefined, mastercard_charge_dues_assessments?: MastercardChargeDuesAssessments | undefined, mastercard_charge_interchange?: MastercardChargeInterchange | undefined, mastercard_fixed_fee?: MastercardFixedFee | undefined, payment_instrument_tokenization_fixed_fee?: PaymentInstrumentTokenizationFixedFee | undefined, settlement_funding_transfer_ach_basis_points?: SettlementFundingTransferAchBasisPoints | undefined, settlement_funding_transfer_ach_basis_points_fee_limit?: SettlementFundingTransferAchBasisPointsFeeLimit | undefined, settlement_funding_transfer_ach_credit_return_fixed_fee?: SettlementFundingTransferAchCreditReturnFixedFee | undefined, settlement_funding_transfer_ach_debit_return_fixed_fee?: SettlementFundingTransferAchDebitReturnFixedFee | undefined, settlement_funding_transfer_ach_fixed_fee?: SettlementFundingTransferAchFixedFee | undefined, settlement_funding_transfer_eft_basis_points?: SettlementFundingTransferEftBasisPoints | undefined, settlement_funding_transfer_eft_basis_points_fee_limit?: SettlementFundingTransferEftBasisPointsFeeLimit | undefined, settlement_funding_transfer_eft_credit_return_fixed_fee?: SettlementFundingTransferEftCreditReturnFixedFee | undefined, settlement_funding_transfer_eft_debit_return_fixed_fee?: SettlementFundingTransferEftDebitReturnFixedFee | undefined, settlement_funding_transfer_eft_fixed_fee?: SettlementFundingTransferEftFixedFee | undefined, settlement_funding_transfer_instant_payout_card_basis_points?: SettlementFundingTransferInstantPayoutCardBasisPoints | undefined, settlement_funding_transfer_instant_payout_card_basis_points_fee_limit?: SettlementFundingTransferInstantPayoutCardBasisPointsFeeLimit | undefined, settlement_funding_transfer_instant_payout_card_fixed_fee?: SettlementFundingTransferInstantPayoutCardFixedFee | undefined, settlement_funding_transfer_noc_credit_fixed_fee?: SettlementFundingTransferNocCreditFixedFee | undefined, settlement_funding_transfer_noc_debit_fixed_fee?: SettlementFundingTransferNocDebitFixedFee | undefined, settlement_funding_transfer_same_day_ach_basis_points?: SettlementFundingTransferSameDayAchBasisPoints | undefined, settlement_funding_transfer_same_day_ach_basis_points_fee_limit?: SettlementFundingTransferSameDayAchBasisPointsFeeLimit | undefined, settlement_funding_transfer_same_day_ach_fixed_fee?: SettlementFundingTransferSameDayAchFixedFee | undefined, subscription_ach_basis_points?: SubscriptionAchBasisPoints | undefined, subscription_ach_basis_points_fee_limit?: SubscriptionAchBasisPointsFeeLimit | undefined, subscription_ach_fixed_fee?: SubscriptionAchFixedFee | undefined, subscription_card_basis_points?: SubscriptionCardBasisPoints | undefined, subscription_card_fixed_fee?: SubscriptionCardFixedFee | undefined, subscription_eft_basis_points?: SubscriptionEftBasisPoints | undefined, subscription_eft_basis_points_fee_limit?: SubscriptionEftBasisPointsFeeLimit | undefined, subscription_eft_fixed_fee?: SubscriptionEftFixedFee | undefined, tap_to_pay_basis_points?: TapToPayBasisPoints | undefined, tap_to_pay_fixed_fee?: TapToPayFixedFee | undefined, third_party_gateway_cybersource_basis_points?: ThirdPartyGatewayCybersourceBasisPoints | undefined, third_party_gateway_cybersource_fixed_fee?: ThirdPartyGatewayCybersourceFixedFee | undefined, visa_acquirer_processing_fixed_fee?: VisaAcquirerProcessingFixedFee | undefined, visa_assessments_basis_points?: VisaAssessmentsBasisPoints | undefined, visa_basis_points?: VisaBasisPoints | undefined, visa_charge_dues_assessments?: VisaChargeDuesAssessments | undefined, visa_charge_interchange?: VisaChargeInterchange | undefined, visa_credit_voucher_fixed_fee?: VisaCreditVoucherFixedFee | undefined, visa_fixed_fee?: VisaFixedFee | undefined, visa_kilobyte_access_fixed_fee?: VisaKilobyteAccessFixedFee | undefined}; export type CreateFeeProfileNoFees = {ach_basis_points?: AchBasisPoints | undefined, ach_credit_return_fixed_fee?: AchCreditReturnFixedFee | undefined, ach_debit_return_fixed_fee?: AchDebitReturnFixedFee | undefined, ach_fixed_fee?: AchFixedFee | undefined, basis_points?: BasisPoints | undefined, dispute_fixed_fee?: DisputeFixedFee | undefined, fixed_fee?: FixedFee | undefined}; export type CreateApiFeeProfilesArgs = {'Finix-Version'?: string | undefined, 'Content-Type'?: string | undefined, body: CreateFeeProfileBlended | CreateFeeProfileInterchangePlus | CreateFeeProfileInterchangePlusDuesAssessments | CreateFeeProfile | CreateFeeProfileNoFees}; export type CreateApiFeeProfilesOptions = {baseUrl?: string | undefined, BasicAuth?: {username: string, password: string} | undefined, fetch?: typeof fetch | undefined}; export const id = z.string().min(1); export const createdAt = z.string(); export const updatedAt = z.string(); export const achBasisPointsFeeLimit = z.number().int().nullable(); export const achBasisPoints = z.number().int(); export const achCreditReturnFixedFee = z.number().int().nullable(); export const achDebitReturnFixedFee = z.number().int().nullable(); export const achFixedFee = z.number().int(); export const achNoticeOfChangeCreditFixedFee = z.number().int().nullable(); export const achNoticeOfChangeDebitFixedFee = z.number().int().nullable(); export const achValidationPlaidFixedFee = z.number().int().nullable(); export const afterpayBasisPoints = z.number().int().nullable(); export const afterpayFixedFee = z.number().int().nullable(); export const americanExpressAssessmentBasisPoints = z.number().int().nullable(); export const americanExpressBasisPoints = z.number().int().nullable(); export const americanExpressChargeDuesAssessments = z.number().int().nullable(); export const americanExpressChargeInterchange = z.boolean().nullable(); export const americanExpressExternallyFundedBasisPoints = z.number().int().nullable(); export const americanExpressExternallyFundedFixedFee = z.number().int().nullable(); export const americanExpressFixedFee = z.number().int().nullable(); export const ancillaryFixedFeePrimary = z.number().int().nullable(); export const ancillaryFixedFeeSecondary = z.number().int().nullable(); export const applicationId = z.string().min(1); export const basisPoints = z.number().int(); export const cardAccountUpdaterFixedFee = z.number().int().nullable(); export const cardCrossBorderBasisPoints = z.number().int().nullable(); export const cardCrossBorderFixedFee = z.number().int().nullable(); export const cardNameVerificationFixedFee = z.number().int().nullable(); export const cardNetworkTokenFixedFee = z.number().int().nullable(); export const cashAppPayBasisPoints = z.number().int().nullable(); export const cashAppPayFixedFee = z.number().int().nullable(); export const chargeAllAuthorizationRequests = z.boolean().nullable(); export const chargeAllReversalRequests = z.boolean().nullable(); export const chargeAllTransferRequests = z.boolean().nullable(); export const chargeDuesAssessments = z.boolean().nullable(); export const chargeInterchange = z.boolean(); export const complianceFormsOverdueFixedFee = z.number().int().nullable(); export const dinersClubBasisPoints = z.number().int().nullable(); export const dinersClubChargeInterchange = z.boolean().nullable(); export const dinersClubFixedFee = z.number().int().nullable(); export const discoverAssessmentsBasisPoints = z.number().int().nullable(); export const discoverBasisPoints = z.number().int().nullable(); export const discoverChargeDuesAssessments = z.number().int().nullable(); export const discoverChargeInterchange = z.boolean().nullable(); export const discoverDataUsageFixedFee = z.number().int().nullable(); export const discoverExternallyFundedBasisPoints = z.number().int().nullable(); export const discoverExternallyFundedFixedFee = z.number().int().nullable(); export const discoverFixedFee = z.number().int().nullable(); export const discoverNetworkAuthorizationFixedFee = z.number().int().nullable(); export const disputeFixedFee = z.number().int().nullable(); export const eftBasisPointsFeeLimit = z.number().int().nullable(); export const eftBasisPoints = z.number().int().nullable(); export const eftCreditReturnFixedFee = z.number().int().nullable(); export const eftDebitReturnFixedFee = z.number().int().nullable(); export const eftFixedFee = z.number().int().nullable(); export const eftValidationPlaidFixedFee = z.number().int().nullable(); export const externallyFundedBasisPoints = z.number().int().nullable(); export const externallyFundedFixedFee = z.number().int().nullable(); export const fixedFee = z.number().int().nullable(); export const grossMonthlyFeesAchBasisPoints = z.number().int().nullable(); export const grossMonthlyFeesAchFixedFee = z.number().int().nullable(); export const grossMonthlyFeesCardBasisPoints = z.number().int().nullable(); export const grossMonthlyFeesCardFixedFee = z.number().int().nullable(); export const grossMonthlyFeesEftBasisPoints = z.number().int().nullable(); export const grossMonthlyFeesEftFixedFee = z.number().int().nullable(); export const interacBasisPoints = z.number().int().nullable(); export const interacFixedFee = z.number().int().nullable(); export const invoiceAchBasisPoints = z.number().int().nullable(); export const invoiceAchBasisPointsFeeLimit = z.number().int().nullable(); export const invoiceAchFixedFee = z.number().int().nullable(); export const invoiceCardBasisPoints = z.number().int().nullable(); export const invoiceCardFixedFee = z.number().int().nullable(); export const invoiceEftBasisPoints = z.number().int().nullable(); export const invoiceEftBasisPointsFeeLimit = z.number().int().nullable(); export const invoiceEftFixedFee = z.number().int().nullable(); export const jcbBasisPoints = z.number().int().nullable(); export const jcbChargeInterchange = z.boolean().nullable(); export const jcbFixedFee = z.number().int().nullable(); export const mastercardAcquirerFeesBasisPoints = z.number().int().nullable(); export const mastercardAssessmentsOver1kBasisPoints = z.number().int().nullable(); export const mastercardAssessmentsUnder1kBasisPoints = z.number().int().nullable(); export const mastercardBasisPoints = z.number().int().nullable(); export const mastercardChargeDuesAssessments = z.number().int().nullable(); export const mastercardChargeInterchange = z.boolean().nullable(); export const mastercardFixedFee = z.number().int().nullable(); export const paymentInstrumentTokenizationFixedFee = z.number().int().nullable(); export const settlementFundingTransferAchBasisPointsFeeLimit = z.number().int().nullable(); export const settlementFundingTransferAchBasisPoints = z.number().int().nullable(); export const settlementFundingTransferAchCreditReturnFixedFee = z.number().int().nullable(); export const settlementFundingTransferAchDebitReturnFixedFee = z.number().int().nullable(); export const settlementFundingTransferAchFixedFee = z.number().int().nullable(); export const settlementFundingTransferEftBasisPointsFeeLimit = z.number().int().nullable(); export const settlementFundingTransferEftBasisPoints = z.number().int().nullable(); export const settlementFundingTransferEftCreditReturnFixedFee = z.number().int().nullable(); export const settlementFundingTransferEftDebitReturnFixedFee = z.number().int().nullable(); export const settlementFundingTransferEftFixedFee = z.number().int().nullable(); export const settlementFundingTransferInstantPayoutCardBasisPointsFeeLimit = z.number().int().nullable(); export const settlementFundingTransferInstantPayoutCardBasisPoints = z.number().int().nullable(); export const settlementFundingTransferInstantPayoutCardFixedFee = z.number().int().nullable(); export const settlementFundingTransferNocCreditFixedFee = z.number().int().nullable(); export const settlementFundingTransferNocDebitFixedFee = z.number().int().nullable(); export const settlementFundingTransferSameDayAchBasisPointsFeeLimit = z.number().int().nullable(); export const settlementFundingTransferSameDayAchBasisPoints = z.number().int().nullable(); export const settlementFundingTransferSameDayAchFixedFee = z.number().int().nullable(); export const subscriptionAchBasisPoints = z.number().int().nullable(); export const subscriptionAchBasisPointsFeeLimit = z.number().int().nullable(); export const subscriptionAchFixedFee = z.number().int().nullable(); export const subscriptionCardBasisPoints = z.number().int().nullable(); export const subscriptionCardFixedFee = z.number().int().nullable(); export const subscriptionEftBasisPoints = z.number().int().nullable(); export const subscriptionEftBasisPointsFeeLimit = z.number().int().nullable(); export const subscriptionEftFixedFee = z.number().int().nullable(); export const tapToPayBasisPoints = z.number().int().nullable(); export const tapToPayFixedFee = z.number().int().nullable(); export const thirdPartyGatewayCybersourceBasisPoints = z.number().int().nullable(); export const thirdPartyGatewayCybersourceFixedFee = z.number().int().nullable(); export const visaAcquirerProcessingFixedFee = z.number().int().nullable(); export const visaAssessmentsBasisPoints = z.number().int().nullable(); export const visaBaseIICreditVoucherFixedFee = z.number().int().nullable(); export const visaBaseIISystemFileTransmissionFixedFee = z.number().int().nullable(); export const visaBasisPoints = z.number().int().nullable(); export const visaChargeDuesAssessments = z.number().int().nullable(); export const visaChargeInterchange = z.boolean().nullable(); export const visaCreditVoucherFixedFee = z.number().int().nullable(); export const visaFixedFee = z.number().int().nullable(); export const visaKilobyteAccessFixedFee = z.number().int().nullable(); export const tags = z.record(z.string(), z.unknown()).nullable(); export const feeProfile = z.object({id: id.optional(), created_at: createdAt.optional(), updated_at: updatedAt.optional(), ach_basis_points_fee_limit: achBasisPointsFeeLimit.optional(), ach_basis_points: achBasisPoints.optional(), ach_credit_return_fixed_fee: achCreditReturnFixedFee.optional(), ach_debit_return_fixed_fee: achDebitReturnFixedFee.optional(), ach_fixed_fee: achFixedFee.optional(), ach_notice_of_change_credit_fixed_fee: achNoticeOfChangeCreditFixedFee.optional(), ach_notice_of_change_debit_fixed_fee: achNoticeOfChangeDebitFixedFee.optional(), ach_validation_plaid_fixed_fee: achValidationPlaidFixedFee.optional(), afterpay_basis_points: afterpayBasisPoints.optional(), afterpay_fixed_fee: afterpayFixedFee.optional(), american_express_assessment_basis_points: americanExpressAssessmentBasisPoints.optional(), american_express_basis_points: americanExpressBasisPoints.optional(), american_express_charge_dues_assessments: americanExpressChargeDuesAssessments.optional(), american_express_charge_interchange: americanExpressChargeInterchange.optional(), american_express_externally_funded_basis_points: americanExpressExternallyFundedBasisPoints.optional(), american_express_externally_funded_fixed_fee: americanExpressExternallyFundedFixedFee.optional(), american_express_fixed_fee: americanExpressFixedFee.optional(), ancillary_fixed_fee_primary: ancillaryFixedFeePrimary.optional(), ancillary_fixed_fee_secondary: ancillaryFixedFeeSecondary.optional(), application: applicationId.optional(), basis_points: basisPoints.optional(), card_account_updater_fixed_fee: cardAccountUpdaterFixedFee.optional(), card_cross_border_basis_points: cardCrossBorderBasisPoints.optional(), card_cross_border_fixed_fee: cardCrossBorderFixedFee.optional(), card_name_verification_fixed_fee: cardNameVerificationFixedFee.optional(), card_network_token_fixed_fee: cardNetworkTokenFixedFee.optional(), cash_app_pay_basis_points: cashAppPayBasisPoints.optional(), cash_app_pay_fixed_fee: cashAppPayFixedFee.optional(), charge_all_authorization_requests: chargeAllAuthorizationRequests.optional(), charge_all_reversal_requests: chargeAllReversalRequests.optional(), charge_all_transfer_requests: chargeAllTransferRequests.optional(), charge_dues_assessments: chargeDuesAssessments.optional(), charge_interchange: chargeInterchange.optional(), compliance_forms_overdue_fixed_fee: complianceFormsOverdueFixedFee.optional(), diners_club_basis_points: dinersClubBasisPoints.optional(), diners_club_charge_interchange: dinersClubChargeInterchange.optional(), diners_club_fixed_fee: dinersClubFixedFee.optional(), discover_assessments_basis_points: discoverAssessmentsBasisPoints.optional(), discover_basis_points: discoverBasisPoints.optional(), discover_charge_dues_assessments: discoverChargeDuesAssessments.optional(), discover_charge_interchange: discoverChargeInterchange.optional(), discover_data_usage_fixed_fee: discoverDataUsageFixedFee.optional(), discover_externally_funded_basis_points: discoverExternallyFundedBasisPoints.optional(), discover_externally_funded_fixed_fee: discoverExternallyFundedFixedFee.optional(), discover_fixed_fee: discoverFixedFee.optional(), discover_network_authorization_fixed_fee: discoverNetworkAuthorizationFixedFee.optional(), dispute_fixed_fee: disputeFixedFee.optional(), dispute_inquiry_fixed_fee: disputeFixedFee.optional(), eft_basis_points_fee_limit: eftBasisPointsFeeLimit.optional(), eft_basis_points: eftBasisPoints.optional(), eft_credit_return_fixed_fee: eftCreditReturnFixedFee.optional(), eft_debit_return_fixed_fee: eftDebitReturnFixedFee.optional(), eft_fixed_fee: eftFixedFee.optional(), eft_validation_plaid_fixed_fee: eftValidationPlaidFixedFee.optional(), externally_funded_basis_points: externallyFundedBasisPoints.optional(), externally_funded_fixed_fee: externallyFundedFixedFee.optional(), fixed_fee: fixedFee.optional(), gross_monthly_fees_ach_basis_points: grossMonthlyFeesAchBasisPoints.optional(), gross_monthly_fees_ach_fixed_fee: grossMonthlyFeesAchFixedFee.optional(), gross_monthly_fees_card_basis_points: grossMonthlyFeesCardBasisPoints.optional(), gross_monthly_fees_card_fixed_fee: grossMonthlyFeesCardFixedFee.optional(), gross_monthly_fees_eft_basis_points: grossMonthlyFeesEftBasisPoints.optional(), gross_monthly_fees_eft_fixed_fee: grossMonthlyFeesEftFixedFee.optional(), interac_basis_points: interacBasisPoints.optional(), interac_fixed_fee: interacFixedFee.optional(), invoice_ach_basis_points: invoiceAchBasisPoints.optional(), invoice_ach_basis_points_fee_limit: invoiceAchBasisPointsFeeLimit.optional(), invoice_ach_fixed_fee: invoiceAchFixedFee.optional(), invoice_card_basis_points: invoiceCardBasisPoints.optional(), invoice_card_fixed_fee: invoiceCardFixedFee.optional(), invoice_eft_basis_points: invoiceEftBasisPoints.optional(), invoice_eft_basis_points_fee_limit: invoiceEftBasisPointsFeeLimit.optional(), invoice_eft_fixed_fee: invoiceEftFixedFee.optional(), jcb_basis_points: jcbBasisPoints.optional(), jcb_charge_interchange: jcbChargeInterchange.optional(), jcb_fixed_fee: jcbFixedFee.optional(), mastercard_acquirer_fees_basis_points: mastercardAcquirerFeesBasisPoints.optional(), mastercard_assessments_over1k_basis_points: mastercardAssessmentsOver1kBasisPoints.optional(), mastercard_assessments_under1k_basis_points: mastercardAssessmentsUnder1kBasisPoints.optional(), mastercard_basis_points: mastercardBasisPoints.optional(), mastercard_charge_dues_assessments: mastercardChargeDuesAssessments.optional(), mastercard_charge_interchange: mastercardChargeInterchange.optional(), mastercard_fixed_fee: mastercardFixedFee.optional(), payment_instrument_tokenization_fixed_fee: paymentInstrumentTokenizationFixedFee.optional(), qualified_tiers: z.object({}).nullable().optional(), rounding_mode: z.enum(["TRANSACTION", "AGGREGATE"]).optional(), settlement_funding_transfer_ach_basis_points_fee_limit: settlementFundingTransferAchBasisPointsFeeLimit.optional(), settlement_funding_transfer_ach_basis_points: settlementFundingTransferAchBasisPoints.optional(), settlement_funding_transfer_ach_credit_return_fixed_fee: settlementFundingTransferAchCreditReturnFixedFee.optional(), settlement_funding_transfer_ach_debit_return_fixed_fee: settlementFundingTransferAchDebitReturnFixedFee.optional(), settlement_funding_transfer_ach_fixed_fee: settlementFundingTransferAchFixedFee.optional(), settlement_funding_transfer_eft_basis_points_fee_limit: settlementFundingTransferEftBasisPointsFeeLimit.optional(), settlement_funding_transfer_eft_basis_points: settlementFundingTransferEftBasisPoints.optional(), settlement_funding_transfer_eft_credit_return_fixed_fee: settlementFundingTransferEftCreditReturnFixedFee.optional(), settlement_funding_transfer_eft_debit_return_fixed_fee: settlementFundingTransferEftDebitReturnFixedFee.optional(), settlement_funding_transfer_eft_fixed_fee: settlementFundingTransferEftFixedFee.optional(), settlement_funding_transfer_instant_payout_card_basis_points_fee_limit: settlementFundingTransferInstantPayoutCardBasisPointsFeeLimit.optional(), settlement_funding_transfer_instant_payout_card_basis_points: settlementFundingTransferInstantPayoutCardBasisPoints.optional(), settlement_funding_transfer_instant_payout_card_fixed_fee: settlementFundingTransferInstantPayoutCardFixedFee.optional(), settlement_funding_transfer_noc_credit_fixed_fee: settlementFundingTransferNocCreditFixedFee.optional(), settlement_funding_transfer_noc_debit_fixed_fee: settlementFundingTransferNocDebitFixedFee.optional(), settlement_funding_transfer_same_day_ach_basis_points_fee_limit: settlementFundingTransferSameDayAchBasisPointsFeeLimit.optional(), settlement_funding_transfer_same_day_ach_basis_points: settlementFundingTransferSameDayAchBasisPoints.optional(), settlement_funding_transfer_same_day_ach_fixed_fee: settlementFundingTransferSameDayAchFixedFee.optional(), subscription_ach_basis_points: subscriptionAchBasisPoints.optional(), subscription_ach_basis_points_fee_limit: subscriptionAchBasisPointsFeeLimit.optional(), subscription_ach_fixed_fee: subscriptionAchFixedFee.optional(), subscription_card_basis_points: subscriptionCardBasisPoints.optional(), subscription_card_fixed_fee: subscriptionCardFixedFee.optional(), subscription_eft_basis_points: subscriptionEftBasisPoints.optional(), subscription_eft_basis_points_fee_limit: subscriptionEftBasisPointsFeeLimit.optional(), subscription_eft_fixed_fee: subscriptionEftFixedFee.optional(), tap_to_pay_basis_points: tapToPayBasisPoints.optional(), tap_to_pay_fixed_fee: tapToPayFixedFee.optional(), third_party_gateway_cybersource_basis_points: thirdPartyGatewayCybersourceBasisPoints.optional(), third_party_gateway_cybersource_fixed_fee: thirdPartyGatewayCybersourceFixedFee.optional(), visa_acquirer_processing_fixed_fee: visaAcquirerProcessingFixedFee.optional(), visa_assessments_basis_points: visaAssessmentsBasisPoints.optional(), visa_base_II_credit_voucher_fixed_fee: visaBaseIICreditVoucherFixedFee.optional(), visa_base_II_system_file_transmission_fixed_fee: visaBaseIISystemFileTransmissionFixedFee.optional(), visa_basis_points: visaBasisPoints.optional(), visa_charge_dues_assessments: visaChargeDuesAssessments.optional(), visa_charge_interchange: visaChargeInterchange.optional(), visa_credit_voucher_fixed_fee: visaCreditVoucherFixedFee.optional(), visa_fixed_fee: visaFixedFee.optional(), visa_kilobyte_access_fixed_fee: visaKilobyteAccessFixedFee.optional(), tags: tags.optional(), _links: z.object({self: z.object({href: z.string().min(1).optional()}).optional(), application: z.object({href: z.string().min(1).optional()}).optional()}).optional()}); export const validateResponse = async ( schema: { readonly '~standard': { readonly validate: (value: unknown) => ({ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }) | Promise<{ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }> } }, value: unknown ): Promise => { const result = await schema['~standard'].validate(value) if (result.issues !== undefined) { const detail = result.issues .map(({ message, path }) => path?.length ? `${path.map((segment) => String(typeof segment === 'object' ? segment.key : segment)).join('.')}: ${message}` : message ) .join('; ') throw new Error(`Response does not match the schema: ${detail}`, { cause: { issues: result.issues } }) } return result.value }; /** * Create a Fee Profile * * POST /fee_profiles */ export const createApiFeeProfiles = async (args: CreateApiFeeProfilesArgs, options?: CreateApiFeeProfilesOptions) => { const {baseUrl = "https://finix.sandbox-payments-api.com", fetch: fetchFn = fetch, BasicAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "application/json") if (args['Finix-Version'] != null) headers.set("Finix-Version", String(args['Finix-Version'])) if (args['Content-Type'] != null) headers.set("Content-Type", String(args['Content-Type'])) if (BasicAuth !== undefined) headers.set('authorization', `Basic ${btoa(`${BasicAuth.username}:${BasicAuth.password}`)}`) const url = `${baseUrl.replace(/\/+$/, '')}/fee_profiles${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return validateResponse(feeProfile, await res.json()) };