Tutorial

Quickstart

Mint your first 100% forgery-proof Digital Product Passport in under 5 minutes.

Prerequisites

  • Physical NXP NTAG 424 DNA tags or V-Ledger Secure Element chips
  • Android Smartphone (Android 11+, NFC active) or ACR122U Desktop Reader
  • Account in the V-Ledger Brand Dashboard

1. Get your API Key

Log into the V-Ledger Brand Dashboard and navigate to Settings > Developers. Generate a Sandbox API Key. It will start with vk_test_....

2. Provision an Asset Twin

Before we can attach a physical NFC chip, we need to provision a digital placeholder on the platform.

cURL - Provision Asset
curl -X POST https://api.v-ledger.com/v1/erp/provision \
  -H "Authorization: Bearer vk_test_YOUR_API_KEY" \
  -H "x-vledger-env: test" \
  -H "Content-Type: application/json" \
  -d '{
    "gtin": "01234567890123",
    "metadata": { "name": "Hello World Jacket" }
  }'

Save the Internal ID

The API will respond with a vledger_internal_id. Save this ID for the next step.

3. Bind the Hardware Anchor

Take your NTAG 424 DNA tag, and flash it using the V-Ledger Toolbox client. Send the cryptographic signature payload to the binding endpoint to link the hardware.

Get the Toolbox App

Important Android Note: Ensure your device has NFC background scanning enabled. Certain low-budget Android OEMs throttle raw APDU commands, which may interrupt the mutual authentication routine. Use a certified device if encountering timeouts.

Node.js - Bind AnchorREADY TO EXECUTE
const response = await fetch('https://api.v-ledger.com/v1/factory/bind', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer vk_test_YOUR_API_KEY',
    'x-vledger-env': 'test',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    internalId: "vledger_prov_7b8c1a", 
    chipUid: "04:12:34:56:78:90",
    signature: "3045022100A1B2C3..."
  })
});

const data = await response.json();
console.log("Success:", data.tokenId);
v-ledger · Sandbox Shell
Click "Execute Script" to see it live on the blockchain...