Give your customers a receipt they truly own — permanent, tamper-proof, and independent of your infrastructure. One API call. Stored forever.
Receipt exists on-chain forever, even if your site shuts down
ci-sha4096 digest + Groth16 ZK proof — cannot be altered
Reed-Solomon erasure coding reconstructs data if nodes fail
Transfer ownership to customer's wallet address
Prerequisites: A HealChain API key from your dashboard. That's it.
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:
{
"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.
/issue-forever-receipt
Auth: Authorization: Bearer YOUR_API_KEY
| Field | Type | Required | Description |
|---|---|---|---|
orderId | string | required | Your order or transaction ID |
vendorName | string | — | Your business name shown on receipt |
customerEmail | string | — | Customer email (omitted from storage if not provided) |
customerWallet | string | — | Ethereum address — transfers on-chain ownership to customer |
items | array | — | Line items: name, quantity, price, sku |
total | number | required | Grand total amount |
currency | string | — | ISO 4217 code, default USD |
paymentMethod | string | — | e.g. Visa •••• 4242 or ETH |
externalTxHash | string | — | Payment processor transaction ID or crypto hash |
metadata | object | — | Any additional key-value data |
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; }
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
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; }
// 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 }}' }) });
// 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']); } }
Issue Forever Receipts automatically on every Stripe payment — no changes to your checkout flow.
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:
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 } });
HealChain signs transactions using oracle keys — you never expose signing credentials
Customer email only stored if you include it in the request
Rotate your API keys anytime from the dashboard — old keys invalidate instantly
Anyone with the Record ID can view. Don't include data beyond a normal paper receipt
| Receipt Type | Storage Path | Cost |
|---|---|---|
| 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.
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.
Store deeds at closing — buyer gets a permanent link that survives any title company shutdown
Cap table documents, SAFE agreements, option grants — permanent and ZK-verifiable
SOX, HIPAA, MiFID II — immutable audit trail with cryptographic proof of integrity
Permanent chain-of-custody records — "organic," "conflict-free," and "sustainably sourced" that are actually verifiable
Permanent invoice issuance — both parties have immutable proof, disputes resolved by math not memory
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.