import {z} from 'zod' export type PaymentOperationIntent = 'unscheduled_purchase' | 'recurring_purchase' | 'generate_payment_token'; export type SettlementStatus = 'NOT_SETTLED' | 'PENDING_SETTLEMENT' | 'PARTIALLY_SETTLED' | 'SETTLED'; export type MyDinteroUserCreation = {actions: Array<'create_user' | 'skip'>, terms: {id: string, url: string}}; export type SystemRequestHeaders = {'dintero-system-name'?: string | undefined, 'dintero-system-version'?: string | undefined, 'dintero-system-plugin-name'?: string | undefined, 'dintero-system-plugin-version'?: string | undefined, 'user-agent'?: string | undefined}; export type OrderAddress = {first_name?: string | undefined, last_name?: string | undefined, address_line?: string | undefined, address_line_2?: string | undefined, co_address?: string | undefined, business_name?: string | undefined, postal_code?: string | undefined, postal_place?: string | undefined, country?: unknown | undefined, phone_number?: string | undefined, email?: string | undefined, latitude?: number | undefined, longitude?: number | undefined, comment?: string | undefined, organization_number?: string | undefined, organization_type?: string | undefined, customer_reference?: string | undefined, cost_center?: string | undefined}; export type OpeningHours = unknown; export type PayoutFeeSplit = {type: 'proportional', destinations?: Array | undefined}; export type PayoutSplit = {payout_destination_id: string, amount: number}; export type MultiShipmentItem = {line_id: string, quantity?: number | undefined}; export type MultiShipmentShippingOption = {id: string, line_id: string, countries?: Array | undefined, amount: number, vat_amount?: number | undefined, vat?: number | undefined, title: string, description?: string | undefined, delivery_method?: ('delivery' | 'pick_up' | 'unspecified' | 'none') | undefined, operator: string, operator_product_id?: string | undefined, eta?: ({working_days?: Array | undefined, shipping_day_of_week?: number | undefined, arrival_day_of_week?: number | undefined, starts_at?: string | undefined, ends_at?: string | undefined}) | undefined, time_slot?: ({starts_at?: string | undefined, ends_at?: string | undefined}) | undefined, pick_up_address?: ({first_name?: string | undefined, last_name?: string | undefined, address_line?: string | undefined, address_line_2?: string | undefined, co_address?: string | undefined, business_name?: string | undefined, postal_code?: string | undefined, postal_place?: string | undefined, country?: unknown | undefined, phone_number?: string | undefined, email?: string | undefined, latitude?: number | undefined, longitude?: number | undefined, comment?: string | undefined, organization_number?: string | undefined, organization_type?: string | undefined, customer_reference?: string | undefined, cost_center?: string | undefined, website_url?: string | undefined, opening_hours?: OpeningHours | undefined, distance?: number | undefined}) | undefined, metadata?: ({[key: string]: string | number}) | undefined, environmental_data?: ({description: string, details?: Array<{label: string, value: string}> | undefined}) | undefined, thumbnail_url?: string | undefined, pay_in_store?: {type: 'full'} | undefined, fee_split?: PayoutFeeSplit | undefined, splits?: Array | undefined, shipment_id?: string | undefined, shipment_items?: Array | undefined}; export type MultiShipmentTopLevelShippingOption = {id: string, line_id: string, countries?: Array | undefined, amount: number, vat_amount?: number | undefined, vat?: number | undefined, title: string, description?: string | undefined, delivery_method?: ('delivery' | 'pick_up' | 'unspecified' | 'none') | undefined, operator: string, operator_product_id?: string | undefined, eta?: ({working_days?: Array | undefined, shipping_day_of_week?: number | undefined, arrival_day_of_week?: number | undefined, starts_at?: string | undefined, ends_at?: string | undefined}) | undefined, time_slot?: ({starts_at?: string | undefined, ends_at?: string | undefined}) | undefined, pick_up_address?: ({first_name?: string | undefined, last_name?: string | undefined, address_line?: string | undefined, address_line_2?: string | undefined, co_address?: string | undefined, business_name?: string | undefined, postal_code?: string | undefined, postal_place?: string | undefined, country?: unknown | undefined, phone_number?: string | undefined, email?: string | undefined, latitude?: number | undefined, longitude?: number | undefined, comment?: string | undefined, organization_number?: string | undefined, organization_type?: string | undefined, customer_reference?: string | undefined, cost_center?: string | undefined, website_url?: string | undefined, opening_hours?: OpeningHours | undefined, distance?: number | undefined}) | undefined, metadata?: ({[key: string]: string | number}) | undefined, environmental_data?: ({description: string, details?: Array<{label: string, value: string}> | undefined}) | undefined, thumbnail_url?: string | undefined, pay_in_store?: {type: 'full'} | undefined, fee_split?: PayoutFeeSplit | undefined, splits?: Array | undefined, shipments?: Array | undefined}; export type Address = {address_line: string, address_line_2?: string | undefined, postal_code?: string | undefined, postal_place: string, country: unknown}; export type Store = {id: string, name?: string | undefined, business_name?: string | undefined, address?: Address | undefined, chain?: string | undefined, email?: string | undefined, gln?: string | undefined, organization_number?: string | undefined, phone_number?: string | undefined, mcc?: unknown | undefined, bax?: string | undefined, terminal_id?: string | undefined, payout_destination_id?: string | undefined}; export type Giftcard = {type: 'dintero.wallets', card_id: string, amount: number, masked_card_token?: string | undefined}; export type EmdEvent = Array<{event_name: string, event_company: string, genre_of_event: string, arena_name?: string | undefined, arena_location?: ({street_address?: string | undefined, postal_code?: string | undefined, city: string, country: string}) | undefined, start_time: string, end_time: string, access_controlled_venue?: boolean | undefined, ticket_delivery_method: 'pick_up' | 'email' | 'post' | 'phone', ticket_delivery_recipient: string, affiliate_name?: string | undefined}>; export type EmdSubscription = {subscription_name: string, start_time: string, end_time: string, auto_renewal_of_subscription: boolean, affiliate_name?: string | undefined}; export type EmdCustomerAccountInfo = {unique_account_identifier: string, account_registration_date: string, account_last_modified: string}; export type EmdRecurring = {subscription: EmdSubscription, customer_account_info: EmdCustomerAccountInfo}; export type EmdAirReservationDetailsItinerary = {departure: string, departure_city?: string | undefined, arrival: string, arrival_city?: string | undefined, carrier: string, segment_price?: number | undefined, departure_date: string, ticket_delivery_method: 'pick_up' | 'email' | 'post' | 'phone', ticket_delivery_recipient: string, passenger_id?: Array | undefined, class?: string | undefined}; export type EmdTravelInsurance = {insurance_company?: string | undefined, insurance_type?: ('cancellation' | 'travel' | 'cancellation_travel' | 'bankruptcy') | undefined, insurance_price?: number | undefined}; export type EmdTravelPassenger = {id?: number | undefined, title?: ('mr' | 'mrs' | 'ms' | '') | undefined, first_name: string, last_name: string}; export type EmdAirReservationDetails = {pnr?: string | undefined, itinerary: Array, insurance?: Array | undefined, passengers?: Array | undefined, affiliate_name?: string | undefined}; export type EmdBusReservationDetailsItinerary = {departure_city: string, arrival_city: string, carrier: string, segment_price?: number | undefined, departure_date: string, ticket_delivery_method: 'pick_up' | 'email' | 'post' | 'phone', ticket_delivery_recipient: string, passenger_id?: Array | undefined, class?: string | undefined}; export type EmdBusReservationDetails = {pnr?: string | undefined, itinerary: Array, insurance?: Array | undefined, passengers?: Array | undefined, affiliate_name?: string | undefined}; export type EmdTrainReservationDetailsItinerary = {departure_city: string, arrival_city: string, carrier: string, segment_price?: number | undefined, departure_date: string, ticket_delivery_method: 'pick_up' | 'email' | 'post' | 'phone', ticket_delivery_recipient: string, passenger_id: Array, class?: string | undefined}; export type EmdTrainReservationDetails = {pnr?: string | undefined, itinerary: Array, insurance?: Array | undefined, passengers?: Array | undefined, affiliate_name?: string | undefined}; export type EmdFerryReservationDetailsItinerary = {departure_city: string, arrival_city: string, carrier: string, segment_price?: number | undefined, departure_date: string, ticket_delivery_method: 'pick_up' | 'email' | 'post' | 'phone', ticket_delivery_recipient: string, passenger_id?: Array | undefined, class?: string | undefined}; export type EmdFerryReservationDetails = {pnr?: string | undefined, itinerary: Array, insurance?: Array | undefined, passengers?: Array | undefined, affiliate_name?: string | undefined}; export type EmdHotelReservationDetailsItinerary = {hotel_name?: string | undefined, address?: ({street_address?: string | undefined, postal_code?: string | undefined, city: string, country: string}) | undefined, start_time: string, end_time: string, number_of_rooms: number, passenger_id: Array, ticket_delivery_method: 'pick_up' | 'email' | 'post' | 'phone', ticket_delivery_recipient: string, hotel_price: number, class?: string | undefined}; export type EmdHotelReservationDetails = {pnr?: string | undefined, itinerary: Array, insurance?: Array | undefined, passengers?: Array | undefined, affiliate_name?: string | undefined}; export type EmdCarRentalReservationDetailsItinerary = {rental_company: string, drivers_id?: Array | undefined, pick_up_location?: ({street_address?: string | undefined, postal_code?: string | undefined, city: string, country: string}) | undefined, drop_off_location?: ({street_address?: string | undefined, postal_code?: string | undefined, city: string, country: string}) | undefined, start_time: string, end_time: string, car_price?: number | undefined, class?: string | undefined}; export type EmdCarRentalReservationDetails = {pnr?: string | undefined, itinerary: Array, insurance?: Array | undefined, drivers: Array, affiliate_name?: string | undefined}; export type EmdTravel = {air_reservation_details?: EmdAirReservationDetails | undefined, bus_reservation_details?: EmdBusReservationDetails | undefined, train_reservation_details?: EmdTrainReservationDetails | undefined, ferry_reservation_details?: EmdFerryReservationDetails | undefined, hotel_reservation_details?: EmdHotelReservationDetails | undefined, car_rental_reservation_details?: EmdCarRentalReservationDetails | undefined}; export type EmdMarketplaceAccountLastModified = {password: string, email: string, listing: string, login: string, address: string}; export type EmdMarketplaceSellerInfo = {unique_account_identifier_seller?: ({email?: string | undefined, phone_number?: string | undefined, other?: string | undefined}) | undefined, sub_merchant_id: string, product_category: string, product_name?: string | undefined, account_registration_date: string, account_last_modified: EmdMarketplaceAccountLastModified, seller_rating?: number | undefined, number_of_trades: number, volume_of_trades?: number | undefined}; export type EmdMarketplaceWinnerInfo = {unique_account_identifier_winner?: ({email?: string | undefined, phone_number?: string | undefined, other?: string | undefined}) | undefined, account_registration_date: string, account_last_modified: EmdMarketplaceAccountLastModified, number_of_trades: number, volume_of_trades?: number | undefined}; export type EmdMarketplaceOrder = {seller_info: EmdMarketplaceSellerInfo, winner_info: EmdMarketplaceWinnerInfo}; export type Emd = {event?: EmdEvent | undefined, subscription?: EmdRecurring | undefined, travel?: EmdTravel | undefined, marketplace_order?: EmdMarketplaceOrder | undefined}; export type DiscountType = 'customer' | 'periodic' | 'manual' | 'loyalty' | 'total' | 'employee' | 'external'; export type DiscountItem = {amount?: number | undefined, percentage?: number | undefined, discount_type?: DiscountType | undefined, discount_id?: string | undefined, description?: string | undefined, line_id?: number | undefined}; export type RequestHeaders = {'dintero-system-name'?: string | undefined, 'dintero-system-version'?: string | undefined, 'dintero-system-plugin-name'?: string | undefined, 'dintero-system-plugin-version'?: string | undefined, 'user-agent'?: string | undefined, 'dintero-checkout-instance-id'?: string | undefined}; export type TransactionSettlementsEvent = {settlement_id: string, provider_reference: string, event_correlation_id?: string | undefined, amount: number, capture?: number | undefined, refund?: number | undefined, fee?: number | undefined}; export type TransactionSettlementsRead = {events: Array, settlement_status?: ('NOT_SETTLED' | 'PENDING_SETTLEMENT' | 'PARTIALLY_SETTLED' | 'SETTLED') | undefined}; export type SessionUrls = {return_url: string}; export type SessionCustomer = {customer_id?: string | undefined, email?: string | undefined, phone_number?: string | undefined}; export type SessionOrder = {amount: number, currency: unknown, vat_amount?: number | undefined, merchant_reference_2?: string | undefined, event_reference?: string | undefined, shipping_address?: OrderAddress | undefined, billing_address?: OrderAddress | undefined, partial_payment?: boolean | undefined, items?: (Array<{id?: string | undefined, groups?: (Array<{id: string, name?: string | undefined}>) | undefined, line_id?: string | undefined, version?: number | undefined, description?: string | undefined, quantity?: number | undefined, amount?: number | undefined, vat_amount?: number | undefined, vat?: number | undefined, unit_volume?: number | undefined, unit_weight?: number | undefined, unit_dimensional_weight?: number | undefined, type?: ('physical' | 'digital' | 'service' | 'gift_card' | 'shipping' | 'surcharge') | undefined, fee_split?: PayoutFeeSplit | undefined, splits?: Array | undefined, thumbnail_url?: string | undefined, emd?: Emd | undefined, store?: Store | undefined, eligible_for_discount?: boolean | undefined, is_changed?: boolean | undefined, gross_amount?: number | undefined, discount_lines?: Array | undefined}>) | undefined, gross_amount?: number | undefined, is_changed?: boolean | undefined, shipping_option?: MultiShipmentTopLevelShippingOption | undefined, store?: Store | undefined, discount_lines?: Array | undefined, discount_codes?: Array | undefined, gift_cards?: Array | undefined, emd?: Emd | undefined, payout_destination_id?: string | undefined, merchant_reference: string}; export type Checkbox = {id: string, label: string, checked?: boolean | undefined, required?: boolean | undefined, link?: {url: string, text: string} | undefined}; export type CheckboxConfiguration = Array; export type PublishConfiguration = Array<{channel: 'sms' | 'push', type: 'checkout-link' | 'app' | 'terminal', id?: string | undefined, status?: ('sent' | 'skipped' | 'failed') | undefined}>; export type BamboraConfiguration = unknown; export type DinteroConfiguration = unknown; export type DinteroPspConfiguration = unknown; export type InstabankConfiguration = unknown; export type NetaxeptConfiguration = unknown; export type PayExConfiguration = unknown; export type VippsConfiguration = unknown; export type CollectorConfiguration = unknown; export type KlarnaConfiguration = unknown; export type KraviaConfiguration = unknown; export type TwoConfiguration = unknown; export type SantanderConfiguration = unknown; export type SeitatechConfiguration = unknown; export type SwishConfiguration = unknown; export type PayoutConfiguration = unknown; export type AgeVerificationConfiguration = unknown; export type SessionPayability = unknown; export type CollectorB2BPaymentOperationAddress = {business_name: string, organization_number: string, address_line: string, postal_code: string, postal_place: string, country: unknown, address_id?: string | undefined}; export type CollectorProduct = {id: string, type: 'interest_free' | 'annuity', credit_time: number, campaign_fee: number, origination_fee: number, notification_fee: number, annual_interest_rate?: string | undefined, effective_annual_interest_rate?: string | undefined, total_amount: number, monthly_amount: number, first_monthly_amount: number}; export type ShippingOption = {id: string, line_id: string, countries?: Array | undefined, amount: number, vat_amount?: number | undefined, vat?: number | undefined, title: string, description?: string | undefined, delivery_method?: ('delivery' | 'pick_up' | 'unspecified' | 'none') | undefined, operator: string, operator_product_id?: string | undefined, eta?: ({working_days?: Array | undefined, shipping_day_of_week?: number | undefined, arrival_day_of_week?: number | undefined, starts_at?: string | undefined, ends_at?: string | undefined}) | undefined, time_slot?: ({starts_at?: string | undefined, ends_at?: string | undefined}) | undefined, pick_up_address?: ({first_name?: string | undefined, last_name?: string | undefined, address_line?: string | undefined, address_line_2?: string | undefined, co_address?: string | undefined, business_name?: string | undefined, postal_code?: string | undefined, postal_place?: string | undefined, country?: unknown | undefined, phone_number?: string | undefined, email?: string | undefined, latitude?: number | undefined, longitude?: number | undefined, comment?: string | undefined, organization_number?: string | undefined, organization_type?: string | undefined, customer_reference?: string | undefined, cost_center?: string | undefined, website_url?: string | undefined, opening_hours?: OpeningHours | undefined, distance?: number | undefined}) | undefined, metadata?: ({[key: string]: string | number}) | undefined, environmental_data?: ({description: string, details?: Array<{label: string, value: string}> | undefined}) | undefined, thumbnail_url?: string | undefined}; export type SessionExpress = {express?: ({shipping_options: Array, shipping_mode?: ('shipping_required' | 'shipping_not_required') | undefined, discount_codes?: ({max_count?: number | undefined, callback_url?: string | undefined}) | undefined, shipping_address_callback_url?: string | undefined, customer_types?: (Array<'b2c' | 'b2b'>) | undefined, default_different_billing_shipping_address?: (Array<'b2c' | 'b2b'>) | undefined}) | undefined}; export type Session = {url: SessionUrls, customer?: SessionCustomer | undefined, order: SessionOrder, expires_at?: string | undefined, checkboxes?: CheckboxConfiguration | undefined, express?: ({shipping_options: Array<{id: string, line_id: string, countries?: Array | undefined, amount: number, vat_amount?: number | undefined, vat?: number | undefined, title: string, description?: string | undefined, delivery_method?: ('delivery' | 'pick_up' | 'unspecified' | 'none') | undefined, operator: string, operator_product_id?: string | undefined, eta?: ({working_days?: Array | undefined, shipping_day_of_week?: number | undefined, arrival_day_of_week?: number | undefined, starts_at?: string | undefined, ends_at?: string | undefined}) | undefined, time_slot?: ({starts_at?: string | undefined, ends_at?: string | undefined}) | undefined, pick_up_address?: ({first_name?: string | undefined, last_name?: string | undefined, address_line?: string | undefined, address_line_2?: string | undefined, co_address?: string | undefined, business_name?: string | undefined, postal_code?: string | undefined, postal_place?: string | undefined, country?: unknown | undefined, phone_number?: string | undefined, email?: string | undefined, latitude?: number | undefined, longitude?: number | undefined, comment?: string | undefined, organization_number?: string | undefined, organization_type?: string | undefined, customer_reference?: string | undefined, cost_center?: string | undefined, website_url?: string | undefined, opening_hours?: OpeningHours | undefined, distance?: number | undefined}) | undefined, metadata?: ({[key: string]: string | number}) | undefined, environmental_data?: ({description: string, details?: Array<{label: string, value: string}> | undefined}) | undefined, thumbnail_url?: string | undefined, pay_in_store?: {type: 'full'} | undefined, fee_split?: PayoutFeeSplit | undefined, splits?: Array | undefined, shipment_id?: string | undefined, shipment_items?: Array | undefined}>, shipping_mode?: ('shipping_required' | 'shipping_not_required') | undefined, discount_codes?: ({max_count?: number | undefined, callback_url?: string | undefined}) | undefined, shipping_address_callback_url?: string | undefined, customer_types?: (Array<'b2c' | 'b2b'>) | undefined, default_different_billing_shipping_address?: (Array<'b2c' | 'b2b'>) | undefined}) | undefined, configuration: {auto_capture?: boolean | undefined, channel?: ('ecommerce' | 'in_app' | 'in_store' | 'hosted') | undefined, publish?: PublishConfiguration | undefined, active_payment_types?: ({enabled?: boolean | undefined}) | undefined, default_payment_type?: ('bambora.applepay' | 'bambora.creditcard' | 'bambora.googlepay' | 'bambora.mobilepay' | 'bambora.vipps' | 'dintero.zero' | 'dintero_psp.applepay' | 'dintero_psp.creditcard' | 'dintero_psp.vipps' | 'dintero_psp.googlepay' | 'dintero_psp.clicktopay' | 'instabank.finance' | 'instabank.invoice' | 'instabank.installment' | 'instabank.postponement' | 'vipps' | 'payex.creditcard' | 'payex.mobilepay' | 'payex.swish' | 'payex.vipps' | 'payex.applepay' | 'payex.clicktopay' | 'payex.googlepay' | 'collector.finance' | 'collector.invoice' | 'collector.invoice_b2b' | 'collector.invoice_b2b_preapproved' | 'collector.installment_b2b_preapproved' | 'collector.installment' | 'santander.debit_account' | 'swish.swish' | 'netaxept.creditcard' | 'klarna.klarna' | 'klarna.billie' | 'kravia.invoice_b2b' | 'kravia.invoice_b2b_grouped' | 'kravia.invoice_b2c' | 'seitatech.in_person' | 'two.invoice_b2b') | undefined, bambora?: BamboraConfiguration | undefined, dintero?: DinteroConfiguration | undefined, dintero_psp?: DinteroPspConfiguration | undefined, instabank?: InstabankConfiguration | undefined, netaxept?: NetaxeptConfiguration | undefined, payex?: PayExConfiguration | undefined, vipps?: VippsConfiguration | undefined, collector?: CollectorConfiguration | undefined, klarna?: KlarnaConfiguration | undefined, kravia?: KraviaConfiguration | undefined, two?: TwoConfiguration | undefined, santander?: SantanderConfiguration | undefined, seitatech?: SeitatechConfiguration | undefined, swish?: SwishConfiguration | undefined, payout?: PayoutConfiguration | undefined, allow_express_wallet_payment?: boolean | undefined, age_verification?: AgeVerificationConfiguration | undefined, discounts?: ({type?: 'discounts' | undefined, express_discount_codes?: ({payability?: SessionPayability | undefined, enabled: boolean}) | undefined, order?: {enabled: boolean} | undefined}) | undefined, theme?: ({backdrop?: string | undefined, primary?: string | undefined, cardRadius?: string | undefined, buttonRadius?: string | undefined}) | undefined, countries?: ({preferred_country?: unknown | undefined, allow_countries?: Array | undefined, deny_countries?: Array | undefined}) | undefined, default_customer_type?: ('b2c' | 'b2b') | undefined, allow_different_billing_shipping_address?: (Array<'b2c' | 'b2b'>) | undefined}, id?: string | undefined, created_at?: string | undefined, updated_at?: string | undefined, customer_ip?: string | undefined, user_agent?: string | undefined, initiating_system_request_headers?: SystemRequestHeaders | undefined, payment_operation?: PaymentOperationIntent | undefined, events?: (Array<{created_at?: string | undefined, id?: string | undefined, request_id?: string | undefined, name?: ('INITIATED' | 'VISITED' | 'COMPLETED' | 'AUTHORIZED' | 'DECLINED' | 'PAY_LOCK_START' | 'PAY_LOCK_META' | 'PAY_LOCK_END' | 'PAY_FAILED' | 'ON_HOLD_CALLBACK_SENT' | 'AUTH_CALLBACK_SENT' | 'FAILED' | 'UNKNOWN' | 'PAYMENT_TOKEN_FLOW_START' | 'UPDATE_SESSION' | 'CANCELLED' | 'SET_BILLING_ADDRESS' | 'SET_DISCOUNT_CODES' | 'SET_SHIPPING_ADDRESS' | 'SET_SHIPPING_OPTION' | 'SET_GIFT_CARD' | 'PUSH_NOTIFICATION_SENT' | 'SECRET_CONFIRMATION_CODE_SENT' | 'SET_MY_DINTERO' | 'ADD_PAYMENT_INFORMATION') | undefined, request_headers?: RequestHeaders | undefined, details?: ({error?: string | undefined, payment_product_type?: string | undefined, amount?: number | undefined, shipping_option?: MultiShipmentTopLevelShippingOption | undefined, shipping_address?: OrderAddress | undefined, bambora?: ({session_token?: string | undefined, session_url?: string | undefined, wallet_session_id?: string | undefined}) | undefined, klarna?: {client_token: string, session_id: string} | undefined, 'seitatech:payment_reference'?: string | undefined, 'seitatech:terminal_id'?: string | undefined, 'seitatech:terminal_tms_id'?: string | undefined, 'payex:payment:id'?: string | undefined, 'vipps:payment:id'?: string | undefined, 'vipps:gateway_api_version'?: string | undefined, 'collector:invoice_b2b:addresses'?: Array | undefined, 'collector:installment:products'?: Array | undefined, my_dintero?: MyDinteroUserCreation | undefined, organization_number?: string | undefined, previous_order?: SessionOrder | undefined, updated_order?: SessionOrder | undefined, updated_order_result?: ({status?: 'NOT_MODIFIED' | undefined}) | undefined, previous_express?: SessionExpress | undefined, updated_express?: SessionExpress | undefined, updated_express_result?: ({status?: 'NOT_MODIFIED' | undefined}) | undefined, gift_card?: ({card_id?: string | undefined, card_amount?: number | undefined, masked_card_token?: string | undefined, currency?: string | undefined}) | undefined, transaction_event_id?: string | undefined}) | undefined}>) | undefined, transaction_id?: string | undefined}; export type InvoiceChannel = 'merchant' | 'kravia'; export type Card = {brand?: string | undefined, masked_pan?: string | undefined, expiry_date?: unknown | undefined, type?: ('Credit' | 'Debit' | 'Credit Card' | 'Debit Card' | 'Prepaid') | undefined, region?: ('domestic' | 'eea' | 'eea-uk' | 'europe' | 'inter') | undefined, country?: unknown | undefined, product_platform?: ('consumer' | 'commercial') | undefined, issuing_bank?: string | undefined, acquirer_transaction_type?: ('3DSECURE' | 'SSL') | undefined, acquirer_stan?: string | undefined, acquirer_terminal_id?: string | undefined, acquirer_transaction_time?: string | undefined, authentication_status?: ('Y' | 'A' | 'U' | 'N') | undefined, three_ds_version?: string | undefined, three_ds_server_trans_id?: string | undefined, eci?: string | undefined, payment_system_type?: string | undefined, payment_token?: string | undefined, payment_token_id?: string | undefined, recurrence_token?: string | undefined, recurrence_token_id?: string | undefined, card_holder_tokenization_consent?: ('opt_in' | 'opt_out') | undefined, entry_method?: ('chip' | 'contactless' | 'magstripe') | undefined}; export type VerifiedIdentity = {type: 'collector-idp' | 'dintero-idp', iss: string, sub?: string | undefined, aud: string, acr: string, auth_time: string, national_idp: string, national_country: unknown, nonce?: string | undefined, name?: string | undefined, given_name?: string | undefined, family_name?: string | undefined}; export type Transaction = {id?: string | undefined, created_at?: string | undefined, payment_product: 'bambora' | 'collector' | 'dintero' | 'dintero_psp' | 'instabank' | 'klarna' | 'netaxept' | 'payex' | 'santander' | 'swish' | 'vipps' | 'kravia' | 'two' | 'seitatech', payment_product_type: 'bambora.applepay' | 'bambora.creditcard' | 'bambora.googlepay' | 'bambora.mobilepay' | 'bambora.vipps' | 'collector.invoice' | 'collector.invoice_b2b' | 'collector.invoice_b2b_preapproved' | 'collector.installment' | 'dintero.zero' | 'dintero.wallets' | 'dintero.external' | 'dintero_psp.creditcard' | 'dintero_psp.vipps' | 'dintero_psp.googlepay' | 'dintero_psp.applepay' | 'dintero_psp.clicktopay' | 'instabank.finance' | 'instabank.invoice' | 'instabank.installment' | 'instabank.postponement' | 'klarna.klarna' | 'klarna.billie' | 'kravia.invoice_b2b' | 'kravia.invoice_b2b_grouped' | 'kravia.invoice_b2c' | 'two.invoice_b2b' | 'netaxept.creditcard' | 'payex.creditcard' | 'payex.mobilepay' | 'payex.swish' | 'payex.vipps' | 'payex.applepay' | 'payex.clicktopay' | 'payex.googlepay' | 'santander.debit_account' | 'seitatech.in_person' | 'swish.swish' | 'vipps', amount: number, currency: unknown, payout_destination_id?: string | undefined, merchant_reference?: string | undefined, channel?: ('ecommerce' | 'in_app' | 'in_store') | undefined, platform_type?: ('aggregator' | 'marketplace') | undefined, merchant_reference_2?: string | undefined, dynamic_descriptor?: string | undefined, payment_operation?: PaymentOperationIntent | undefined, settlement_status?: SettlementStatus | undefined, customer?: ({customer_id?: string | undefined, email?: string | undefined, phone_number?: string | undefined, my_dintero?: MyDinteroUserCreation | undefined}) | undefined, customer_ip?: string | undefined, user_agent?: string | undefined, initiating_system_request_headers?: SystemRequestHeaders | undefined, shipping_address?: OrderAddress | undefined, shipping_option?: MultiShipmentTopLevelShippingOption | undefined, billing_address?: OrderAddress | undefined, store?: Store | undefined, status?: ('INITIATED' | 'AUTHORIZED' | 'AUTHORIZATION_VOIDED' | 'CAPTURED' | 'PARTIALLY_CAPTURED' | 'PARTIALLY_CAPTURED_REFUNDED' | 'REFUNDED' | 'PARTIALLY_REFUNDED' | 'DECLINED' | 'FAILED' | 'UNKNOWN' | 'ON_HOLD') | undefined, gift_cards?: Array | undefined, items?: (Array<{id?: string | undefined, groups?: (Array<{id: string, name?: string | undefined}>) | undefined, line_id?: string | undefined, version?: number | undefined, description?: string | undefined, quantity?: number | undefined, amount?: number | undefined, vat_amount?: number | undefined, vat?: number | undefined, unit_volume?: number | undefined, unit_weight?: number | undefined, unit_dimensional_weight?: number | undefined, type?: ('physical' | 'digital' | 'service' | 'gift_card' | 'shipping' | 'surcharge') | undefined, fee_split?: PayoutFeeSplit | undefined, splits?: Array | undefined, thumbnail_url?: string | undefined, emd?: Emd | undefined, store?: Store | undefined, eligible_for_discount?: boolean | undefined, is_changed?: boolean | undefined, gross_amount?: number | undefined, discount_lines?: Array | undefined}>) | undefined, url?: ({redirect_url?: string | undefined, approval_url?: string | undefined, callback_url?: string | undefined}) | undefined, events?: (Array<{id?: string | undefined, transaction_status?: ('INITIATED' | 'AUTHORIZED' | 'AUTHORIZATION_VOIDED' | 'CAPTURED' | 'PARTIALLY_CAPTURED' | 'REFUNDED' | 'PARTIALLY_REFUNDED' | 'DECLINED' | 'FAILED' | 'UNKNOWN' | 'ON_HOLD') | undefined, gift_cards?: (Array<{type: 'dintero.wallets', card_id: string, amount: number, masked_card_token?: string | undefined, transaction_id: string}>) | undefined, event?: ('INITIALIZE' | 'AUTHORIZE' | 'CAPTURE' | 'REFUND' | 'VOID' | 'INITIATE_REFUND' | 'INITIATE_VOID' | 'INITIATE_CAPTURE' | 'SETTLEMENT') | undefined, success?: boolean | undefined, correction?: ({event_ids?: Array | undefined, status: string, remaining_capture_amount: number, remaining_refund_amount: number, remaining_void_amount: number}) | undefined, error?: ({code?: string | undefined, message: string, type?: (Array<'ERROR' | 'DECLINED' | 'ISSUER_ERROR' | 'PICK_UP_CARD' | 'INVALID_MERCHANT' | 'INVALID_TRANSACTION' | 'INVALID_AMOUNT' | 'INSUFFICIENT_FUNDS' | 'CLOSED_ACCOUNT' | 'EXPIRED_CARD' | 'EXCEEDS_APPROVAL_LIMIT' | 'EXCEEDS_WITHDRAWAL_FREQUENCY_LIMIT' | 'RESTRICTED_CARD' | 'PIN_REQUIRED' | 'FAILED_VERIFICATION' | 'ADDITIONAL_VERIFICATION_REQUIRED' | 'AUTHORIZATION_EXPIRED' | 'PENDING_ISSUER_RESPONSE' | 'UNKNOWN'>) | undefined, result_code?: string | undefined, retry_policy?: ({retry_codes: Array<'DO_NOT_RETRY' | 'RETRY_IMMEDIATELY' | 'RETRY_AFTER_DELAY'>, retry_after?: string | undefined}) | undefined}) | undefined, amount?: number | undefined, calculated_vat_amount?: number | undefined, items?: (Array<{discount_lines?: Array | undefined, id?: string | undefined, groups?: (Array<{id: string, name?: string | undefined}>) | undefined, line_id?: string | undefined, version?: number | undefined, description?: string | undefined, quantity?: number | undefined, amount?: number | undefined, vat_amount?: number | undefined, vat?: number | undefined, unit_volume?: number | undefined, unit_weight?: number | undefined, unit_dimensional_weight?: number | undefined, type?: ('physical' | 'digital' | 'service' | 'gift_card' | 'shipping' | 'surcharge') | undefined, fee_split?: PayoutFeeSplit | undefined, splits?: Array | undefined, thumbnail_url?: string | undefined, emd?: Emd | undefined, store?: Store | undefined}>) | undefined, created_at?: string | undefined, created_by?: string | undefined, request_id?: string | undefined, metadata?: ({'bambora:transaction:status'?: string | undefined, 'bambora:transactionoperation:id'?: string | undefined, 'bambora:meta:action:source'?: string | undefined, 'bambora:meta:action:code'?: string | undefined, 'bambora:meta:action:type'?: string | undefined, payout_correlation_id?: string | undefined, 'collector:Invoice.InvoiceStatus'?: number | undefined, 'collector:CorrelationId'?: string | undefined, 'collector:Invoice.PaymentReference'?: string | undefined, 'collector:Invoice.LowestAmountToPay'?: number | undefined, 'collector:Invoice.TotalAmount'?: number | undefined, 'collector:Invoice.DueDate'?: string | undefined, 'collector:Invoice.InvoiceUrl'?: string | undefined, 'collector:Invoice.CurrentInvoiceNumber'?: string | undefined, 'collector:Invoice.NewInvoiceNumber'?: string | undefined, 'instabank:Sale.Status'?: string | undefined, 'instabank:RequestId'?: string | undefined, 'dintero_psp:operation_ref'?: string | undefined, 'dintero_psp:authorization_operation_ref'?: string | undefined, 'dintero_psp:capture_operation_ref'?: string | undefined, 'dintero_psp:sale_operation_ref'?: string | undefined, 'dintero_psp:network:correlation_id'?: string | undefined, 'dintero_psp:network:acquirer_stan'?: string | undefined, 'dintero_psp:network:lifecycle_trace_id'?: string | undefined, 'klarna:reference'?: string | undefined, 'klarna:headers:capture_id'?: string | undefined, 'klarna:headers:refund_id'?: string | undefined, 'klarna:headers:location'?: string | undefined, 'klarna:authorization_expiration'?: string | undefined, 'klarna:authorization_expiration_reason'?: string | undefined, 'klarna:authorization_expiration_reference'?: string | undefined, 'klarna:authorization_expiration_error_reason'?: string | undefined, 'klarna:order_amount_update_error'?: string | undefined, 'klarna:order_amount_update_can_retry'?: ('0' | '1') | undefined, 'netaxept:transaction_id'?: string | undefined, 'netaxept:operation'?: string | undefined, 'netaxept:execution_time'?: string | undefined, 'netaxept:bat_number'?: string | undefined, 'netaxept:response_code'?: string | undefined, 'netaxept:terminal_url'?: string | undefined, 'payex:transaction:id'?: string | undefined, 'payex:transaction:number'?: (number | string) | undefined, 'payex:transaction:type'?: string | undefined, 'payex:transaction:state'?: string | undefined, 'payex:transaction:created'?: string | undefined, 'payex:transaction:payee_reference'?: string | undefined, 'santander:debit_account.ApplicationNumber'?: string | undefined, 'santander:debit_account.StatusCode'?: string | undefined, 'swish:payment_request:token'?: string | undefined, 'swish:payment_request:get_payment_url'?: string | undefined, 'swish:id'?: string | undefined, 'swish:originalPaymentReference'?: string | undefined, 'swish:paymentReference'?: string | undefined, 'swish:amount'?: string | undefined, 'swish:dateCreated'?: string | undefined, 'swish:datePaid'?: string | undefined, 'swish:status'?: string | undefined, 'swish:errorCode'?: string | undefined, 'swish:errorMessage'?: string | undefined, 'vipps:transactionInfo.timeStamp'?: string | undefined, 'vipps:transactionInfo.transactionId'?: string | undefined, 'vipps:transactionInfo.status'?: ('INITIATE' | 'RESERVE' | 'CANCEL' | 'CAPTURE' | 'SALE' | 'VOID' | 'Captured' | 'Cancelled' | 'Refund') | undefined, 'vipps:transaction.transactionText'?: string | undefined, 'kravia:invoice_date'?: string | undefined, 'kravia:invoice_due_date'?: string | undefined, 'kravia:invoice_number'?: string | undefined, 'kravia:creditor_id'?: string | undefined, 'kravia:invoice_id'?: string | undefined, 'kravia:payment_details:bank_account:bban'?: string | undefined, 'kravia:payment_details:bank_account:iban'?: string | undefined, 'kravia:payment_details:bank_account:swift'?: string | undefined, 'kravia:payment_details:kid'?: string | undefined, terminal_id?: string | undefined, refund_timeout_at?: string | undefined, device_serial_number?: string | undefined, 'seitatech:refund_request:id'?: string | undefined, 'seitatech:refund_request:status'?: string | undefined, 'seitatech:uniqueId'?: string | undefined, 'seitatech:receiptNumber'?: string | undefined, 'seitatech:outcome'?: string | undefined, 'seitatech:merchantCategoryCode'?: string | undefined, 'seitatech:applicationIdentifier'?: string | undefined, 'seitatech:acquirer'?: string | undefined, 'seitatech:actionCode'?: string | undefined, 'seitatech:archiveId'?: string | undefined, 'seitatech:authorizer'?: string | undefined, 'seitatech:batchId'?: string | undefined, 'seitatech:customerReceipt'?: string | undefined, 'seitatech:customerReceiptPart2'?: string | undefined, 'seitatech:field41'?: string | undefined, 'seitatech:field42'?: string | undefined, 'seitatech:merchantReceipt'?: string | undefined, 'seitatech:merchantReceiptPart2'?: string | undefined, 'seitatech:reasonCode'?: string | undefined, 'seitatech:responseCode'?: string | undefined, 'seitatech:serviceIdentifier'?: string | undefined, 'seitatech:aip'?: string | undefined, 'seitatech:atc'?: string | undefined, 'seitatech:cid'?: string | undefined, 'seitatech:cvm'?: string | undefined, 'seitatech:tvr'?: string | undefined, 'seitatech:languageCode'?: string | undefined, 'seitatech:tsi'?: string | undefined, 'seitatech:terminalSerialNumber'?: string | undefined, 'seitatech:transactionType'?: string | undefined, 'seitatech:saleAmount'?: string | undefined, 'seitatech:batchUuid'?: string | undefined, 'seitatech:outcomeReason'?: string | undefined, 'seitatech:posReferenceData'?: string | undefined, 'seitatech:conlonToken'?: string | undefined, 'two:order_id'?: string | undefined, 'two:remaining_order_id'?: string | undefined, 'two:invoice_url'?: string | undefined, 'two:invoice_number'?: string | undefined, 'two:credit_note_url'?: string | undefined, 'two:credit_note_number'?: string | undefined, 'two:due_date'?: string | undefined}) | undefined, correlation_request_id?: string | undefined, event_reference?: string | undefined, request_headers?: RequestHeaders | undefined, settlements?: TransactionSettlementsRead | undefined}>) | undefined, session_id?: string | undefined, session?: Session | undefined, updated_at?: string | undefined, metadata?: ({merchant_name?: string | undefined, merchant_country?: string | undefined, merchant_category_code?: string | undefined, 'session:profile_id'?: string | undefined, event_reference?: string | undefined, payout?: ('payout_account' | 'payout_splits' | 'payout_destination_id') | undefined, payout_correlation_id?: string | undefined, 'gateway:id'?: string | undefined, 'bambora:merchant_number'?: string | undefined, 'bambora:transaction_id'?: string | undefined, 'bambora:reference'?: string | undefined, 'bambora:acquirer'?: string | undefined, 'bambora:wallet'?: string | undefined, 'collector:StoreId'?: string | undefined, 'collector:Invoice.InvoiceNumber'?: string | undefined, 'collector:Invoice.OrderNumber'?: string | undefined, 'collector:Invoice.CountryCode'?: string | undefined, 'collector:Invoice.ProductCode'?: string | undefined, 'collector:Invoice.InvoiceType'?: string | undefined, 'collector:Invoice.SettlementReference'?: string | undefined, 'instabank:Sale.ExternalReference'?: string | undefined, 'instabank:Sale.Sequence'?: number | undefined, 'instabank:Sale.Product.Name'?: string | undefined, 'klarna:authorized_payment_method:type'?: ('invoice' | 'fixed_amount' | 'base_account' | 'direct_debit' | 'direct_bank_transfer' | 'b2b_invoice' | 'card' | 'slice_it_by_card' | 'pay_later_by_card' | 'pay_by_card' | 'fixed_sum_credit') | undefined, 'klarna:authorized_payment_method:number_of_days'?: string | undefined, 'klarna:authorized_payment_method:number_of_installments'?: string | undefined, 'klarna:authorized_payment_method:fraud_status'?: ('ACCEPTED' | 'PENDING') | undefined, 'netaxept:merchant_id'?: string | undefined, 'netaxept:transaction_id'?: string | undefined, 'payex:payment:payee_info:payee_id'?: string | undefined, 'payex:payment:payee_info:payee_name'?: string | undefined, 'payex:payment:payee_info:subsite'?: string | undefined, 'payex:payment:id'?: string | undefined, 'payex:payment:number'?: (number | string) | undefined, 'payex:payment:operation'?: string | undefined, 'payex:payment:created'?: string | undefined, 'santander:debit_account.ApplicationNumber'?: string | undefined, 'santander:debit_account.StatusCode'?: string | undefined, 'swish:payment_request:id'?: string | undefined, 'swish:swish_number'?: string | undefined, 'swish:id'?: string | undefined, 'swish:paymentReference'?: string | undefined, 'vipps:transaction.orderId'?: string | undefined, 'vipps:transaction.transactionText'?: string | undefined, 'vipps:merchantInfo.merchantSerialNumber'?: unknown | undefined, 'vipps:merchantInfo.paymentType'?: 'eComm Regular Payment' | undefined, 'kravia:invoice_number'?: string | undefined, 'kravia:invoice_reference'?: string | undefined, 'kravia:invoice_channel'?: InvoiceChannel | undefined, 'kravia:invoice_url'?: string | undefined, 'two:order_id'?: string | undefined, 'two:payment_url'?: string | undefined, 'two:merchant_id'?: string | undefined}) | undefined, checkboxes?: CheckboxConfiguration | undefined, card?: Card | undefined, verified_identity?: VerifiedIdentity | undefined}; export type CreateApiExamplesSessionUrlCallbackArgs = {method: string, includes: string, body: Transaction}; export type CreateApiExamplesSessionUrlCallbackOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; export const createApiExamplesSessionUrlCallbackResponse = z.object({}); 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 }; /** * example_session_post_callback_url * * POST /examples/session_url_callback */ export const createApiExamplesSessionUrlCallback = async (args: CreateApiExamplesSessionUrlCallbackArgs, options?: CreateApiExamplesSessionUrlCallbackOptions) => { const {baseUrl = "https://api.dintero.com/v1", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "application/json") if (args.method != null) query.append("method", String(args.method)) if (args.includes != null) query.append("includes", String(args.includes)) const url = `${baseUrl.replace(/\/+$/, '')}/examples/session_url_callback${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(createApiExamplesSessionUrlCallbackResponse, await res.json()) };