請求書API

PDF請求書、見積書、借方/貸方通知書、領収書をi18nラベル、柔軟な日付形式、厳格なバリデーションで生成します。

何ができますか?
高品質PDF

DomPDFによるA4出力、複数のデザインテーマ対応。

i18n対応

2文字の言語コード + 辞書(例:en、bg)。

VAT付き配送

配送を正味価格 + VAT率で追加、合計は自動調整されます。

柔軟な日付

Y-m-d、d/m/Y、d-m-Y、m/d/Yなどを受け付け、Y-m-dに正規化されます。

ライブで試す
99.9 % 稼働時間
580.7ms レスポンス
10 req/s
0.5 クレジット / リクエスト

Create Pro‑forma

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
seller.namestringyesSeller name
seller.addressstringyesStreet, city, country
seller.emailemailyesBilling email
seller.vat_numberstringoptVAT ID
seller.company_numberstringoptRegistry ID
seller.logourloptLogo URL
seller.phonestringoptContact
buyer object yes Buyer block
buyer.namestringyesBuyer name
buyer.addressstringyesBilling address
buyer.emailemailyesEmail
buyer.vat_numberstringoptVAT ID
buyer.company_numberstringoptRegistry ID
buyer.phonestringoptContact
items array<object> opt Line items (required fields when present)
items[].namestringyes*Item name
items[].descriptionstringoptItem description
items[].quantitynumberyes*Quantity
items[].unit_pricenumberyes*Unit price (net)
items[].vat_ratenumberyes*VAT rate %
items[].total_pricenumberyes*Gross line total
shipping object opt Shipping as net + VAT rate
shipping.pricenumberyes*Shipping net
shipping.vat_ratenumberyes*VAT rate % (0..100)
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
extras[].labelstringyes*Left cell
extras[].valuestringoptRight cell

Example

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"}]
  }'

Integrations

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())

Response Example

{
  "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
}

レスポンスコード

コード説明
200 Successリクエスト処理成功。
400 Bad Request入力バリデーション失敗。
401 UnauthorizedAPIキーが不足または不正。
403 Forbiddenキーが無効または許可されていません。
429 Rate Limitリクエストが多すぎます。
500 Server Error予期しないエラー。

Pro-Forma

invoicing/proforma 0.5000 credits

Parameters

API Key
body · string · required
Language
body · string
Design theme
body · string
Currency sign
body · string
Currency placement
body · string
Seller
body · string · required
Buyer
body · string · required
Items
body · string
Shipping
body · string
Issue date
body · string · required
Valid until
body · string · required
Extras
body · string

Code Samples


                
                
                
            

Response

Status:
Headers

                
Body

                

Create Invoice

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
seller.name string yes Seller name
seller.address string yes Street, city, country
seller.email email yes Billing email
seller.vat_number string opt VAT ID
seller.company_number string opt Registry ID
seller.logo url opt Logo URL
seller.phone string opt Contact
buyer object yes Buyer block
buyer.name string yes Buyer name
buyer.address string yes Billing address
buyer.email email yes Email
buyer.vat_number string opt VAT ID
buyer.company_number string opt Registry ID
buyer.phone string opt Contact
items array<object> opt Line items (required fields when present)
items[].namestringyes*Item name
items[].descriptionstringoptItem description
items[].quantitynumberyes*Quantity
items[].unit_pricenumberyes*Unit price (net)
items[].vat_ratenumberyes*VAT rate %
items[].total_pricenumberyes*Gross line total
shipping object opt Shipping as net + VAT rate
shipping.pricenumberyes*Shipping net
shipping.vat_ratenumberyes*VAT rate % (0..100)
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
payment_methods[].methodstringyes*e.g., bank transfer, PayPal, card
payment_methods[].detailsobjectoptFree‑shape key/value (IBAN, etc.)
extras array<object> opt Extra rows printed at bottom
extras[].labelstringyes*Left cell
extras[].valuestringoptRight cell

Example

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"}]
  }'

Integrations

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())

Response Example

{
  "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
}

レスポンスコード

コード説明
200 Successリクエスト処理成功。
400 Bad Request入力バリデーション失敗。
401 UnauthorizedAPIキーが不足または不正。
403 Forbiddenキーが無効または許可されていません。
429 Rate Limitリクエストが多すぎます。
500 Server Error予期しないエラー。

Invoice

invoicing/invoice 0.6000 credits

Parameters

