---
id: I0153
title: "Zendesk ticket transaction lookup"
url: https://carbium.sh/library/integrate/zendesk-ticket-transaction-lookup
collection: Integrations
category: No-code automation
revision: 1
updated: 2026-11-23
author: Carbium
code: MIT (LICENSE in the zip); text: all rights reserved, Carbium Corporation
---

# Zendesk ticket transaction lookup

A small Node script reads the signature a Zendesk ticket carries and prints whether it landed, whether it failed on chain, and the slot and fee, so your automation can write that answer into the ticket.

## What the lookup reads

A signature that reached the chain has two answers to ask for. The first is its status: how far it got in confirmation, and an error field that stays empty when every instruction ran. The second is the full record: the slot it landed in, the block time, the fee, and the same error inside the metadata. The script asks for both, because the status is the short answer and the record adds the detail a support reply needs.

Both calls go to the [RPC endpoint](https://carbium.sh/docs/endpoints) with the key in the [key header](https://carbium.sh/docs/auth). They run together, so a failure in one call does not hide the other.

| Call | What it gives | How the script reads it |
|---|---|---|
| getSignatureStatuses | confirmationStatus, slot, err | err null means the transaction ran without an instruction error |
| getTransaction | slot, blockTime, fee, meta.err | read at confirmed, named in the call, with maxSupportedTransactionVersion set to 1 |

A failed transaction still counts as landed. It takes a slot, pays its fee and carries an error, so the error field decides the answer. Finding the signature settles only that the transaction reached the chain.

## Getting the signature from the ticket

The ticket has to hold the signature as text, copied in full. A standard signature is 87 or 88 characters of base58. A truncated copy will not decode, and the script reports that error instead of guessing at a match.

Most no-code tools can call an HTTPS address but cannot start Node themselves. Host the script behind a small endpoint, or run it from a scheduled job that reads the open tickets. The step that writes the answer back to the ticket then takes the JSON the script prints. Nothing here needs a wallet or a signing key, because the script only reads.

## The lookup script

Run it with a signature as the first argument. Without one, it takes the newest signature for the SPL Token program, so the output can be seen on a live transaction. The script makes two calls for a given signature and three without one, and the newest-signature lookup is charged [50 cells](https://carbium.sh/docs/rpc).

`main.ts` (run: `node main.ts`)

```ts
// I0153 · Zendesk ticket transaction lookup
// https://carbium.sh/library/integrate/zendesk-ticket-transaction-lookup
// Copyright (c) Carbium Corporation. MIT License (LICENSE). Keep this notice.
// SPDX-License-Identifier: MIT

import {
  address,
  createDefaultRpcTransport,
  createSolanaRpcFromTransport,
  signature,
} from "@solana/kit";

const key = process.env.CARBIUM_KEY;
if (!key) {
  console.error("Set CARBIUM_KEY to your Carbium key.");
  process.exit(1);
}

const rpc = createSolanaRpcFromTransport(
  createDefaultRpcTransport({
    url: process.env.CARBIUM_RPC_URL ?? "https://services.carbium.sh",
    headers: { "x-api-key": key },
  }),
);

// With no argument, check the newest signature for the SPL Token program.
const TOKEN_PROGRAM = address("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");
const given = process.argv[2];
const sig = given
  ? signature(given)
  : (await rpc.getSignaturesForAddress(TOKEN_PROGRAM, { limit: 1 }).send())[0]?.signature;
if (!sig) {
  console.error("No signature to check.");
  process.exit(1);
}

const [statusRes, txRes] = await Promise.allSettled([
  rpc.getSignatureStatuses([sig], { searchTransactionHistory: true }).send(),
  rpc.getTransaction(sig, {
    encoding: "jsonParsed",
    maxSupportedTransactionVersion: 1,
    commitment: "confirmed",
  }).send(),
]);

const s = statusRes.status === "fulfilled" ? statusRes.value.value[0] : null;
const report: Record<string, unknown> = {
  signature: sig,
  verdict: !s ? "unknown" : s.err === null ? "ran without error" : "landed and failed on chain",
  status:
    statusRes.status === "rejected"
      ? `error: ${String(statusRes.reason)}`
      : s
        ? { confirmationStatus: s.confirmationStatus ?? null, slot: s.slot.toString(), err: s.err }
        : "not found",
};
if (txRes.status === "fulfilled") {
  const t = txRes.value;
  report.record = t
    ? { slot: t.slot.toString(), blockTime: t.blockTime?.toString() ?? null, fee: t.meta?.fee.toString() ?? null, err: t.meta?.err ?? null }
    : "null: not served for this signature";
} else {
  report.recordError = String(txRes.reason);
}
console.log(JSON.stringify(report, null, 2));
```

Each call is settled on its own, so a failed call appears as an error field and the other answers still print.

## Reading the answer

- err is null: the transaction ran without an instruction error. Check the confirmationStatus too, and have a ticket that must not reopen wait for finalized.
- err is set: the transaction landed and failed on chain. Its fee was paid and its instruction changes were rolled back, so the ticket should carry the error the record names.
- Status null and record null: this node has not seen the signature, or it has aged out. That is not a failure. Ask the customer for a newer signature or check again later.
- Record null while the status has a value: the full record is not served for that signature, most often because it is older than the validator's ledger floor. The status and its error field are the answer then.

> A null answer means the script could not read the transaction. Write 'not found' into the ticket, and reserve 'failed' for an error field that is set.

## Where it ends

- It only reads. It does not write to Zendesk or to any other system; the step that posts the answer is yours to build.
- It checks one signature per run. It does not find which ticket belongs to which payment, or whether the amount was right.
- A signature the validator no longer holds reads as null in both calls, and the script cannot tell that apart from a signature it never saw.
- Status shows what the node has seen. A ticket that must not reopen should wait for finalized before it closes.

## When it goes wrong

| What goes wrong | What to do |
|---|---|
| The script exits at once with 'Set CARBIUM_KEY to your Carbium key.' before any call is made. | Export CARBIUM_KEY, holding the whole key, in the environment of the process your endpoint or job runs. The key goes in the [key header](https://carbium.sh/docs/auth), and the script never prints it. |
| The script stops with an uncaught error that names an invalid signature, and no answer is printed. | Copy the whole signature from the ticket, 87 or 88 base58 characters, and remove any trailing spaces or quotes that a form added. |
| The record reads null while the status shows a result for the same signature. | The record is not served for that signature, usually because it is older than the ledger floor. Use the status and its error field; the full record is not needed to close the ticket. |
| The record call answers error -32015 for a signature that the status call reads fine. | The call must name maxSupportedTransactionVersion as 1, as the script does. Mainnet carries version 1 transactions, and an absent or 0 setting is refused for them. See the [version error -32015](https://carbium.sh/library/howsolana/transaction-version-error-32015) entry. |
| The output shows a 429 on one call while the other answer still prints. | Limits are per account, so app traffic on the same key spends the same budget. Check fewer tickets per run, retry that call after the wait the 429 gives, and compare your plan on the [limits](https://carbium.sh/docs/limits) page. |

## Questions

### Does a transaction with an error count as completed?

It landed, so the network finished processing it. An error means its instructions did not take effect and only the fee moved, so treat it as failed on chain and tell the customer which error the record names.

### Can the script tell me how much a payment moved?

No. It reports the status, the slot, the fee and the error. An amount needs the parsed instructions in the record, which the script does not walk, so read those in your own code if the ticket needs the figure.

### What happens to a signature from months ago?

The address index behind getSignaturesForAddress keeps up to 30 days, and a signature lookup depends on the ledger the validator still keeps. A null answer for an old signature means no answer, so ask the customer for a recent signature when the status comes back empty.

### Why read both calls when the record already has the error?

The two can differ in what they hold, so reading both lets the script report whichever one answered. The status also carries the confirmation level, which the record does not show in the same field.

## Related

- [Transaction status check](https://carbium.sh/library/howsolana/transaction-status-check) (How to use Solana, HS0008)
- [Transaction version error -32015](https://carbium.sh/library/howsolana/transaction-version-error-32015) (How to use Solana, HS0012)
- [carbium.sh/docs/endpoints](https://carbium.sh/docs/endpoints)
- [carbium.sh/docs/auth](https://carbium.sh/docs/auth)
- [carbium.sh/docs/rpc](https://carbium.sh/docs/rpc)
- [carbium.sh/docs/limits](https://carbium.sh/docs/limits)
