For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
AI agentsStatus PageContact sales
HomeGuidesDeveloper ToolsChangelogsCookbooks
HomeGuidesDeveloper ToolsChangelogsCookbooks
    • Payabli developer overview
    • Developer quickstart
    • Developer testing guide
    • Test accounts
  • API
    • Using the API
    • API responses
    • API changelog
          • POSTOCR PDF or image
          • POSTOCR a base64-encoded string
    • Webhooks
  • Embedded Components
    • Overview
    • EmbeddedMethod UI
    • PayMethod UI
    • VirtualTerminal UI
    • ExpressCheckout UI
    • Changelog
  • Server SDKs
    • Server SDKs overview
  • Other tools
    • Postman collection
    • Payabli MCP
    • Example apps

© 2026 Centavo, Inc. All rights reserved | Centavo (DBA Payabli) is a registered Payment Facilitator of PNC Bank, N.A., Pittsburgh, PA. Payabli is a registered ISO/MSP of Merrick Bank, South Jordan, UT.

PayabliTest Cards & AccountsPay In StatusesPay Out StatusesTrust Center
LogoLogo
AI agentsStatus PageContact sales
APICross-product endpointsOCR

OCR a base64-encoded string

|View as Markdown|Open in Claude|
POST
/Import/ocrDocumentJson/:typeResult
POST
/api/Import/ocrDocumentJson/:typeResult
$curl -X POST https://api-sandbox.payabli.com/api/Import/ocrDocumentJson/typeResult \
> -H "requestToken: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{}'
200Successful
1{
2 "isSuccess": true,
3 "responseText": "string",
4 "responseCode": 1,
5 "responseData": {
6 "resultData": {
7 "billNumber": "string",
8 "netAmount": 1.1,
9 "billDate": "2024-01-15T09:30:00Z",
10 "dueDate": "2024-01-15T09:30:00Z",
11 "comments": "string",
12 "billItems": [
13 {
14 "itemTotalAmount": 1.1,
15 "itemTaxAmount": 1.1,
16 "itemTaxRate": 1.1,
17 "itemProductCode": "string",
18 "itemProductName": "string",
19 "itemDescription": "string",
20 "itemCommodityCode": "string",
21 "itemUnitOfMeasure": "string",
22 "itemCost": 1.1,
23 "itemQty": 1,
24 "itemMode": 1,
25 "itemCategories": [
26 "string"
27 ]
28 }
29 ],
30 "mode": 1,
31 "accountingField1": "string",
32 "accountingField2": "string",
33 "additionalData": {
34 "category": "string",
35 "currency_code": "string",
36 "type": "string",
37 "reference_number": "string"
38 },
39 "vendor": {
40 "vendorNumber": "string",
41 "name1": "string",
42 "name2": "string",
43 "ein": "string",
44 "phone": "string",
45 "email": "string",
46 "address1": "string",
47 "address2": "string",
48 "city": "string",
49 "state": "string",
50 "zip": "string",
51 "country": "string",
52 "mcc": "string",
53 "locationCode": "string",
54 "contacts": [
55 {
56 "contactEmail": "string",
57 "contactName": "string",
58 "contactPhone": "string",
59 "contactTitle": "string",
60 "additionalData": "string"
61 }
62 ],
63 "billingData": {
64 "id": 1,
65 "bankName": "string",
66 "routingAccount": "string",
67 "accountNumber": "string",
68 "typeAccount": "string",
69 "bankAccountHolderName": "string",
70 "bankAccountHolderType": "string",
71 "bankAccountFunction": 1
72 },
73 "paymentMethod": "string",
74 "vendorStatus": 1,
75 "remitAddress1": "string",
76 "remitAddress2": "string",
77 "remitCity": "string",
78 "remitState": "string",
79 "remitZip": "string",
80 "remitCountry": "string",
81 "payeeName1": "string",
82 "payeeName2": "string",
83 "customerVendorAccount": "string",
84 "internalReferenceId": 1,
85 "customField1": "string",
86 "customField2": "string",
87 "additionalData": {
88 "web": "string"
89 }
90 },
91 "endDate": "2024-01-15T09:30:00Z",
92 "frequency": "string",
93 "terms": "string",
94 "status": 1,
95 "lotNumber": "string",
96 "attachments": [
97 {
98 "ftype": "string",
99 "filename": "string",
100 "fileDescriptor": "string",
101 "furl": "string",
102 "fContent": "string"
103 }
104 ]
105 }
106 }
107}
Use this endpoint to submit a Base64-encoded image file for OCR processing. The accepted file formats include PDF, JPG, JPEG, PNG, and GIF. Specify the desired type of result (either 'bill' or 'invoice') in the path parameter `typeResult`. The response will contain the OCR processing results, including extracted data such as bill number, vendor information, bill items, and more.
Was this page helpful?
Previous

OCR PDF or image

Next

Webhooks overview

Use this endpoint to submit a Base64-encoded image file for OCR processing. The accepted file formats include PDF, JPG, JPEG, PNG, and GIF. Specify the desired type of result (either ‘bill’ or ‘invoice’) in the path parameter typeResult. The response will contain the OCR processing results, including extracted data such as bill number, vendor information, bill items, and more.

Authentication

requestTokenstring
API Key authentication via header

Path parameters

typeResultstringRequired

The type of object to create in Payabli. Accepted values are bill and invoice.

Request

This endpoint expects an object.
ftypeenumOptional

The MIME type of the file (if content is provided).

filenamestringOptional
The name of the file to be uploaded
furlstringOptional
Optional URL link to the file
fContentstringOptional

Base64-encoded file content

Response

OCR document processing result
isSuccessboolean

Boolean indicating whether the operation was successful. A true value indicates success. A false value indicates failure.

responseTextstring

Response text for operation: ‘Success’ or ‘Declined’.

responseCodeinteger

Code for the response. Learn more in API Response Codes.

responseDataobject
Details of the OCR processing result