import { Client } from '../client'; import type { Models } from '../models'; import { PaymentFeeType } from '../enums/payment-fee-type'; import { PaymentMethodKind } from '../enums/payment-method-kind'; export declare class Payments { client: Client; constructor(client: Client); /** * * @param {number} params.limit - Page size (default 50, max 200). * @param {number} params.offset - Row offset for pagination (default 0). * @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'. * @throws {RevenexxException} * @returns {Promise<{}>} */ paymentsList(params?: { limit?: number; offset?: number; order?: string; }): Promise<{}>; /** * * @param {number} limit - Page size (default 50, max 200). * @param {number} offset - Row offset for pagination (default 0). * @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'. * @throws {RevenexxException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ paymentsList(limit?: number, offset?: number, order?: string): Promise<{}>; /** * * @param {number} params.amount - Order amount — 0 is legal (free orders), negative is not. * @param {string} params.methodCode - Code of a configured payment method. * @param {string} params.cartId - The cart this payment pays for. * @param {string} params.contactId - Paying customer contact. * @param {string} params.country - Buyer ISO country code for the eligibility check. * @param {string} params.currency - ISO 4217 code (default EUR). * @param {string} params.idempotencyKey - Same key answers the same payment instead of a duplicate. * @param {object} params.metadata - Free-form metadata. * @param {string} params.orderRef - External order reference — also the webhook fallback key. * @param {string} params.returnUrl - Where the PSP redirect flow returns the buyer to. * @throws {RevenexxException} * @returns {Promise} */ paymentsCreate(params: { amount: number; methodCode: string; cartId?: string; contactId?: string; country?: string; currency?: string; idempotencyKey?: string; metadata?: object; orderRef?: string; returnUrl?: string; }): Promise; /** * * @param {number} amount - Order amount — 0 is legal (free orders), negative is not. * @param {string} methodCode - Code of a configured payment method. * @param {string} cartId - The cart this payment pays for. * @param {string} contactId - Paying customer contact. * @param {string} country - Buyer ISO country code for the eligibility check. * @param {string} currency - ISO 4217 code (default EUR). * @param {string} idempotencyKey - Same key answers the same payment instead of a duplicate. * @param {object} metadata - Free-form metadata. * @param {string} orderRef - External order reference — also the webhook fallback key. * @param {string} returnUrl - Where the PSP redirect flow returns the buyer to. * @throws {RevenexxException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ paymentsCreate(amount: number, methodCode: string, cartId?: string, contactId?: string, country?: string, currency?: string, idempotencyKey?: string, metadata?: object, orderRef?: string, returnUrl?: string): Promise; /** * * @param {number} params.limit - Page size (default 50, max 200). * @param {number} params.offset - Row offset for pagination (default 0). * @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'. * @throws {RevenexxException} * @returns {Promise<{}>} */ paymentsMethodsList(params?: { limit?: number; offset?: number; order?: string; }): Promise<{}>; /** * * @param {number} limit - Page size (default 50, max 200). * @param {number} offset - Row offset for pagination (default 0). * @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'. * @throws {RevenexxException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ paymentsMethodsList(limit?: number, offset?: number, order?: string): Promise<{}>; /** * * @param {string} params.code - Stable method code (unique per tenant, e.g. 'invoice', 'card'). * @param {string} params.name - Display name. * @param {string[]} params.countries - Allowed ISO country codes — empty/omitted = unrestricted. * @param {string} params.description - * @param {boolean} params.enabled - Disabled methods are never eligible (default false). * @param {number} params.feeAmount - Fixed amount or percent value, per fee_type (default 0). * @param {string} params.feeCurrency - ISO 4217 code (default EUR). * @param {PaymentFeeType} params.feeType - How 'fee_amount' applies (default 'none'). * @param {PaymentMethodKind} params.kind - Self-managed (merchant fulfils, default) or PSP-backed ('provider' required to transact). * @param {object} params.labels - Localized display names ({ de, en, … }). * @param {number} params.maxOrderValue - Maximum order amount — omitted = no upper bound. * @param {object} params.metadata - Free-form metadata. * @param {number} params.minOrderValue - Minimum order amount — omitted = no lower bound. * @param {number} params.position - Sort position in the checkout (default 0). * @param {string} params.provider - PSP code from the catalog — only for kind 'psp'. * @param {string} params.providerMethod - The provider's payment method id (e.g. 'card', 'paypal'). * @throws {RevenexxException} * @returns {Promise} */ paymentsMethodsCreate(params: { code: string; name: string; countries?: string[]; description?: string; enabled?: boolean; feeAmount?: number; feeCurrency?: string; feeType?: PaymentFeeType; kind?: PaymentMethodKind; labels?: object; maxOrderValue?: number; metadata?: object; minOrderValue?: number; position?: number; provider?: string; providerMethod?: string; }): Promise; /** * * @param {string} code - Stable method code (unique per tenant, e.g. 'invoice', 'card'). * @param {string} name - Display name. * @param {string[]} countries - Allowed ISO country codes — empty/omitted = unrestricted. * @param {string} description - * @param {boolean} enabled - Disabled methods are never eligible (default false). * @param {number} feeAmount - Fixed amount or percent value, per fee_type (default 0). * @param {string} feeCurrency - ISO 4217 code (default EUR). * @param {PaymentFeeType} feeType - How 'fee_amount' applies (default 'none'). * @param {PaymentMethodKind} kind - Self-managed (merchant fulfils, default) or PSP-backed ('provider' required to transact). * @param {object} labels - Localized display names ({ de, en, … }). * @param {number} maxOrderValue - Maximum order amount — omitted = no upper bound. * @param {object} metadata - Free-form metadata. * @param {number} minOrderValue - Minimum order amount — omitted = no lower bound. * @param {number} position - Sort position in the checkout (default 0). * @param {string} provider - PSP code from the catalog — only for kind 'psp'. * @param {string} providerMethod - The provider's payment method id (e.g. 'card', 'paypal'). * @throws {RevenexxException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ paymentsMethodsCreate(code: string, name: string, countries?: string[], description?: string, enabled?: boolean, feeAmount?: number, feeCurrency?: string, feeType?: PaymentFeeType, kind?: PaymentMethodKind, labels?: object, maxOrderValue?: number, metadata?: object, minOrderValue?: number, position?: number, provider?: string, providerMethod?: string): Promise; /** * * @throws {RevenexxException} * @returns {Promise<{}>} */ paymentsMethodsDefaults(): Promise<{}>; /** * * @param {number} params.amount - Order amount the fees are computed against (default 0). * @param {string} params.country - Buyer ISO country code — methods with country restrictions need it. * @param {string} params.currency - ISO 4217 code (default EUR). * @throws {RevenexxException} * @returns {Promise<{}>} */ paymentsMethodsEligible(params?: { amount?: number; country?: string; currency?: string; }): Promise<{}>; /** * * @param {number} amount - Order amount the fees are computed against (default 0). * @param {string} country - Buyer ISO country code — methods with country restrictions need it. * @param {string} currency - ISO 4217 code (default EUR). * @throws {RevenexxException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ paymentsMethodsEligible(amount?: number, country?: string, currency?: string): Promise<{}>; /** * * @param {string} params.id - * @throws {RevenexxException} * @returns {Promise<{}>} */ paymentsMethodsDelete(params: { id: string; }): Promise<{}>; /** * * @param {string} id - * @throws {RevenexxException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ paymentsMethodsDelete(id: string): Promise<{}>; /** * * @param {string} params.id - * @throws {RevenexxException} * @returns {Promise} */ paymentsMethodsGet(params: { id: string; }): Promise; /** * * @param {string} id - * @throws {RevenexxException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ paymentsMethodsGet(id: string): Promise; /** * * @param {string} params.id - * @param {string} params.code - Stable method code (unique per tenant, e.g. 'invoice', 'card'). * @param {string[]} params.countries - Allowed ISO country codes — empty/omitted = unrestricted. * @param {string} params.description - * @param {boolean} params.enabled - Disabled methods are never eligible (default false). * @param {number} params.feeAmount - Fixed amount or percent value, per fee_type (default 0). * @param {string} params.feeCurrency - ISO 4217 code (default EUR). * @param {PaymentFeeType} params.feeType - How 'fee_amount' applies (default 'none'). * @param {PaymentMethodKind} params.kind - Self-managed (merchant fulfils, default) or PSP-backed ('provider' required to transact). * @param {object} params.labels - Localized display names ({ de, en, … }). * @param {number} params.maxOrderValue - Maximum order amount — omitted = no upper bound. * @param {object} params.metadata - Free-form metadata. * @param {number} params.minOrderValue - Minimum order amount — omitted = no lower bound. * @param {string} params.name - Display name. * @param {number} params.position - Sort position in the checkout (default 0). * @param {string} params.provider - PSP code from the catalog — only for kind 'psp'. * @param {string} params.providerMethod - The provider's payment method id (e.g. 'card', 'paypal'). * @throws {RevenexxException} * @returns {Promise} */ paymentsMethodsUpdate(params: { id: string; code?: string; countries?: string[]; description?: string; enabled?: boolean; feeAmount?: number; feeCurrency?: string; feeType?: PaymentFeeType; kind?: PaymentMethodKind; labels?: object; maxOrderValue?: number; metadata?: object; minOrderValue?: number; name?: string; position?: number; provider?: string; providerMethod?: string; }): Promise; /** * * @param {string} id - * @param {string} code - Stable method code (unique per tenant, e.g. 'invoice', 'card'). * @param {string[]} countries - Allowed ISO country codes — empty/omitted = unrestricted. * @param {string} description - * @param {boolean} enabled - Disabled methods are never eligible (default false). * @param {number} feeAmount - Fixed amount or percent value, per fee_type (default 0). * @param {string} feeCurrency - ISO 4217 code (default EUR). * @param {PaymentFeeType} feeType - How 'fee_amount' applies (default 'none'). * @param {PaymentMethodKind} kind - Self-managed (merchant fulfils, default) or PSP-backed ('provider' required to transact). * @param {object} labels - Localized display names ({ de, en, … }). * @param {number} maxOrderValue - Maximum order amount — omitted = no upper bound. * @param {object} metadata - Free-form metadata. * @param {number} minOrderValue - Minimum order amount — omitted = no lower bound. * @param {string} name - Display name. * @param {number} position - Sort position in the checkout (default 0). * @param {string} provider - PSP code from the catalog — only for kind 'psp'. * @param {string} providerMethod - The provider's payment method id (e.g. 'card', 'paypal'). * @throws {RevenexxException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ paymentsMethodsUpdate(id: string, code?: string, countries?: string[], description?: string, enabled?: boolean, feeAmount?: number, feeCurrency?: string, feeType?: PaymentFeeType, kind?: PaymentMethodKind, labels?: object, maxOrderValue?: number, metadata?: object, minOrderValue?: number, name?: string, position?: number, provider?: string, providerMethod?: string): Promise; /** * * @param {number} params.limit - Page size (default 50, max 200). * @param {number} params.offset - Row offset for pagination (default 0). * @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'. * @throws {RevenexxException} * @returns {Promise<{}>} */ paymentsProvidersList(params?: { limit?: number; offset?: number; order?: string; }): Promise<{}>; /** * * @param {number} limit - Page size (default 50, max 200). * @param {number} offset - Row offset for pagination (default 0). * @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'. * @throws {RevenexxException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ paymentsProvidersList(limit?: number, offset?: number, order?: string): Promise<{}>; /** * * @param {string} params.provider - Provider code — must exist in the catalog (GET /payments/providers/catalog). * @param {object} params.credentials - PSP credentials — the catalog's credential_fields say which keys the auth scheme expects. * @param {boolean} params.enabled - Only enabled providers transact (default false). * @param {string} params.name - Display name — defaults to the catalog label. * @param {object} params.options - Free-form provider options. * @param {boolean} params.testMode - Sandbox/test credentials (default true). * @param {string} params.webhookSecret - Shared secret for PSP callback verification. * @throws {RevenexxException} * @returns {Promise} */ paymentsProvidersCreate(params: { provider: string; credentials?: object; enabled?: boolean; name?: string; options?: object; testMode?: boolean; webhookSecret?: string; }): Promise; /** * * @param {string} provider - Provider code — must exist in the catalog (GET /payments/providers/catalog). * @param {object} credentials - PSP credentials — the catalog's credential_fields say which keys the auth scheme expects. * @param {boolean} enabled - Only enabled providers transact (default false). * @param {string} name - Display name — defaults to the catalog label. * @param {object} options - Free-form provider options. * @param {boolean} testMode - Sandbox/test credentials (default true). * @param {string} webhookSecret - Shared secret for PSP callback verification. * @throws {RevenexxException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ paymentsProvidersCreate(provider: string, credentials?: object, enabled?: boolean, name?: string, options?: object, testMode?: boolean, webhookSecret?: string): Promise; /** * * @throws {RevenexxException} * @returns {Promise<{}>} */ paymentsProvidersCatalog(): Promise<{}>; /** * * @param {string} params.id - * @throws {RevenexxException} * @returns {Promise<{}>} */ paymentsProvidersDelete(params: { id: string; }): Promise<{}>; /** * * @param {string} id - * @throws {RevenexxException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ paymentsProvidersDelete(id: string): Promise<{}>; /** * * @param {string} params.id - * @throws {RevenexxException} * @returns {Promise} */ paymentsProvidersGet(params: { id: string; }): Promise; /** * * @param {string} id - * @throws {RevenexxException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ paymentsProvidersGet(id: string): Promise; /** * * @param {string} params.id - * @param {object} params.credentials - PSP credentials — the catalog's credential_fields say which keys the auth scheme expects. * @param {boolean} params.enabled - Only enabled providers transact (default false). * @param {string} params.name - Display name — defaults to the catalog label. * @param {object} params.options - Free-form provider options. * @param {string} params.provider - Provider code — must exist in the catalog (GET /payments/providers/catalog). * @param {boolean} params.testMode - Sandbox/test credentials (default true). * @param {string} params.webhookSecret - Shared secret for PSP callback verification. * @throws {RevenexxException} * @returns {Promise} */ paymentsProvidersUpdate(params: { id: string; credentials?: object; enabled?: boolean; name?: string; options?: object; provider?: string; testMode?: boolean; webhookSecret?: string; }): Promise; /** * * @param {string} id - * @param {object} credentials - PSP credentials — the catalog's credential_fields say which keys the auth scheme expects. * @param {boolean} enabled - Only enabled providers transact (default false). * @param {string} name - Display name — defaults to the catalog label. * @param {object} options - Free-form provider options. * @param {string} provider - Provider code — must exist in the catalog (GET /payments/providers/catalog). * @param {boolean} testMode - Sandbox/test credentials (default true). * @param {string} webhookSecret - Shared secret for PSP callback verification. * @throws {RevenexxException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ paymentsProvidersUpdate(id: string, credentials?: object, enabled?: boolean, name?: string, options?: object, provider?: string, testMode?: boolean, webhookSecret?: string): Promise; /** * Consumes the dispatch envelope from webhooks.revenexx.com: normalizes the provider callback (stripe payment intents + a generic shape), resolves the payment by psp_payment_id or order_ref and moves the ledger. Facts only move forward — provider retries and redeliveries are idempotent no-ops; unverified envelopes are refused. * * @param {string} params.provider - * @param {object} params.data - Request body * @throws {RevenexxException} * @returns {Promise<{}>} */ paymentsWebhooksIngest(params: { provider: string; data: object; }): Promise<{}>; /** * Consumes the dispatch envelope from webhooks.revenexx.com: normalizes the provider callback (stripe payment intents + a generic shape), resolves the payment by psp_payment_id or order_ref and moves the ledger. Facts only move forward — provider retries and redeliveries are idempotent no-ops; unverified envelopes are refused. * * @param {string} provider - * @param {object} data - Request body * @throws {RevenexxException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ paymentsWebhooksIngest(provider: string, data: object): Promise<{}>; /** * * @param {string} params.id - * @throws {RevenexxException} * @returns {Promise} */ paymentsGet(params: { id: string; }): Promise; /** * * @param {string} id - * @throws {RevenexxException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ paymentsGet(id: string): Promise; /** * * @param {string} params.id - * @throws {RevenexxException} * @returns {Promise} */ paymentsCancel(params: { id: string; }): Promise; /** * * @param {string} id - * @throws {RevenexxException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ paymentsCancel(id: string): Promise; /** * * @param {string} params.id - * @throws {RevenexxException} * @returns {Promise} */ paymentsCapture(params: { id: string; }): Promise; /** * * @param {string} id - * @throws {RevenexxException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ paymentsCapture(id: string): Promise; /** * * @param {string} params.id - * @throws {RevenexxException} * @returns {Promise} */ paymentsConfirm(params: { id: string; }): Promise; /** * * @param {string} id - * @throws {RevenexxException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ paymentsConfirm(id: string): Promise; /** * * @param {string} params.id - * @throws {RevenexxException} * @returns {Promise} */ paymentsRefund(params: { id: string; }): Promise; /** * * @param {string} id - * @throws {RevenexxException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ paymentsRefund(id: string): Promise; }