청구서 API — PDF 문서 생성 | YEB

단일 REST API로 i18n 레이블, 유연한 날짜 형식, 다양한 디자인 테마 및 엄격한 유효성 검사를 갖춘 PDF 청구서, 견적서, 차변/대변 통지서 및 영수증을 생성하세요.

무엇을 할 수 있나요?
고품질 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로 돌아가기