OFD invoice verification
Verify a Chinese invoice from a Base64-encoded OFD document.
/v1/invoices/verify-ofdRequest
- Chinese
- US$0.04
- Other languages
- US$0.05
Headers
| Name | Required | Description |
|---|---|---|
Authorization | Yes | Bearer YOUR_API_KEY |
Content-Type | Yes | application/json |
JSON body
| Field | Type | Required | Description |
|---|---|---|---|
file_base64 | string | Yes | Base64-encoded OFD document, without a data-URL prefix. |
language | string | No | Response language. Default zh-CN.Supported languages (22)
|
Send file_base64 as JSON. Encode the original OFD bytes and omit the data URL prefix.
The JSON request body limit is 15 MB.
Example
curl -X POST 'https://api.chinavalidate.com/v1/invoices/verify-ofd' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
--data '{"file_base64":"ZXhhbXBsZQ==","language":"en"}'Response
A response with code 0 means the request completed. Read data for the result. Record order is preserved. When a company search has no result and returns no records or totals, data is null.
Read verification_status for the outcome. Available seller, buyer, amount and line item details appear in data.
| Field | Type | Required | Description |
|---|---|---|---|
data | object | Yes | Original result. Use the Chinese legal company name from data in subsequent requests that require it. |
translation | object | No | Complete copy of data in the requested language, with the same fields, types and list order. Values that need no translation are copied as-is. Present for non-Chinese requests with a result. |
Data fields
| Field | Description |
|---|---|
verification_status | The invoice verification outcome, such as matched, mismatch or not_found. |
invoice_number | The invoice number as printed, including leading zeros. |
invoice_type | Invoice type. |
issue_date | Issue date. |
net_amount | The amount before tax. |
tax_amount | The recorded tax amount. |
total_amount | The total including tax. |
seller | Seller. |
seller.name | Name. |
seller.tax_id | Tax id. |
buyer | Buyer. |
buyer.name | Name. |
buyer.tax_id | Tax id. |
line_items | Individual items recorded on the invoice. |
line_items.[].item_name | Item name. |
line_items.[].quantity | Quantity. Original value is preserved. |
line_items.[].unit | Unit. Original value is preserved. |
line_items.[].net_amount | The amount before tax. |
line_items.[].tax_amount | The recorded tax amount. |
line_items.[].tax_rate | Tax rate. |
{
"code": 0,
"msg": "ok",
"data": {
"verification_status": "matched",
"invoice_number": "25322000000000123456",
"invoice_type": "10",
"issue_date": "2025-03-18",
"net_amount": "1000.00",
"tax_amount": "130.00",
"total_amount": "1130.00",
"seller": {
"name": "苏州示例精密制造有限公司",
"tax_id": "91320505MA00000005"
},
"buyer": {
"name": "杭州示例工业设备有限公司",
"tax_id": "91330100MA0000000C"
},
"line_items": [
{
"item_name": "精密加工零件",
"quantity": "10",
"unit": "件",
"net_amount": "1000.00",
"tax_amount": "130.00",
"tax_rate": "0.13"
}
]
},
"translation": {
"verification_status": "matched",
"invoice_number": "25322000000000123456",
"invoice_type": "10",
"issue_date": "2025-03-18",
"net_amount": "1000.00",
"tax_amount": "130.00",
"total_amount": "1130.00",
"seller": {
"name": "Suzhou Example Precision Manufacturing Co., Ltd.",
"tax_id": "91320505MA00000005"
},
"buyer": {
"name": "Hangzhou Example Industrial Equipment Co., Ltd.",
"tax_id": "91330100MA0000000C"
},
"line_items": [
{
"item_name": "Precision machined parts",
"quantity": "10",
"unit": "piece",
"net_amount": "1000.00",
"tax_amount": "130.00",
"tax_rate": "0.13"
}
]
}
}Errors and billing
Completed requests use API credits, including normal no-result responses and invoice mismatches. Input errors and service failures are free. Each completed request is charged separately, including a repeated request. Requests that return no results or contain no text to translate use the Chinese rate.
| HTTP | Action |
|---|---|
| 400 / 413 / 415 / 422 | Correct the input, format or size before resending the request. |
| 401 / 403 | Check the API key, its expiration date and your account status. |
| 402 | Add API credits, then retry the request. |
| 429 | Wait for the time specified in Retry-After before retrying. |
| 500 / 502 / 503 / 504 | Retry if the service becomes available. |
Up to 120 requests per minute per account.