Skip to main content
← Back to Docs

Quickstart Guide

Create your first cryptographic receipt in 5 minutes

Prerequisites

1

Get Your API Key

Log in to your CertNode dashboard and navigate to API Keys. Create a new API key and copy it somewhere safe.

🔐 Security: API keys are sensitive. Never commit them to version control or expose them in client-side code. Use environment variables.

# .env (example)
CERTNODE_API_KEY=cn_live_abc123xyz789...
2

Create Your First Receipt

Send a POST request to /api/v1/receipts with your receipt data:

cURL

curl -X POST https://certnode.io/api/v1/receipts \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "transaction",
    "data": {
      "amount": 299.99,
      "currency": "USD",
      "product": "Annual Subscription",
      "customer_email_hash": "a3f2b1c4d5e6..."
    },
    "metadata": {
      "platform": "stripe",
      "environment": "production"
    }
  }'

Node.js / TypeScript

const response = await fetch('https://certnode.io/api/v1/receipts', {
  method: 'POST',
  headers: {
    'X-API-Key': process.env.CERTNODE_API_KEY,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    type: 'transaction',
    data: {
      amount: 299.99,
      currency: 'USD',
      product: 'Annual Subscription',
      customer_email_hash: 'a3f2b1c4d5e6...'
    },
    metadata: {
      platform: 'stripe',
      environment: 'production'
    }
  })
})

const receipt = await response.json()
console.log('Receipt created:', receipt.id)

Python

import requests
import os

response = requests.post(
    'https://certnode.io/api/v1/receipts',
    headers={
        'X-API-Key': os.getenv('CERTNODE_API_KEY'),
        'Content-Type': 'application/json'
    },
    json={
        'type': 'transaction',
        'data': {
            'amount': 299.99,
            'currency': 'USD',
            'product': 'Annual Subscription',
            'customer_email_hash': 'a3f2b1c4d5e6...'
        },
        'metadata': {
            'platform': 'stripe',
            'environment': 'production'
        }
    }
)

receipt = response.json()
print(f"Receipt created: {receipt['id']}")

Response

{
  "id": "rcpt_abc123xyz789",
  "type": "transaction",
  "created_at": "2025-01-15T10:30:00Z",
  "data": {
    "amount": 299.99,
    "currency": "USD",
    "product": "Annual Subscription",
    "customer_email_hash": "a3f2b1c4d5e6..."
  },
  "metadata": {
    "platform": "stripe",
    "environment": "production"
  },
  "signature": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9...",
  "timestamp_token": "MIIGfQYJKoZIhvcNAQcCoIIGbjCCBmoCAQE...",
  "verified": true,
  "verification_url": "https://certnode.io/verify/rcpt_abc123xyz789"
}

✅ Success! Your receipt is now cryptographically signed with an RFC 3161 timestamp. It cannot be tampered with and is independently verifiable.

3

Verify the Receipt

Anyone can independently verify your receipt using the verification endpoint:

cURL

curl https://certnode.io/api/v1/verify/rcpt_abc123xyz789

Response

{
  "id": "rcpt_abc123xyz789",
  "verified": true,
  "verification_details": {
    "signature_valid": true,
    "timestamp_valid": true,
    "chain_valid": true
  },
  "created_at": "2025-01-15T10:30:00Z"
}

You can also view the receipt in a browser at:

4

Link Receipts Together

Create receipt chains by referencing parent receipts. This is useful for tracking multi-step processes (e.g., order → fulfillment → delivery):

// Create child receipt that references parent
curl -X POST https://certnode.io/api/v1/receipts \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "operations",
    "data": {
      "event": "order_fulfilled",
      "tracking_number": "1Z999AA10123456784",
      "shipped_date": "2025-01-16"
    },
    "parent_id": "rcpt_abc123xyz789",
    "metadata": {
      "platform": "shipstation"
    }
  }'

💡 Tip: Receipt chains create an immutable audit trail. Each child receipt proves the parent existed first (verified via timestamp).

Privacy Best Practices

⚠️ Never Include Raw PII

Don't store raw emails, credit card numbers, or SSNs in receipts. Use hashes instead:

import crypto from 'crypto'

// ❌ DON'T: Raw email
const badReceipt = {
  data: {
    customer_email: "john@example.com"
  }
}

// ✅ DO: Hashed email
const goodReceipt = {
  data: {
    customer_email_hash: crypto
      .createHash('sha256')
      .update("john@example.com")
      .digest('hex')
    // Result: a3f2b1c4d5e6...
  }
}

For more details, see our Privacy Guide.

Receipt Types

💳

Transaction

Payments, refunds, chargebacks

Use for: Stripe, Shopify, PayPal transactions
🎨

Content

Media uploads, downloads, access

Use for: AI-generated content, downloads, streaming access
⚙️

Operations

API calls, system events, compliance logs

Use for: Audit logs, webhook deliveries, system events