HealChain
← App Get API Key
Permanent Document Vault

Forever Receipt

Give your customers a receipt they truly own — permanent, tamper-proof, and independent of your infrastructure. One API call. Stored forever.

⚡ Permanent Storage ↻ Self-Healing ✓ ZK-Verifiable
1

How It Works

STEP 1
Customer checks out
STEP 2
You call HealChain API
STEP 3
Receipt stored on-chain
STEP 4
Customer gets permanent link
🏦

Survives Your Business

Receipt exists on-chain forever, even if your site shuts down

🔐

Cryptographically Sealed

ci-sha4096 digest + Groth16 ZK proof — cannot be altered

♻️

Self-Healing

Reed-Solomon erasure coding reconstructs data if nodes fail

👤

Customer-Owned

Transfer ownership to customer's wallet address

2

Quick Start — 5 Minutes

ℹ️

Prerequisites: A HealChain API key from your dashboard. That's it.

CURL
curl -X POST https://api.healchain.org/issue-forever-receipt \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "orderId": "ORDER-12345",
    "vendorName": "Acme Store",
    "customerEmail": "customer@example.com",
    "total": 49.99,
    "currency": "USD",
    "items": [
      { "name": "Widget Pro", "quantity": 2, "price": 19.99 },
      { "name": "Shipping",   "quantity": 1, "price": 10.01 }
    ],
    "paymentMethod": "Visa •••• 4242"
  }'

Response:

JSON
{
  "success":   true,
  "recordId":  "42",
  "viewUrl":   "https://healchain.org/receipt/42",
  "qrCodeUrl": "https://api.qrserver.com/...",
  "txHash":    "0xabc...",
  "message":   "Forever Receipt issued. This receipt will exist permanently."
}

Email viewUrl to your customer. The link works forever — bookmark it, print it, share it.

3

API Reference

POST /issue-forever-receipt

Auth: Authorization: Bearer YOUR_API_KEY

Field Type Required Description
orderIdstringrequiredYour order or transaction ID
vendorNamestringYour business name shown on receipt
customerEmailstringCustomer email (omitted from storage if not provided)
customerWalletstringEthereum address — transfers on-chain ownership to customer
itemsarrayLine items: name, quantity, price, sku
totalnumberrequiredGrand total amount
currencystringISO 4217 code, default USD
paymentMethodstringe.g. Visa •••• 4242 or ETH
externalTxHashstringPayment processor transaction ID or crypto hash
metadataobjectAny additional key-value data
4

Integration Examples

JAVASCRIPT
async function issueForeverReceipt(order) {
  const response = await fetch('https://api.healchain.org/issue-forever-receipt', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.HEALCHAIN_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      orderId:       order.id,
      vendorName:    'Your Store Name',
      customerEmail: order.customerEmail,
      total:         order.total,
      currency:      order.currency || 'USD',
      items: order.lineItems.map(item => ({
        name:     item.title,
        quantity: item.quantity,
        price:    item.price,
        sku:      item.sku
      })),
      paymentMethod:  order.paymentMethod,
      externalTxHash: order.paymentIntentId
    })
  });

  const result = await response.json();
  if (!result.success) throw new Error(result.error);

  // Email the permanent link to your customer
  await sendEmail({
    to:      order.customerEmail,
    subject: `Your Forever Receipt — Order ${order.id}`,
    body:    `View your permanent receipt: ${result.viewUrl}`
  });

  return result;
}
PYTHON
import requests, os

def issue_forever_receipt(order):
    response = requests.post(
        'https://api.healchain.org/issue-forever-receipt',
        headers={
            'Authorization': f'Bearer {os.environ["HEALCHAIN_API_KEY"]}',
            'Content-Type': 'application/json'
        },
        json={
            'orderId':       order['id'],
            'vendorName':    'Your Store Name',
            'customerEmail': order['customer_email'],
            'total':         order['total'],
            'currency':      order.get('currency', 'USD'),
            'items': [{
                'name':     i['name'],
                'quantity': i['quantity'],
                'price':    i['price']
            } for i in order['items']],
            'paymentMethod': order.get('payment_method')
        }
    )
    result = response.json()
    if not result['success']:
        raise Exception(result['error'])
    return result