API Key
query · string · required
Language
query · string
Design
query · string
Currency
query · string
Currency side
query · string
Seller
query · string · required
Buyer
query · string · required
Items
query · string
Shipping
query · string
Invoice number
query · string · required
Issue date
query · string · required
Tax event date
query · string · required
Subtotal
query · string · required
VAT total
query · string · required
Total amount due
query · string · required
Payment methods
query · string
Extras
query · string

Code Samples


                
                
                
            

Response

Status:
Headers

                
Body

                

Create Debit Note

POST https://api.yeb.to/v1/invoicing/debit-note
ParameterTypeRequiredDescription
seller objectyesSeller
seller.namestringyesName
seller.addressstringyesAddress
seller.emailemailyesEmail
buyer objectyesBuyer
buyer.namestringyesName
buyer.addressstringyesAddress
buyer.emailemailyesEmail
items array<object>optLines for the note
items[].namestringyes*Item name
items[].quantitynumberyes*Qty
items[].unit_pricenumberyes*Unit (net)
items[].vat_ratenumberyes*VAT %
items[].total_pricenumberyes*Gross
debit_amountnumberoptUsed when no items are provided
debit_note_numberstringyesNote number
invoice_numberstringyesRelated invoice
issue_datedateyesDate (multi‑format)
reasonstringyesWhy the debit
payment_methods array<object>optHow to pay
payment_methods[].methodstringyes*Method
payment_methods[].detailsobjectoptDetails (IBAN, etc.)

Example

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())

Response Example

{"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}

レスポンスコード

コード説明
200 Successリクエスト処理成功。
400 Bad Request入力バリデーション失敗。
401 UnauthorizedAPIキーが不足または不正。
403 Forbiddenキーが無効または許可されていません。
429 Rate Limitリクエストが多すぎます。
500 Server Error予期しないエラー。

Debit Note

invoicing/debit-note 0.5000 credits

Parameters

API Key
body · string · required
Language
body · string
Design theme
body · string
Currency sign
body · string
Currency placement
body · string
Seller
body · string · required
Seller name
body · string · required
Seller address
body · string · required
Seller email
body · string · required
Seller VAT
body · string
Seller registry
body · string
Seller logo
body · string
Seller phone
body · string
Buyer
body · string · required
Buyer name
body · string · required
Buyer address
body · string · required
Buyer email
body · string · required
Buyer VAT
body · string
Buyer registry
body · string
Buyer phone
body · string
Items
body · string
Item name
body · string
Item description
body · string
Quantity
body · string
Unit price
body · string
VAT rate %
body · string
Gross total
body · string
Debit amount
body · string
Debit note number
body · string · required
Related invoice
body · string · required
Issue date
body · string · required
Reason
body · string · required
Payment methods
body · string
Payment method
body · string
Payment details
body · string

Code Samples


                
                
                
            

Response

Status:
Headers

                
Body

                

Create Credit Note

POST https://api.yeb.to/v1/invoicing/credit-note
ParameterTypeRequiredDescription
seller objectyesSeller
seller.namestringyesName
seller.addressstringyesAddress
seller.emailemailyesEmail
buyer objectyesBuyer
buyer.namestringyesName
buyer.addressstringyesAddress
buyer.emailemailyesEmail
items array<object>optLines to credit
items[].namestringyes*Name
items[].quantitynumberyes*Qty
items[].unit_pricenumberyes*Unit (net)
items[].vat_ratenumberyes*VAT %
items[].total_pricenumberyes*Gross
credit_amountnumberoptWhen no items
credit_note_numberstringyesNote number
invoice_numberstringyesRelated invoice
issue_datedateyesDate (multi‑format)
reasonstringyesWhy the credit
payment_methods array<object>optRefund details
payment_methods[].methodstringyes*Method
payment_methods[].detailsobjectoptDetails

Example

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())

Response Example

