X Enterprises
fastify-xplaid

xplaid.items.get

Get the current status and configuration of a Plaid Item, including webhook URL, available products, and consent expiration.

xplaid.items.get

Returns the current status and configuration of a Plaid Item — webhook URL, available products, consent expiration, and update type.

Signature

fastify.xplaid.items.get(
  accessToken: string
): Promise<{ item: PlaidItem; status: object | null; requestId: string }>

Params

NameTypeRequiredDescription
accessTokenstringYesThe Item's permanent access token.

Returns

{ item: PlaidItem; status: object | null; requestId: string }
FieldTypeDescription
item.item_idstringStable Plaid Item identifier.
item.institution_idstring | nullPlaid institution ID for the connected bank.
item.webhookstring | nullCurrent webhook URL configured for this Item.
item.available_productsstring[]Products available but not yet billed.
item.billed_productsstring[]Products already billed/in use for this Item.
item.consent_expiration_timestring | nullISO 8601 timestamp when user consent expires.
item.update_typestringIndicates if the item requires background or user-initiated updates.
statusobject | nullProduct-level sync status details.

Throws

  • [xPlaid] accessToken is required and must be a non-empty string
  • Plaid API errors — shape: { message, statusCode, plaidError }.

Examples

Basic

const { item } = await fastify.xplaid.items.get(accessToken);
console.log(item.webhook);             // "https://api.example.com/webhooks/plaid"
console.log(item.available_products);  // ["identity", "investments"]
console.log(item.billed_products);     // ["transactions", "auth"]

Realistic

fastify.get("/plaid/item-status", async (request, reply) => {
  const record = await db.plaidItems.findFirst({ where: { userId: request.user.id } });
  if (!record) return reply.status(404).send({ error: "No linked account" });

  try {
    const { item, status } = await fastify.xplaid.items.get(decrypt(record.accessToken));
    return {
      itemId: item.item_id,
      institutionId: item.institution_id,
      webhook: item.webhook,
      consentExpires: item.consent_expiration_time,
      availableProducts: item.available_products,
      status,
    };
  } catch (error) {
    if (error.plaidError) {
      return reply.status(error.statusCode ?? 500).send({ error: error.message });
    }
    throw error;
  }
});

See also


AI Context

package: "@xenterprises/fastify-xplaid"
method: fastify.xplaid.items.get(accessToken)
use-when: Inspect the status, webhook, products, and consent expiration of a Plaid Item
returns: { item: { item_id, institution_id, webhook, available_products, billed_products, consent_expiration_time, update_type }, status, requestId }
Copyright © 2026