CR
Docs

Introduction

Welcome to the TxProof API developer documentation. Our API allows you to programmatically generate verifiable receipts for on-chain transactions across multiple blockchains.

How it Works

The TxProof API uses an asynchronous soft-queue model to handle receipt generation for high-reliability and performance. Generating a PDF receipt from blockchain data can be resource-intensive, so we process these requests in the background.

The Lifecycle

  1. Request: You request a receipt for a transaction hash.
    POST /api/v1/bills/resolve
  2. Queue: We return a pending job ID immediately.
    { job_id: 'job_123', status: 'pending' }
  3. Process: Our workers fetch chain data, resolve metadata, and generate the PDF. Status becomes processing.
  4. Complete: The job status updates to completed and the PDF URL is available.

Polling & Caching

Since generation is async, you should implement polling to check the job status. We recommend polling every 2-5 seconds via the GET /api/v1/bills/job/:jobId endpoint.

Once generated, receipts are cached permanently (or for a long duration). Subsequent requests for the same transaction hash will return the completed job immediately.