{"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}

レスポンスコード

コード説明
200 Successリクエスト処理成功。
400 Bad Request入力バリデーション失敗。
401 UnauthorizedAPIキーが不足または不正。
403 Forbiddenキーが無効または許可されていません。
429 Rate Limitリクエストが多すぎます。
500 Server Error予期しないエラー。

Credit Note

invoicing/credit-note 0.5000 credits

Parameters

API Key
body · string · required
Language
body · string
Design theme
body · string
Currency sign
body · string
Currency placement
body · string
Seller
body · string · required
Buyer
body · string · required
Items
body · string
Credit amount
body · string
Credit note number
body · string · required
Related invoice
body · string · required
Issue date
body · string · required
Reason
body · string · required
Payment methods
body · string

Code Samples


                
                
                
            

Response

Status:
Headers

                
Body

                

Create Receipt

POST https://api.yeb.to/v1/invoicing/receipt
ParameterTypeRequiredDescription
seller objectyesSeller
seller.namestringyesName
seller.addressstringyesAddress
seller.emailemailyesEmail
buyer objectyesBuyer
buyer.namestringyesName
buyer.addressstringyesAddress
buyer.emailemailyesEmail
items array<object>opt Receipt lines; if missing, use amount_paid
items[].namestringyes*Name
items[].quantitynumberyes*Qty
items[].unit_pricenumberyes*Unit (net)
items[].vat_ratenumberyes*VAT %
items[].total_pricenumberyes*Gross
amount_paidnumberoptUsed when no items
receipt_numberstringyesReceipt no.
payment_datedateyesDate (multi‑format)
invoice_numberstringoptRelated invoice (optional)
payment_methodstringoptShort method label
payment_methods array<object>optDetailed method objects
payment_methods[].methodstringyes*Method
payment_methods[].detailsobjectoptDetails

Example

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())

Response Example

{"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}

レスポンスコード

コード説明
200 Successリクエスト処理成功。
400 Bad Request入力バリデーション失敗。
401 UnauthorizedAPIキーが不足または不正。
403 Forbiddenキーが無効または許可されていません。
429 Rate Limitリクエストが多すぎます。
500 Server Error予期しないエラー。

Receipt

invoicing/receipt 0.3000 credits

Parameters

API Key
body · string · required
Seller
body · string · required
Seller name
body · string · required
Seller address
body · string · required
Seller email
body · string · required
Buyer
body · string · required
Buyer name
body · string · required
Buyer address
body · string · required
Buyer email
body · string · required
Items
body · string
Item name
body · string
Item description
body · string
Quantity
body · string
Unit price
body · string
VAT rate %
body · string
Gross total
body · string
Amount paid
body · string
Receipt number
body · string · required
Payment date
body · string · required
Related invoice
body · string
Payment method (short)
body · string
Payment methods
body · string
Payment method
body · string
Payment details
body · string

Code Samples


                
                
                
            

Response

Status:
Headers

                
Body

                

Invoicing APIs — Practical Guide

A hands-on guide to creating Pro-forma Invoices, Invoices, Debit Notes, Credit Notes, and Receipts with a single, consistent API. We’ll focus on real-world use: when to use each document, what to send, how to read responses, and gotchas to avoid.

#What these endpoints solve

One family of endpoints, five document types. Send your parties (seller/buyer), optional items and shipping, and document-specific fields. You get a ready-to-send PDF URL plus an expiry time. All messages and validation feedback are in English.

  • Pro-forma — a price quote / payment request before issuing a formal invoice.
  • Invoice — a formal tax document for goods/services delivered.
  • Debit Note — add charges to an issued invoice (e.g., extra billable hours).
  • Credit Note — reduce or refund part/all of an invoice (e.g., returns, discounts).
  • Receipt — acknowledge payment (with or without linking to an invoice).

#The practical field model

Each endpoint accepts a common core with some extras. Think in blocks:

BlockShapeRequiredNotes that matter
seller object { name, address?, email?, vat_number?, company_number?, logo?, phone? } Yes At minimum, send name. Add VAT/registration for compliance; logo is a URL.
buyer object { name, address?, email?, vat_number?, company_number?, phone? } Yes name is required. Email is printed for delivery/records.
items array<object> with when present, all required: { name, quantity, unit_price (net), vat_rate %, total_price (gross), description? } No* If you include items, each line must be complete. Use when you want line-level detail in the PDF.
shipping object { price (net), vat_rate % } No If present, both price and vat_rate are required. Treated like a separate line.
payment_methods array<object> { method, details?: object } No For “how to pay” or “how refunded”. Keep labels short (method ≤ 20 chars). details is key/value (IBAN, BIC, email…).
extras array<object> { label, value? } No Small rows printed at the bottom (“Notes”, “PO #123”, etc.).
Amounts & VAT: unit_price is net, total_price is gross. vat_rate is a percent (0–100). shipping.price is net. If you don’t need line-level detail, skip items and use the document’s summary/amount fields (see below).

#When to use which endpoint

EndpointWhen to useMust-have fields (besides seller/buyer)Shortcut (no items)
POST https://api.yeb.to/v1/invoicing/proforma Quote or pay-first flow before tax invoice. issue_date, valid_due_date Just set total_amount_due (optional for pro-forma if you show only lines; still recommended).
POST https://api.yeb.to/v1/invoicing/invoice Formal tax invoice after delivery. invoice_number, issue_date, tax_event_date, total_amount_due Provide total_amount_due; subtotal/vat_total are optional.
POST https://api.yeb.to/v1/invoicing/debit-note Charge more against an invoice (extras, corrections). debit_note_number, invoice_number, issue_date, reason Use debit_amount instead of items.
POST https://api.yeb.to/v1/invoicing/credit-note Reduce/refund an existing invoice. credit_note_number, invoice_number, issue_date, reason Use credit_amount instead of items.
POST https://api.yeb.to/v1/invoicing/receipt Confirm a payment (optionally reference an invoice). receipt_number, payment_date Use amount_paid (or send item lines if you need detail).

#Dates we accept (and how we normalize)

The API accepts common formats and normalizes to YYYY-MM-DD internally:

  • Y-m-d (2025-01-09)
  • d-m-Y (09-01-2025), d/m/Y (09/01/2025), d/m/y (09/01/25)
  • m/d/Y (01/09/2025), m/d/y (01/09/25)

If a date can’t be parsed, you’ll get a clear validation error listing allowed formats.

#Minimal, production-ready payloads

#Pro-forma

curl -X POST "https://api.yeb.to/v1/invoicing/proforma" -H "Content-Type: application/json" -d '{
  "api_key": "YOUR_KEY",
  "seller": {"name":"My Company","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}],
  "extras": [{"label":"Notes","value":"Valid for 14 days"}]
}'

#Invoice

curl -X POST "https://api.yeb.to/v1/invoicing/invoice" -H "Content-Type: application/json" -d '{
  "api_key": "YOUR_KEY",
  "seller": {"name":"My Company","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},
  "total_amount_due": 270
}'

#Debit Note

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
}'

#Credit Note

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,
  "payment_methods":[{"method":"bank transfer","details":{"iban":"BG00...","bic":"BANKBGSF"}}]
}'

