Pular para o conteúdo

Payments view

Paginated, filterable listing of payment legs (settlements) across a tenant or a single sub-tenant. Both functions share the same query shape and response — only the URL segment (and therefore the scope) differs — and both only exist on the paymentsView namespace.

import { paymentsView } from '@lina-openx/web-lina-pay-sdk'

// Across every sub-tenant of a tenant
const byTenant = await paymentsView.getAllPaymentsByTenants(credentials, {
status: ['PAGO', 'PENDENTE'],
paymentType: ['NOW', 'SINGLE'],
startDate: '2026-07-01T00:00:00.000Z',
endDate: '2026-07-20T00:00:00.000Z',
page: 1,
})

// Scoped to one sub-tenant
const bySubtenant = await paymentsView.getAllPaymentsBySubtenant(credentials, {
subTenantId: 'lina',
status: ['PAGO'],
})

console.log(byTenant.data.length, byTenant.meta.totalRecords, byTenant.meta.totalPages)

Array filters (status, requestStatus, paymentType) are sent as repeated query parameters with the same key — pass a plain array and the SDK handles the encoding.

Both accept LinaPayCredentials | TokenCredentials, and every field in queryParams is optional.

Next steps