ChinaValidate
On this pageRequestExampleResponseErrors and billing

OFD invoice verification

Verify a Chinese invoice from a Base64-encoded OFD document.

POST/v1/invoices/verify-ofd
Get API key

Request

Per call · USD
Chinese
US$0.04
Other languages
US$0.05

Headers

NameRequiredDescription
AuthorizationYesBearer YOUR_API_KEY
Content-TypeYesapplication/json

JSON body

FieldTypeRequiredDescription
file_base64stringYesBase64-encoded OFD document, without a data-URL prefix.
languagestringNoResponse language. Default zh-CN.
Supported languages (22)
  • Englishen
  • Españoles
  • Português (Brasil)pt-BR
  • 日本語ja
  • 한국어ko
  • Русскийru
  • Deutschde
  • Françaisfr
  • Tiếng Việtvi
  • Bahasa Indonesiaid
  • ไทยth
  • हिन्दीhi
  • Polskipl
  • Українськаuk
  • Italianoit
  • Türkçetr
  • Bahasa Melayums
  • 简体中文zh-CN
  • العربيةar
  • Češtinacs
  • Nederlandsnl
  • 繁體中文zh-TW
Responses in other languages may take slightly longer.

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
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.

FieldTypeRequiredDescription
dataobjectYesOriginal result. Use the Chinese legal company name from data in subsequent requests that require it.
translationobjectNoComplete 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
FieldDescription
verification_statusThe invoice verification outcome, such as matched, mismatch or not_found.
invoice_numberThe invoice number as printed, including leading zeros.
invoice_typeInvoice type.
issue_dateIssue date.
net_amountThe amount before tax.
tax_amountThe recorded tax amount.
total_amountThe total including tax.
sellerSeller.
seller.nameName.
seller.tax_idTax id.
buyerBuyer.
buyer.nameName.
buyer.tax_idTax id.
line_itemsIndividual items recorded on the invoice.
line_items.[].item_nameItem name.
line_items.[].quantityQuantity. Original value is preserved.
line_items.[].unitUnit. Original value is preserved.
line_items.[].net_amountThe amount before tax.
line_items.[].tax_amountThe recorded tax amount.
line_items.[].tax_rateTax rate.
Sample response · en · 200 OK
{
  "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.

HTTPAction
400 / 413 / 415 / 422Correct the input, format or size before resending the request.
401 / 403Check the API key, its expiration date and your account status.
402Add API credits, then retry the request.
429Wait for the time specified in Retry-After before retrying.
500 / 502 / 503 / 504Retry if the service becomes available.

Up to 120 requests per minute per account.