#Receipt

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":"card"
}'

#Presentation options that actually matter

  • Design: classic|modern|elegant|minimal. If a chosen design isn’t available, the API attempts to use classic; if neither exists you’ll get 400 "Design not found."
  • Language: lang is a 2-letter code for labels/text in the PDF (default en).
    Supported languages:
    • 🇬🇧 — English (en)
    • 🇧🇬 — Bulgarian (bg)
    • 🇫🇷 — French (fr)
    • 🇩🇪 — German (de)
    • 🇬🇷 — Greek (el)
    • 🇮🇹 — Italian (it)
    • 🇪🇸 — Spanish (es)
    • 🇵🇹 — Portuguese (pt)
    • 🇷🇺 — Russian (ru)
    • 🇹🇷 — Turkish (tr)
    • 🇵🇱 — Polish (pl)
    • 🇨🇿 — Czech (cs)
    • 🇷🇴 — Romanian (ro)
    • 🇳🇱 — Dutch (nl)
    • 🇸🇪 — Swedish (sv)
    • 🇳🇴 — Norwegian (no)
    • 🇫🇮 — Finnish (fi)
    • 🇮🇸 — Icelandic (is)
    • 🇺🇦 — Ukrainian (uk)
    • 🇸🇦 — Arabic (ar)
    • 🇩🇰 — Danish (da)
    • 🇷🇸 — Serbian (Latin) (sr)
  • Currency: Use currency (symbol or code) and currency_side (before or after, default after).

#What you get back (and what to do next)

{
  "result": {
    "doc_type": "invoice|proforma|debit-note|credit-note|receipt",
    "file_url": "https://cdn.../uuid.pdf",
    "expires": "2025-08-01 10:05:00"
  }
}
  • file_url — a direct PDF link. Best practice: download and store on your side; links expire after 7 days.
  • doc_type — echoes the type you created. Use for auditing/notifications.
  • expires — we recommend background jobs to archive PDFs before expiry.

#Common errors & quick fixes

{"error":"invoice_number is required for an invoice.","code":422}
{"error":"shipping.vat_rate is required when shipping is provided.","code":422}
{"error":"Design “elegant” not found.","code":400}
  • 422 validation: Provide all must-have fields for your endpoint; if you send items, each line must include name, quantity, unit_price, vat_rate, total_price.
  • Dates: If parsing fails you’ll get a helpful message listing accepted formats.
  • Design 400: Switch to classic or check your theme availability.

