Billing & Account
Hooks for retrieving account details, invoices, and billing statements in the Limio SDK.
useUserAccountInformation()
useUserAccountInformation()import { useUserAccountInformation } from "@limio/sdk"
const { accountInformation } = useUserAccountInformation()Field
Type
Description
Section
Fields
Description
import React from "react"
import { useUserAccountInformation, formatCurrency, getCookie } from "@limio/sdk"
const AccountDetails = () => {
const { accountInformation } = useUserAccountInformation()
const locale = getCookie("limio-country")
const {
basicInfo: { name },
billingAndPayment: { autoPay, billCycleDay, paymentTerm },
metrics: { currency, totalInvoiceBalance, unappliedPaymentAmount }
} = accountInformation
return (
<section>
<h2>Account Details</h2>
<table>
<tbody>
<tr>
<td>Account Name</td>
<td>{name}</td>
</tr>
<tr>
<td>Bill Cycle Day</td>
<td>{billCycleDay}</td>
</tr>
<tr>
<td>Payment Term</td>
<td>{paymentTerm}</td>
</tr>
<tr>
<td>Auto Pay</td>
<td>{autoPay ? "Enabled" : "Disabled"}</td>
</tr>
<tr>
<td>Invoice Balance</td>
<td>{formatCurrency(totalInvoiceBalance, currency, locale)}</td>
</tr>
<tr>
<td>Unapplied Payments</td>
<td>{formatCurrency(unappliedPaymentAmount, currency, locale)}</td>
</tr>
</tbody>
</table>
</section>
)
}useUserInvoices()
useUserInvoices()Param
Type
Default
Description
Field
Type
Description
sendSummaryStatementEmail()
sendSummaryStatementEmail()Param
Type
Description
LimioFetchers.invoiceFetch() — Downloading invoice PDFs
LimioFetchers.invoiceFetch() — Downloading invoice PDFsParam
Type
Description
See also
Last updated
Was this helpful?

