absolutepay (Node SDK) - v0.7.1
    Preparing search index...

    Create and manage invoices — the up-front fixed-address flow (scopes: invoices:write to mutate, invoices:read to read). For a payer-picks hosted link, use client.checkouts.

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Create an invoice, minting the deposit address up front (scope: invoices:write).

      Parameters

      Returns Promise<InvoiceCreated>

      The created InvoiceCreated (includes token, address, chain, amount).

      On failure (e.g. 401/403 missing invoices:write, 409 duplicate reference).

      const invoice = await client.invoices.create({
      reference: "inv_2024_0007",
      amount: { amount: "49.00", currency: "USDT" },
      chain: "TRON",
      });
      console.log(invoice.address);
    • Void an invoice so it can no longer be paid (scope: invoices:write).

      Parameters

      • token: string

        The invoice token.

      Returns Promise<{ ok: boolean }>

      { ok: true } on success.

      On failure (e.g. 404 unknown token, 409 already paid).

    • Fetch a single invoice by its token (scope: invoices:read).

      Parameters

      • token: string

        The invoice token.

      Returns Promise<Invoice>

      The Invoice record.

      On failure (e.g. 404 unknown token).

    • Update an invoice (pause/resume, change redirect/expiry/description) (scope: invoices:write).

      Parameters

      • token: string

        The invoice token.

      • patch: InvoiceUpdate

        Partial update; omit a field to leave it, send null to clear it. See InvoiceUpdate.

      Returns Promise<Invoice>

      The updated Invoice.

      On failure (e.g. 404 unknown token, 401/403 auth).