Generate PDF invoices, pro‑formas, debit/credit notes and receipts with i18n labels, flexible dates and strict validation.
A4 output via DomPDF with multiple design themes.
Two‑letter lang + dictionary (e.g., en, bg).
Add shipping as net + VAT rate; totals adjust automatically.
Accepts Y-m-d, d/m/Y, d-m-Y, m/d/Y, etc.; normalized to Y-m-d.
POST https://api.yeb.to/v1/invoicing/proforma
Parameter | Type | Required | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
api_key |
string | yes | Your API key | ||||||||||||||||||||||||||||
lang |
string(2) | opt | Language code (default: en ) |
||||||||||||||||||||||||||||
design |
enum | opt | classic|modern|elegant|minimal |
||||||||||||||||||||||||||||
currency |
string | opt | Currency sign (default: € ) |
||||||||||||||||||||||||||||
currency_side |
enum | opt | before or after (default: after) |
||||||||||||||||||||||||||||
seller
|
object | yes | Seller block | ||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||
buyer
|
object | yes | Buyer block | ||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||
items
|
array<object> | opt | Line items (required fields when present) | ||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||
shipping
|
object | opt | Shipping as net + VAT rate | ||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||
issue_date |
date | yes | Accepted formats; normalized to Y-m-d |
||||||||||||||||||||||||||||
valid_due_date |
date | yes | Offer valid until (accepted formats; normalized to Y-m-d ) |
||||||||||||||||||||||||||||
extras
|
array<object> | opt | Extra rows printed at bottom | ||||||||||||||||||||||||||||
|
curl -X POST https://api.yeb.to/v1/invoicing/proforma \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_KEY",
"lang": "en",
"design": "elegant",
"currency": "€",
"currency_side": "after",
"seller": {"name":"My Company Ltd.","address":"1 Seller St, City, Country","email":"[email protected]","vat_number":"BG123456789"},
"buyer": {"name":"Client Inc.","address":"2 Buyer Rd, City, Country","email":"[email protected]","vat_number":"DE987654321"},
"issue_date": "2025-07-23",
"valid_due_date": "2025-08-06",
"items": [
{"name":"Consulting Session","description":"Remote IT consulting (2h)","quantity":2,"unit_price":100,"vat_rate":20,"total_price":240},
{"name":"Software License","description":"1-year subscription","quantity":1,"unit_price":200,"vat_rate":20,"total_price":240}
],
"shipping": {"price":25,"vat_rate":20},
"extras":[{"label":"Notes","value":"Pro‑forma valid for 14 days"}]
}'
curl -X POST https://api.yeb.to/v1/invoicing/proforma -H "Content-Type: application/json" -d '{"api_key":"YOUR_KEY","seller":{"name":"My Company Ltd.","address":"1 Seller St","email":"[email protected]"},"buyer":{"name":"Client Inc.","address":"2 Buyer Rd","email":"[email protected]"},"issue_date":"2025-07-23","valid_due_date":"2025-08-06","items":[{"name":"Consulting","quantity":2,"unit_price":100,"vat_rate":20,"total_price":240}]}'
$r = Http::post('https://api.yeb.to/v1/invoicing/proforma', [
'api_key' => 'YOUR_KEY',
'seller' => ['name'=>'My Company Ltd.','address'=>'1 Seller St','email'=>'[email protected]'],
'buyer' => ['name'=>'Client Inc.','address'=>'2 Buyer Rd','email'=>'[email protected]'],
'issue_date' => '2025-07-23',
'valid_due_date' => '2025-08-06',
'items' => [['name'=>'Consulting','quantity'=>2,'unit_price'=>100,'vat_rate'=>20,'total_price'=>240]],
'shipping' => ['price'=>25,'vat_rate'=>20]
]); echo $r->json();
fetch('https://api.yeb.to/v1/invoicing/proforma',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({api_key:'YOUR_KEY',seller:{name:'My Company Ltd.',address:'1 Seller St',email:'[email protected]'},buyer:{name:'Client Inc.',address:'2 Buyer Rd',email:'[email protected]'},issue_date:'2025-07-23',valid_due_date:'2025-08-06',items:[{name:'Consulting',quantity:2,unit_price:100,vat_rate:20,total_price:240}],shipping:{price:25,vat_rate:20}})}).then(r=>r.json()).then(console.log);
import requests, json
payload = {"api_key":"YOUR_KEY",
"seller":{"name":"My Company Ltd.","address":"1 Seller St","email":"[email protected]"},
"buyer":{"name":"Client Inc.","address":"2 Buyer Rd","email":"[email protected]"},
"issue_date":"2025-07-23","valid_due_date":"2025-08-06",
"items":[{"name":"Consulting","quantity":2,"unit_price":100,"vat_rate":20,"total_price":240}],
"shipping":{"price":25,"vat_rate":20}}
r = requests.post('https://api.yeb.to/v1/invoicing/proforma', headers={'Content-Type':'application/json'}, data=json.dumps(payload))
print(r.json())
{
"result": {
"doc_type": "proforma",
"file_url": "https://cdn.yourcdn.com/invoices/uuid.pdf",
"expires": "2025-08-01 10:05:00"
}
}
{
"error": "valid_due_date is required for a pro‑forma invoice.",
"code": 422
}
Code | Description |
---|---|
200 Success | Request processed OK. |
400 Bad Request | Input validation failed. |
401 Unauthorized | Missing / wrong API key. |
403 Forbidden | Key inactive or not allowed. |
429 Rate Limit | Too many requests. |
500 Server Error | Unexpected failure. |
POST https://api.yeb.to/v1/invoicing/invoice
Parameter | Type | Required | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
api_key |
string | yes | Your API key | ||||||||||||||||||||||||||||
lang |
string(2) | opt | Language code (default: en ) |
||||||||||||||||||||||||||||
design |
enum | opt | classic|modern|elegant|minimal |
||||||||||||||||||||||||||||
currency |
string | opt | Currency sign (default: € ) |
||||||||||||||||||||||||||||
currency_side |
enum | opt | before or after (default: after) |
||||||||||||||||||||||||||||
seller
|
object | yes | Seller block | ||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||
buyer
|
object | yes | Buyer block | ||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||
items
|
array<object> | opt | Line items (required fields when present) | ||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||
shipping
|
object | opt | Shipping as net + VAT rate | ||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||
invoice_number |
string | yes | Invoice ID/number | ||||||||||||||||||||||||||||
issue_date |
date | yes | Accepted formats; normalized to Y-m-d |
||||||||||||||||||||||||||||
tax_event_date |
date | yes | Tax event date | ||||||||||||||||||||||||||||
subtotal |
number | yes | Net subtotal (items + shipping) | ||||||||||||||||||||||||||||
vat_total |
number | yes | Total VAT | ||||||||||||||||||||||||||||
total_amount_due |
number | yes | Grand total (gross) | ||||||||||||||||||||||||||||
payment_methods
|
array<object> | opt | Payment instructions | ||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||
extras
|
array<object> | opt | Extra rows printed at bottom | ||||||||||||||||||||||||||||
|
curl -X POST https://api.yeb.to/v1/invoicing/invoice \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_KEY",
"lang": "bg",
"design": "elegant",
"currency": "$",
"currency_side": "before",
"seller": {"name":"My Company Ltd.","address":"1 Seller St, City, Country","email":"[email protected]","vat_number":"BG123456789"},
"buyer": {"name":"Client Inc.","address":"2 Buyer Rd, City, Country","email":"[email protected]","vat_number":"DE987654321"},
"invoice_number": "INV-2025-002",
"issue_date": "2025-07-23",
"tax_event_date": "2025-07-23",
"items": [
{"name":"Consulting Session","description":"Remote IT consulting (2h)","quantity":2,"unit_price":100,"vat_rate":20,"total_price":240},
{"name":"Software License","description":"1-year subscription","quantity":1,"unit_price":200,"vat_rate":20,"total_price":240}
],
"shipping": {"price":25,"vat_rate":20},
"subtotal": 425,
"vat_total": 85,
"total_amount_due": 510,
"payment_methods": [
{"method":"bank transfer","details":{"bank_name":"First Bank","iban":"BG00BANK00000000000000","bic":"BANKBGSF"}},
{"method":"PayPal","details":{"email":"[email protected]"}}
],
"extras":[{"label":"Notes","value":"Pay within 14 days"}]
}'
curl -X POST https://api.yeb.to/v1/invoicing/invoice -H "Content-Type: application/json" -d '{"api_key":"YOUR_KEY","seller":{"name":"My Company Ltd.","address":"1 Seller St","email":"[email protected]"},"buyer":{"name":"Client Inc.","address":"2 Buyer Rd","email":"[email protected]"},"invoice_number":"INV-2025-002","issue_date":"2025-07-23","tax_event_date":"2025-07-23","items":[{"name":"Consulting","quantity":2,"unit_price":100,"vat_rate":20,"total_price":240}],"shipping":{"price":25,"vat_rate":20},"subtotal":225,"vat_total":45,"total_amount_due":270}'
$r = Http::post('https://api.yeb.to/v1/invoicing/invoice', [
'api_key' => 'YOUR_KEY',
'seller' => ['name'=>'My Company Ltd.','address'=>'1 Seller St','email'=>'[email protected]'],
'buyer' => ['name'=>'Client Inc.','address'=>'2 Buyer Rd','email'=>'[email protected]'],
'invoice_number' => 'INV-2025-002',
'issue_date' => '2025-07-23',
'tax_event_date' => '2025-07-23',
'items' => [['name'=>'Consulting','quantity'=>2,'unit_price'=>100,'vat_rate'=>20,'total_price'=>240]],
'shipping' => ['price'=>25,'vat_rate'=>20],
'subtotal' => 225, 'vat_total' => 45, 'total_amount_due' => 270
]); echo $r->json();
fetch('https://api.yeb.to/v1/invoicing/invoice',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({api_key:'YOUR_KEY',seller:{name:'My Company Ltd.',address:'1 Seller St',email:'[email protected]'},buyer:{name:'Client Inc.',address:'2 Buyer Rd',email:'[email protected]'},invoice_number:'INV-2025-002',issue_date:'2025-07-23',tax_event_date:'2025-07-23',items:[{name:'Consulting',quantity:2,unit_price:100,vat_rate:20,total_price:240}],shipping:{price:25,vat_rate:20},subtotal:225,vat_total:45,total_amount_due:270})}).then(r=>r.json()).then(console.log);
import requests, json
payload = {"api_key":"YOUR_KEY",
"seller":{"name":"My Company Ltd.","address":"1 Seller St","email":"[email protected]"},
"buyer":{"name":"Client Inc.","address":"2 Buyer Rd","email":"[email protected]"},
"invoice_number":"INV-2025-002","issue_date":"2025-07-23","tax_event_date":"2025-07-23",
"items":[{"name":"Consulting","quantity":2,"unit_price":100,"vat_rate":20,"total_price":240}],
"shipping":{"price":25,"vat_rate":20},"subtotal":225,"vat_total":45,"total_amount_due":270}
r = requests.post('https://api.yeb.to/v1/invoicing/invoice', headers={'Content-Type':'application/json'}, data=json.dumps(payload))
print(r.json())
{
"result": {
"doc_type": "invoice",
"file_url": "https://cdn.yourcdn.com/invoices/uuid.pdf",
"expires": "2025-08-01 10:05:00"
}
}
{
"error": "invoice_number is required for an invoice.",
"code": 422
}
Code | Description |
---|---|
200 Success | Request processed OK. |
400 Bad Request | Input validation failed. |
401 Unauthorized | Missing / wrong API key. |
403 Forbidden | Key inactive or not allowed. |
429 Rate Limit | Too many requests. |
500 Server Error | Unexpected failure. |
POST https://api.yeb.to/v1/invoicing/debit-note
Parameter | Type | Required | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
seller
|
object | yes | Seller | ||||||||||||||||||||
|
|||||||||||||||||||||||
buyer
|
object | yes | Buyer | ||||||||||||||||||||
|
|||||||||||||||||||||||
items
|
array<object> | opt | Lines for the note | ||||||||||||||||||||
|
|||||||||||||||||||||||
debit_amount | number | opt | Used when no items are provided | ||||||||||||||||||||
debit_note_number | string | yes | Note number | ||||||||||||||||||||
invoice_number | string | yes | Related invoice | ||||||||||||||||||||
issue_date | date | yes | Date (multi‑format) | ||||||||||||||||||||
reason | string | yes | Why the debit | ||||||||||||||||||||
payment_methods
|
array<object> | opt | How to pay | ||||||||||||||||||||
|
curl -X POST https://api.yeb.to/v1/invoicing/debit-note \
-H "Content-Type: application/json" \
-d '{"api_key":"YOUR_KEY","seller":{"name":"My Co","address":"1 Seller St","email":"[email protected]"},"buyer":{"name":"Client","address":"2 Buyer Rd","email":"[email protected]"},"debit_note_number":"DN-2025-003","invoice_number":"INV-2025-002","issue_date":"2025-07-25","reason":"Additional billable hours (3h)","items":[{"name":"Extra Consulting","description":"On-site work","quantity":3,"unit_price":40,"vat_rate":20,"total_price":144}]}'
curl -X POST https://api.yeb.to/v1/invoicing/debit-note -H "Content-Type: application/json" -d '{"api_key":"YOUR_KEY","seller":{"name":"My Co","address":"1 Seller St","email":"[email protected]"},"buyer":{"name":"Client","address":"2 Buyer Rd","email":"[email protected]"},"debit_note_number":"DN-2025-003","invoice_number":"INV-2025-002","issue_date":"2025-07-25","reason":"Additional billable hours (3h)","debit_amount":144}'
$r = Http::post('https://api.yeb.to/v1/invoicing/debit-note', {
"api_key": "YOUR_KEY",
"seller": {
"name": "My Co",
"address": "1 Seller St",
"email": "[email protected]"
},
"buyer": {
"name": "Client",
"address": "2 Buyer Rd",
"email": "[email protected]"
},
"debit_note_number": "DN-2025-003",
"invoice_number": "INV-2025-002",
"issue_date": "2025-07-25",
"reason": "Additional billable hours (3h)",
"debit_amount": 144
});
echo $r->json();
fetch('https://api.yeb.to/v1/invoicing/debit-note', { method:'POST', headers:{'Content-Type':'application/json'}, body: JSON.stringify({"api_key":"YOUR_KEY","seller":{"name":"My Co","address":"1 Seller St","email":"[email protected]"},"buyer":{"name":"Client","address":"2 Buyer Rd","email":"[email protected]"},"debit_note_number":"DN-2025-003","invoice_number":"INV-2025-002","issue_date":"2025-07-25","reason":"Additional billable hours (3h)","debit_amount":144}) })
.then(r => r.json()).then(console.log);
import requests, json
payload = {
"api_key": "YOUR_KEY",
"seller": {
"name": "My Co",
"address": "1 Seller St",
"email": "[email protected]"
},
"buyer": {
"name": "Client",
"address": "2 Buyer Rd",
"email": "[email protected]"
},
"debit_note_number": "DN-2025-003",
"invoice_number": "INV-2025-002",
"issue_date": "2025-07-25",
"reason": "Additional billable hours (3h)",
"debit_amount": 144
}
r = requests.post('https://api.yeb.to/v1/invoicing/debit-note', headers={'Content-Type':'application/json'}, data=json.dumps(payload))
print(r.json())
{"result":{"doc_type":"debit-note","file_url":"https://cdn/.../uuid.pdf","expires":"2025-08-01 10:05:00"}}
{"error":"debit_note_number is required for a debit note.","code":422}
Code | Description |
---|---|
200 Success | Request processed OK. |
400 Bad Request | Input validation failed. |
401 Unauthorized | Missing / wrong API key. |
403 Forbidden | Key inactive or not allowed. |
429 Rate Limit | Too many requests. |
500 Server Error | Unexpected failure. |
POST https://api.yeb.to/v1/invoicing/credit-note
Parameter | Type | Required | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
seller
|
object | yes | Seller | ||||||||||||||||||||
|
|||||||||||||||||||||||
buyer
|
object | yes | Buyer | ||||||||||||||||||||
|
|||||||||||||||||||||||
items
|
array<object> | opt | Lines to credit | ||||||||||||||||||||
|
|||||||||||||||||||||||
credit_amount | number | opt | When no items | ||||||||||||||||||||
credit_note_number | string | yes | Note number | ||||||||||||||||||||
invoice_number | string | yes | Related invoice | ||||||||||||||||||||
issue_date | date | yes | Date (multi‑format) | ||||||||||||||||||||
reason | string | yes | Why the credit | ||||||||||||||||||||
payment_methods
|
array<object> | opt | Refund details | ||||||||||||||||||||
|
curl -X POST https://api.yeb.to/v1/invoicing/credit-note \
-H "Content-Type: application/json" \
-d '{"api_key":"YOUR_KEY","seller":{"name":"My Co","address":"1 Seller St","email":"[email protected]"},"buyer":{"name":"Client","address":"2 Buyer Rd","email":"[email protected]"},"credit_note_number":"CN-2025-001","invoice_number":"INV-2025-002","issue_date":"2025-07-26","reason":"Refund for unused support hours","items":[{"name":"Support Hours","description":"Unused","quantity":1,"unit_price":200,"vat_rate":20,"total_price":240}]}'
curl -X POST https://api.yeb.to/v1/invoicing/credit-note -H "Content-Type: application/json" -d '{"api_key":"YOUR_KEY","seller":{"name":"My Co","address":"1 Seller St","email":"[email protected]"},"buyer":{"name":"Client","address":"2 Buyer Rd","email":"[email protected]"},"credit_note_number":"CN-2025-001","invoice_number":"INV-2025-002","issue_date":"2025-07-26","reason":"Refund for unused support hours","credit_amount":240}'
$r = Http::post('https://api.yeb.to/v1/invoicing/credit-note', {
"api_key": "YOUR_KEY",
"seller": {
"name": "My Co",
"address": "1 Seller St",
"email": "[email protected]"
},
"buyer": {
"name": "Client",
"address": "2 Buyer Rd",
"email": "[email protected]"
},
"credit_note_number": "CN-2025-001",
"invoice_number": "INV-2025-002",
"issue_date": "2025-07-26",
"reason": "Refund for unused support hours",
"credit_amount": 240
});
echo $r->json();
fetch('https://api.yeb.to/v1/invoicing/credit-note', { method:'POST', headers:{'Content-Type':'application/json'}, body: JSON.stringify({"api_key":"YOUR_KEY","seller":{"name":"My Co","address":"1 Seller St","email":"[email protected]"},"buyer":{"name":"Client","address":"2 Buyer Rd","email":"[email protected]"},"credit_note_number":"CN-2025-001","invoice_number":"INV-2025-002","issue_date":"2025-07-26","reason":"Refund for unused support hours","credit_amount":240}) })
.then(r => r.json()).then(console.log);
import requests, json
payload = {
"api_key": "YOUR_KEY",
"seller": {
"name": "My Co",
"address": "1 Seller St",
"email": "[email protected]"
},
"buyer": {
"name": "Client",
"address": "2 Buyer Rd",
"email": "[email protected]"
},
"credit_note_number": "CN-2025-001",
"invoice_number": "INV-2025-002",
"issue_date": "2025-07-26",
"reason": "Refund for unused support hours",
"credit_amount": 240
}
r = requests.post('https://api.yeb.to/v1/invoicing/credit-note', headers={'Content-Type':'application/json'}, data=json.dumps(payload))
print(r.json())
{"result":{"doc_type":"credit-note","file_url":"https://cdn/.../uuid.pdf","expires":"2025-08-01 10:05:00"}}
{"error":"credit_note_number is required for a credit note.","code":422}
Code | Description |
---|---|
200 Success | Request processed OK. |
400 Bad Request | Input validation failed. |
401 Unauthorized | Missing / wrong API key. |
403 Forbidden | Key inactive or not allowed. |
429 Rate Limit | Too many requests. |
500 Server Error | Unexpected failure. |
POST https://api.yeb.to/v1/invoicing/receipt
Parameter | Type | Required | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
seller
|
object | yes | Seller | ||||||||||||||||||||
|
|||||||||||||||||||||||
buyer
|
object | yes | Buyer | ||||||||||||||||||||
|
|||||||||||||||||||||||
items
|
array<object> | opt | Receipt lines; if missing, use amount_paid |
||||||||||||||||||||
|
|||||||||||||||||||||||
amount_paid | number | opt | Used when no items | ||||||||||||||||||||
receipt_number | string | yes | Receipt no. | ||||||||||||||||||||
payment_date | date | yes | Date (multi‑format) | ||||||||||||||||||||
invoice_number | string | opt | Related invoice (optional) | ||||||||||||||||||||
payment_method | string | opt | Short method label | ||||||||||||||||||||
payment_methods
|
array<object> | opt | Detailed method objects | ||||||||||||||||||||
|
curl -X POST https://api.yeb.to/v1/invoicing/receipt \
-H "Content-Type: application/json" \
-d '{"api_key":"YOUR_KEY","seller":{"name":"My Co","address":"1 Seller St","email":"[email protected]"},"buyer":{"name":"Client","address":"2 Buyer Rd","email":"[email protected]"},"receipt_number":"RCPT-2025-010","payment_date":"2025-07-25","invoice_number":"INV-2025-002","items":[{"name":"Consulting","quantity":2,"unit_price":100,"vat_rate":20,"total_price":240}],"payment_methods":[{"method":"card","details":{"brand":"Visa","last4":"1234"}}]}'
curl -X POST https://api.yeb.to/v1/invoicing/receipt -H "Content-Type: application/json" -d '{"api_key":"YOUR_KEY","seller":{"name":"My Co","address":"1 Seller St","email":"[email protected]"},"buyer":{"name":"Client","address":"2 Buyer Rd","email":"[email protected]"},"receipt_number":"RCPT-2025-010","payment_date":"2025-07-25","amount_paid":200,"payment_method":"cash"}'
$r = Http::post('https://api.yeb.to/v1/invoicing/receipt', {
"api_key": "YOUR_KEY",
"seller": {
"name": "My Co",
"address": "1 Seller St",
"email": "[email protected]"
},
"buyer": {
"name": "Client",
"address": "2 Buyer Rd",
"email": "[email protected]"
},
"receipt_number": "RCPT-2025-010",
"payment_date": "2025-07-25",
"amount_paid": 200,
"payment_method": "cash"
});
echo $r->json();
fetch('https://api.yeb.to/v1/invoicing/receipt', { method:'POST', headers:{'Content-Type':'application/json'}, body: JSON.stringify({"api_key":"YOUR_KEY","seller":{"name":"My Co","address":"1 Seller St","email":"[email protected]"},"buyer":{"name":"Client","address":"2 Buyer Rd","email":"[email protected]"},"receipt_number":"RCPT-2025-010","payment_date":"2025-07-25","amount_paid":200,"payment_method":"cash"}) })
.then(r => r.json()).then(console.log);
import requests, json
payload = {
"api_key": "YOUR_KEY",
"seller": {
"name": "My Co",
"address": "1 Seller St",
"email": "[email protected]"
},
"buyer": {
"name": "Client",
"address": "2 Buyer Rd",
"email": "[email protected]"
},
"receipt_number": "RCPT-2025-010",
"payment_date": "2025-07-25",
"amount_paid": 200,
"payment_method": "cash"
}
r = requests.post('https://api.yeb.to/v1/invoicing/receipt', headers={'Content-Type':'application/json'}, data=json.dumps(payload))
print(r.json())
{"result":{"doc_type":"receipt","file_url":"https://cdn/.../uuid.pdf","expires":"2025-08-01 10:05:00"}}
{"error":"payment_date is required for a receipt.","code":422}
Code | Description |
---|---|
200 Success | Request processed OK. |
400 Bad Request | Input validation failed. |
401 Unauthorized | Missing / wrong API key. |
403 Forbidden | Key inactive or not allowed. |
429 Rate Limit | Too many requests. |
500 Server Error | Unexpected failure. |