API Basics
Pay In Endpoints
- MoneyIn
- Subscription
- TokenStorage
- Invoice
- LineItem
- PaymentLink
- PaymentMethodDomain
- HostedPaymentPages
- Cloud
- Wallet: Apple Pay
Pay Out Endpoints
- MoneyOut
- Bill
Pay Ops Endpoints
- Templates
- Boarding
- Chargebacks and ACH Returns
- Entities
- Notification
- Query
- Statistic
- Export
- Import
Object Models
- Object Model References
OCR a Base64-encoded String
Use Payabli’s optical character recognition (OCR) engine on a base64-encoded file. You can use the response data to create a new bill or invoice.
POST
/
Import
/
ocrDocumentJson
/
{typeResult}
Copy
curl --request POST \
--url https://api-sandbox.payabli.com/api/Import/ocrDocumentJson/{typeResult} \
--header 'Content-Type: application/json' \
--header 'requestToken: <api-key>' \
--data '{
"ftype": "png",
"filename": "invoice.png",
"furl": null,
"fContent": "iVBORw0KGgoAAAANSUhEUgAAAu4AAAQlCAMAAADePLi1AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZ...I="
}'
Copy
{
"isSuccess": true,
"responseText": "Success",
"responseCode": 1,
"responseData": {
"resultData": {
"billNumber": "6654477",
"netAmount": 3000.21,
"billDate": "2024-02-01T00:00:00",
"dueDate": "2024-02-29T00:00:00",
"comments": null,
"billItems": [
{
"itemTotalAmount": 3000,
"itemTaxAmount": 0,
"itemTaxRate": 0,
"itemProductCode": null,
"itemProductName": "Paper Airplane Stock",
"itemDescription": "",
"itemCommodityCode": null,
"itemUnitOfMeasure": null,
"itemCost": 3,
"itemQty": 1000,
"itemMode": null,
"itemCategories": []
}
],
"mode": 0,
"accountingField1": null,
"accountingField2": "VBGEB-46280",
"additionalData": {
"category": "Job Supplies",
"currency_code": "USD",
"type": "invoice",
"reference_number": "VBGEB-46280"
},
"vendor": {
"vendorNumber": null,
"name1": "Paul's Paper Supply",
"name2": "Paul's Paper Supply Company",
"ein": null,
"phone": "970-222-2121",
"email": null,
"address1": "123 North 1st St",
"address2": null,
"city": null,
"state": null,
"zip": null,
"country": null,
"mcc": null,
"locationCode": null,
"contacts": null,
"billingData": {
"id": 0,
"bankName": "",
"routingAccount": "",
"accountNumber": "",
"typeAccount": "",
"bankAccountHolderName": "",
"bankAccountHolderType": "Business",
"bankAccountFunction": 0
},
"paymentMethod": null,
"vendorStatus": 1,
"remitAddress1": null,
"remitAddress2": null,
"remitCity": null,
"remitState": null,
"remitZip": null,
"remitCountry": null,
"payeeName1": null,
"payeeName2": null,
"customerVendorAccount": null,
"internalReferenceId": null,
"customField1": null,
"customField2": null,
"additionalData": {
"web": "www.paulspaper.com"
}
}
},
"endDate": null,
"frequency": null,
"terms": null,
"status": 0,
"lotNumber": null,
"attachments": [
{
"ftype": "pdf",
"filename": "paulsPaper_sample Invoice.pdf",
"fileDescriptor": null,
"furl": null,
"fContent": "JVBERi0xLjcNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBl..."
}
]
}
}
Learn how to use our OCR engine to scrape documents and create : Use the OCR Engine
Authorizations
Most endpoints require an organization
token. Some endpoints require an application
token, and those endpoints are noted.
Path Parameters
The type of object to create in Payabli. Accepted values are bill
and invoice
.
Example:
"bill"
Body
Contains details about a file. See See fileObject Object Model for a complete reference.
Response
200 - application/json
Success
Was this page helpful?
Copy
curl --request POST \
--url https://api-sandbox.payabli.com/api/Import/ocrDocumentJson/{typeResult} \
--header 'Content-Type: application/json' \
--header 'requestToken: <api-key>' \
--data '{
"ftype": "png",
"filename": "invoice.png",
"furl": null,
"fContent": "iVBORw0KGgoAAAANSUhEUgAAAu4AAAQlCAMAAADePLi1AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZ...I="
}'
Copy
{
"isSuccess": true,
"responseText": "Success",
"responseCode": 1,
"responseData": {
"resultData": {
"billNumber": "6654477",
"netAmount": 3000.21,
"billDate": "2024-02-01T00:00:00",
"dueDate": "2024-02-29T00:00:00",
"comments": null,
"billItems": [
{
"itemTotalAmount": 3000,
"itemTaxAmount": 0,
"itemTaxRate": 0,
"itemProductCode": null,
"itemProductName": "Paper Airplane Stock",
"itemDescription": "",
"itemCommodityCode": null,
"itemUnitOfMeasure": null,
"itemCost": 3,
"itemQty": 1000,
"itemMode": null,
"itemCategories": []
}
],
"mode": 0,
"accountingField1": null,
"accountingField2": "VBGEB-46280",
"additionalData": {
"category": "Job Supplies",
"currency_code": "USD",
"type": "invoice",
"reference_number": "VBGEB-46280"
},
"vendor": {
"vendorNumber": null,
"name1": "Paul's Paper Supply",
"name2": "Paul's Paper Supply Company",
"ein": null,
"phone": "970-222-2121",
"email": null,
"address1": "123 North 1st St",
"address2": null,
"city": null,
"state": null,
"zip": null,
"country": null,
"mcc": null,
"locationCode": null,
"contacts": null,
"billingData": {
"id": 0,
"bankName": "",
"routingAccount": "",
"accountNumber": "",
"typeAccount": "",
"bankAccountHolderName": "",
"bankAccountHolderType": "Business",
"bankAccountFunction": 0
},
"paymentMethod": null,
"vendorStatus": 1,
"remitAddress1": null,
"remitAddress2": null,
"remitCity": null,
"remitState": null,
"remitZip": null,
"remitCountry": null,
"payeeName1": null,
"payeeName2": null,
"customerVendorAccount": null,
"internalReferenceId": null,
"customField1": null,
"customField2": null,
"additionalData": {
"web": "www.paulspaper.com"
}
}
},
"endDate": null,
"frequency": null,
"terms": null,
"status": 0,
"lotNumber": null,
"attachments": [
{
"ftype": "pdf",
"filename": "paulsPaper_sample Invoice.pdf",
"fileDescriptor": null,
"furl": null,
"fContent": "JVBERi0xLjcNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBl..."
}
]
}
}
Assistant
Responses are generated using AI and may contain mistakes.