PHP
function issueForeverReceipt($order) {
    $ch = curl_init('https://api.healchain.org/issue-forever-receipt');
    curl_setopt_array($ch, [
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POST           => true,
        CURLOPT_HTTPHEADER     => [
            'Authorization: Bearer ' . getenv('HEALCHAIN_API_KEY'),
            'Content-Type: application/json'
        ],
        CURLOPT_POSTFIELDS => json_encode([
            'orderId'       => $order['id'],
            'vendorName'    => 'Your Store Name',
            'customerEmail' => $order['customer_email'],
            'total'         => $order['total'],
            'currency'      => $order['currency'] ?? 'USD',
            'items'         => array_map(fn($i) => [
                'name'     => $i['name'],
                'quantity' => $i['quantity'],
                'price'    => $i['price']
            ], $order['items'])
        ])
    ]);
    $result = json_decode(curl_exec($ch), true);
    curl_close($ch);
    return $result;
}
SHOPIFY LIQUID
// Add to Shopify → Settings → Checkout → Additional scripts
fetch('https://api.healchain.org/issue-forever-receipt', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    orderId:       '{{ order.order_number }}',
    vendorName:    '{{ shop.name }}',
    customerEmail: '{{ customer.email }}',
    total:         {{ order.total_price | divided_by: 100.0 }},
    currency:      '{{ order.currency }}',
    items: [
      {% for line_item in order.line_items %}
      {
        name:     '{{ line_item.title }}',
        quantity: {{ line_item.quantity }},
        price:    {{ line_item.price | divided_by: 100.0 }},
        sku:      '{{ line_item.sku }}'
      }{% unless forloop.last %},{% endunless %}
      {% endfor %}
    ],
    paymentMethod: '{{ order.gateway }}'
  })
});
WOOCOMMERCE PHP
// Add to functions.php or a custom plugin
add_action('woocommerce_payment_complete', 'issue_healchain_receipt');

function issue_healchain_receipt($order_id) {
    $order = wc_get_order($order_id);
    $items = [];
    foreach ($order->get_items() as $item) {
        $items[] = [
            'name'     => $item->get_name(),
            'quantity' => $item->get_quantity(),
            'price'    => $item->get_total() / $item->get_quantity()
        ];
    }
    $result = wp_remote_post('https://api.healchain.org/issue-forever-receipt', [
        'headers' => [
            'Authorization' => 'Bearer ' . get_option('healchain_api_key'),
            'Content-Type'  => 'application/json'
        ],
        'body' => json_encode([
            'orderId'       => (string) $order_id,
            'vendorName'    => get_bloginfo('name'),
            'customerEmail' => $order->get_billing_email(),
            'total'         => (float) $order->get_total(),
            'currency'      => get_woocommerce_currency(),
            'items'         => $items
        ])
    ]);
    $data = json_decode(wp_remote_retrieve_body($result), true);
    if ($data['success']) {
        $order->add_order_note('HealChain Forever Receipt: ' . $data['viewUrl']);
    }
}
5

Stripe Auto-Integration

Issue Forever Receipts automatically on every Stripe payment — no changes to your checkout flow.

Setup (3 steps)

1. In Stripe Dashboard → Developers → Webhooks → Add endpoint

URL:    https://api.healchain.org/webhook/stripe/receipt
Events: checkout.session.completed
        payment_intent.succeeded

2. Copy the signing secret (whsec_...) → add to your oracle secrets as STRIPE_RECEIPT_WEBHOOK_SECRET

3. Pass metadata in your Stripe checkout so HealChain knows what to put on the receipt:

JAVASCRIPT — STRIPE CHECKOUT
const session = await stripe.checkout.sessions.create({
  // ... your normal checkout config ...
  metadata: {
    vendor_name:     'Acme Store',
    product_name:    'Widget Pro',
    customer_wallet: '0x...',  // optional
    order_id:        'ORDER-12345'  // optional override
  }
});
6

Security & Privacy

🔑

No Private Keys

HealChain signs transactions using oracle keys — you never expose signing credentials

📧

Email is Optional

Customer email only stored if you include it in the request

🔄

Key Rotation

Rotate your API keys anytime from the dashboard — old keys invalidate instantly

👁

Receipts Are Public

Anyone with the Record ID can view. Don't include data beyond a normal paper receipt

7

Pricing

Receipt TypeStorage PathCost
JSON only (under 1MB) Fully on-chain Standard store credit
With PDF attachment (over 1MB) Hybrid IPFS shards Hybrid store credit
💡

A typical JSON receipt costs a fraction of a cent. High-volume vendors — contact us for bulk pricing.

8

Forever Documents — Beyond Receipts

Forever Receipt is the consumer entry point. The underlying primitive is a Permanent Document Vault — any document your business issues can be stored permanently, verified cryptographically, and retrieved forever without trusting HealChain or any other vendor.

🏠

Property Deeds & Title

Store deeds at closing — buyer gets a permanent link that survives any title company shutdown

📜

Stock Certificates

Cap table documents, SAFE agreements, option grants — permanent and ZK-verifiable

🗂️

Compliance Records

SOX, HIPAA, MiFID II — immutable audit trail with cryptographic proof of integrity

📦

Supply Chain Provenance

Permanent chain-of-custody records — "organic," "conflict-free," and "sustainably sourced" that are actually verifiable

🧾

Invoices & B2B Records

Permanent invoice issuance — both parties have immutable proof, disputes resolved by math not memory

🎨

IP & Copyright

Instant timestamped permanent record with ZK proof of existence — strong evidentiary supplement to formal registration

💡

The same API, the same endpoint. Pass any JSON payload to /issue-forever-receipt and use the metadata field for document-specific data. A dedicated /vault/store endpoint with richer document schemas is on the roadmap. Contact us if you have an RWA use case to discuss.

🌐 Translate
English
Afrikaans
Albanian
Amharic
Arabic
Armenian
Assamese
Azerbaijani
Bambara
Basque
Belarusian
Bengali
Bosnian
Bulgarian
Catalan
Cebuano
Chinese (Simplified)
Chinese (Traditional)
Croatian
Czech
Danish
Dutch
Esperanto
Estonian
Filipino
Finnish
French
Frisian
Galician
Georgian
German
Greek
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Khmer
Kinyarwanda
Korean
Kurdish (Kurmanji)
Kurdish (Sorani)
Kyrgyz
Lao
Latin
Latvian
Lithuanian
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mongolian
Myanmar (Burmese)
Nepali
Norwegian
Pashto
Persian
Polish
Portuguese
Punjabi
Romanian
Russian
Samoan
Scots Gaelic
Serbian
Sesotho
Shona
Sindhi
Sinhala
Slovak
Slovenian
Somali
Spanish
Sundanese
Swahili
Swedish
Tajik
Tamil
Telugu
Thai
Turkish
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Xhosa
Yiddish
Yoruba
Zulu
Abkhaz
Acehnese
Acholi
Afar
Alur
Awadhi
Aymara
Balinese
Bashkir
Bhojpuri
Batak Karo
Batak Toba
Bemba
Betawi
Breton
Buryat
Cantonese
Corsican
Crimean Tatar
Dinka
Divehi
Dogri
Dzongkha
Ewe
Faroese
Fijian
Guarani
Ilocano
Konkani
Krio
Lingala
Luganda
Maithili
Meiteilon (Manipuri)
Mizo
Northern Sotho
Oromo
Papiamento
Quechua
Sanskrit
Shan
Swati
Tetum
Tigrinya
Tsonga
Tswana
Tatar
Uyghur