Invoice Protocol Documentation

This protocol allows you to push invoice or receipt data (JSON) to our API (secured via OAuth). You will receive:

  • A custom URL you can share or embed
  • A PNG with a QR code you can place on your invoice

When users visit the custom URL (e.g., https://invoiceprotocol.mozek.io?issuer=...&invoice=...), they will see a table of invoice details plus the embedded QR code.

API Endpoint

POST https://invoiceprotocol.mozek.io/api/push_invoice_data.php

Headers
  • Authorization: Bearer YOUR_OAUTH_ACCESS_TOKEN
  • Content-Type: application/json
JSON Body Example
{
  "issuer": "Your Company Name",
  "invoice": "dafa3151afa415", 
  "amount": 100.00,
  "currency": "USD",
  "date": "2025-02-06",
  "notes": "Payment for services rendered"
}
Response Example
{
  "success": true,
  "custom_url": "https://invoiceprotocol.mozek.io?issuer=...",
  "qr_code_png": "https://invoiceprotocol.mozek.io/qr_generator.php?issuer=..."
}

The qr_code_png can be embedded in your PDF invoice or website so that end customers can easily scan to see the invoice details.

Code Samples


import requests

token = "demo-token"
url = "https://invoiceprotocol.mozek.io/api/push_invoice_data.php"

json_data = {
    "issuer": "Your Company Name",
    "invoice": "dafa3151afa415",
    "amount": 100.00,
    "currency": "USD",
    "date": "2025-02-06",
    "notes": "Payment for services rendered"
}

headers = {
    "Authorization": f"Bearer {token}",
    "Content-Type": "application/json"
}

response = requests.post(url, json=json_data, headers=headers)
print(response.json())
          

curl -X POST https://invoiceprotocol.mozek.io/api/push_invoice_data.php \
     -H "Authorization: Bearer demo-token" \
     -H "Content-Type: application/json" \
     -d '{
       "issuer": "Your Company Name",
       "invoice": "dafa3151afa415",
       "amount": 100.00,
       "currency": "USD",
       "date": "2025-02-06",
       "notes": "Payment for services rendered"
     }'
          

const fetch = require('node-fetch');

const token = 'demo-token';
const url = 'https://invoiceprotocol.mozek.io/api/push_invoice_data.php';

const invoiceData = {
  issuer: 'Your Company Name',
  invoice: 'dafa3151afa415',
  amount: 100.00,
  currency: 'USD',
  date: '2025-02-06',
  notes: 'Payment for services rendered'
};

fetch(url, {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(invoiceData)
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));