CR
Docs

API Reference

Complete reference for the TxProof API endpoints.
Base URL: https://api.txproof.xyz

POST/api/v1/bills/resolve

Starts a background job to generate a receipt for a specific transaction. This is an idempotent operation; requesting the same txHash multiple times returns the same job/receipt.

Request Body

txHash *
string
The transaction hash to resolve.
chainId *
number
The chain ID (e.g. 1 for Ethereum, 137 for Polygon).

Example Request

{
"txHash": "0x5d962...",
"chainId": 1
}

Response Scenarios

{
"jobId": "job_987654",
"status": "pending",
"createdAt": "2024-03-20T10:00:00Z"
}
GET/api/v1/bills/job/:jobId

Checks the status of a specific job. Use this endpoint for polling until the status is completed or failed.

Path Parameters

jobId *
string
The ID of the job returned by the resolve endpoint.

Response Scenarios

Job finished successfully.

{
"jobId": "job_987654",
"status": "completed",
"data": {
"pdfUrl": "https://cdn.txproof.xyz/receipts/r_123.pdf",
"bill": {
"amount": "100.00",
"currency": "USDC",
"sender": "0x...",
"receiver": "0x..."
}
}
}
GET/api/v1/bills/:billId/data

Retrieves the raw JSON data for a generated receipt (bill) using the Bill ID. This is useful if you want to store just the ID and fetch details dynamically.

Path Parameters

billId *
string
The unique identifier of the generated bill/receipt.

Example Response

{
"id": "bill_123456",
"chainId": 1,
"txHash": "0x5d962...",
"timestamp": 1234567890,
"metadata": {
"items": [...],
"total": "100.00"
}
}