Use case
청구 데이터나 관리자 화면의 JSON을 PDF 인보이스로 만드는 경우에 적합합니다. 수동 검토는 웹 도구, 반복되는 서버 작업은 API로 나눠 운영할 수 있습니다.
PDF Tools API
백엔드, 배치 작업, 제품 워크플로에 인보이스 PDF 생성을 넣고 별도 PDF 처리 인프라를 줄입니다.
Credits
1 Credit / call
1 Credit per successful API request. Failed processing attempts are refunded automatically.
Pricing
1,000 Credits = $1
Every signed-in user receives 100 free API Credits each month.
Endpoint
/api/external/invoice-generator/pdfUse your API Key in the x-api-key header.
청구 데이터나 관리자 화면의 JSON을 PDF 인보이스로 만드는 경우에 적합합니다. 수동 검토는 웹 도구, 반복되는 서버 작업은 API로 나눠 운영할 수 있습니다.
curl -X POST https://itextmaster.com/api/external/invoice-generator/pdf \
-H 'x-api-key: YOUR_API_KEY' \
-F 'invoiceNumber=INV-001' \
-F 'fromName=Your Company' \
-F 'billToName=Client Name' \
-F 'items=[{"description":"Consulting","quantity":10,"rate":150}]' \
--output invoice.pdfcurl -X POST https://itextmaster.com/api/external/invoice-generator/pdf \
-H 'x-api-key: YOUR_API_KEY' \
-F 'invoiceNumber=INV-001' \
-F 'fromName=Your Company' \
-F 'billToName=Client Name' \
-F 'items=[{"description":"Consulting","quantity":10,"rate":150}]' \
--output invoice.pdfcurl -X POST https://itextmaster.com/api/external/invoice-generator/pdf \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY' \
-d '{
"invoiceNumber": "INV-001",
"from": { "name": "Your Company", "email": "you@example.com" },
"billTo": { "name": "Client Name", "email": "client@example.com" },
"items": [{ "description": "Consulting", "quantity": 10, "rate": 150 }]
}' \
--output invoice.pdfimport { writeFile } from 'node:fs/promises';
const response = await fetch('https://itextmaster.com/api/external/invoice-generator/pdf', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': process.env.ITEXTMASTER_API_KEY
},
body: JSON.stringify({
invoiceNumber: 'INV-001',
from: { name: 'Your Company', email: 'you@example.com' },
billTo: { name: 'Client Name', email: 'client@example.com' },
items: [{ description: 'Consulting', quantity: 10, rate: 150 }]
})
});
if (!response.ok) {
throw new Error(await response.text());
}
await writeFile('invoice.pdf', Buffer.from(await response.arrayBuffer()));import os
import requests
response = requests.post(
'https://itextmaster.com/api/external/invoice-generator/pdf',
headers={
'Content-Type': 'application/json',
'x-api-key': os.environ['ITEXTMASTER_API_KEY'],
},
json={
'invoiceNumber': 'INV-001',
'from': {'name': 'Your Company', 'email': 'you@example.com'},
'billTo': {'name': 'Client Name', 'email': 'client@example.com'},
'items': [{'description': 'Consulting', 'quantity': 10, 'rate': 150}],
},
)
response.raise_for_status()
with open('invoice.pdf', 'wb') as f:
f.write(response.content)invalid_invoice_payload인보이스 JSON 형식이 잘못되었거나 필수 필드가 없습니다.
invalid_api_keyx-api-key가 없거나 유효하지 않거나 교체되었습니다.
insufficient_credits계정의 API Credits가 부족합니다.
invoice_pdf_generation_failed인보이스 PDF 생성에 실패했습니다. 실패한 처리는 Credits가 자동 환불됩니다.
invoice.pdf와 함께 사용 Credits 및 잔여 Credits 응답 헤더가 반환됩니다.
Content-TypeContent-DispositionX-Credits-ChargedX-Credit-Balance성공한 인보이스 생성 API 요청은 API Credits를 사용합니다. 실패한 처리는 자동 환불됩니다. 로그인 사용자는 매월 100 free API Credits를 받고, 1,000 Credits = $1입니다.
브라우저에서 처리되는 웹 도구는 API Credits를 쓰지 않습니다. API Key로 호출하는 자동화 요청만 과금됩니다.
권장하지 않습니다. API Key는 백엔드, 큐 작업, 서버 자동화에 보관하세요.
Create an API Key, test 인보이스 생성 API, and buy more Credits only when automation volume grows.