#Field recipes & integration tips

  1. No line items? For debit/credit notes and receipts, use the single amount fields (debit_amount, credit_amount, amount_paid).
  2. Totals: On invoices, you must send total_amount_due. subtotal and vat_total are optional (the PDF will still render correctly).
  3. Payment instructions: Prefer payment_methods[] to show bank transfer/PayPal/card with details. For receipts, you can also set a simple payment_method label.
  4. Branding: Send design, logo, and currency_side to match your brand style and region conventions.
  5. Compliance: Include VAT/registration IDs for both parties when applicable. Keep reason fields (reason) clear for credit/debit notes.

#API Changelog

2026-03-07
Item-level VAT. Added support for per-item VAT via items[].vat_rate. If omitted, the previous global VAT logic applies as before.
2026-03-07
Items payload normalized. Improved parsing and stability of items[] fields: tolerant to minor key order differences and documented a recommended field order for more predictable results.
2026-03-07
Templates polished. All document themes (classic, modern, elegant, minimal) received visual/layout refinements and improved typography.
2026-03-07
Invoice totals simplified. subtotal and vat_total became optional; total_amount_due remains required.
2026-02-28
Date normalization improved. The API now accepts multiple common formats and normalizes to YYYY-MM-DD before validation, with clearer error messages on failure.
2026-02-21
Receipts streamlined. Added payment_method (short label) in addition to payment_methods[] for quick receipts without details.
2026-02-14
Design & currency UX. currency_side (before|after) introduced; if a chosen design isn’t available we attempt classic (else 400). PDFs render with Unicode-safe fonts by default.

よくある質問

請求書、見積書、借方通知書、貸方通知書、領収書です。

"shipping"オブジェクトに"price"(正味)と"vat_rate"(%)を含めて送信します。小計とVAT合計に含まれます。

Y-m-d、d-m-Y、d/m/Y、d/m/y、m/d/Y、m/d/y。APIがY-m-dに正規化します。

いいえ。"receipt.invoice_number"は任意です。

はい。2文字のiso2言語コードを送信すると、サーバーが対応する辞書を使用し、英語をフォールバックとします。

はい。エラーが発生したリクエストを含め、すべてのリクエストがクレジットを消費します。クレジットは成功・失敗に関係なくリクエスト数に紐づいています。エラーが明らかに当社のプラットフォーム側の問題による場合は、影響を受けたクレジットを復元します(現金での返金はありません)。

[email protected]までご連絡ください。フィードバックを真摯に受け止めています。バグレポートや機能リクエストが意味のあるものであれば、APIを迅速に修正・改善し、お礼として50の無料クレジットを付与します。

APIやエンドポイントによって異なります。一部のエンドポイントは外部ソースのデータを使用しており、より厳しい制限がある場合があります。また、不正利用の防止とプラットフォームの安定性維持のために制限を設けています。各エンドポイントの具体的な制限についてはドキュメントをご確認ください。

クレジットシステムで運営しています。クレジットは前払いの返金不可の単位で、API呼び出しやツールに使用します。クレジットはFIFO(古いものから順に)消費され、購入日から12か月間有効です。ダッシュボードに各購入日とその有効期限が表示されます。

はい。購入したすべてのクレジット(端数残高を含む)は購入から12か月間有効です。未使用のクレジットは有効期間終了時に自動的に期限切れとなり、永久に削除されます。期限切れのクレジットは復元や現金その他の価値への変換はできません。経過措置:2025年9月22日以前に購入したクレジットは2025年9月22日購入として扱われ、2026年9月22日に期限切れとなります(購入時により早い期限が記載されていない限り)。

はい—有効期間内で繰り越されます。未使用のクレジットは利用可能な状態のまま月ごとに繰り越され、購入後12か月で期限切れになります。

クレジットは返金不可です。必要な分だけ購入してください—後からいつでもチャージできます。プラットフォーム側のエラーで課金に失敗した場合、調査後に影響を受けたクレジットを復元する場合があります。現金での返金はありません。

料金はドルではなくクレジットで設定されています。各エンドポイントには独自のコストがあります—上記の「クレジット / リクエスト」バッジをご覧ください。常に正確な支出額がわかります。
← APIに戻る