PHP code example of veryfi / veryfi-php
1. Go to this page and download the library: Download veryfi/veryfi-php library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
veryfi / veryfi-php example snippets
// First, include the autoload file generated by Composer
$client_id = 'your_client_id';
$client_secret = 'your_client_secret';
$username = 'your_username';
$api_key = 'your_api_key';
$veryfi_client = new Client($client_id, $client_secret, $username, $api_key);
$categories = array('Advertising & Marketing', 'Automotive');
$file = 'path_to_your_image';
$return_associative = true;
$delete_after_processing = false;
$json_response = json_decode($veryfi_client->process_document($file, $categories, $delete_after_processing), $return_associative);
$client_id = 'your_client_id';
$client_secret = 'your_client_secret';
$username = 'your_username';
$api_key = 'your_api_key';
$veryfi_client = new Client($client_id, $client_secret, $username, $api_key);
$document_id = 123456;
$parameters = array('category' => 'Meals & Entertainment',
'total' => 11.23);
$return_associative = true;
$json_response = json_decode($veryfi_client->update_document($document_id, $parameters), $return_associative);
$documents = json_decode($veryfi_client->get_documents(array(
'page' => 1,
'page_size' => 50,
'tag' => 'needs-review',
'track_total_results' => true,
)), true);
$job = json_decode($veryfi_client->process_any_document_async(array(
'file_url' => 'https://example.com/document.pdf',
'blueprint_name' => 'driver-license',
'auto_delete' => false,
)), true);
$contract = json_decode($veryfi_client->process_contract(array(
'file_url' => 'https://example.com/contract.pdf',
'max_pages_to_process' => 20,
)), true);
$markdown = json_decode($veryfi_client->process_markdown_document(array(
'file_url' => 'https://example.com/document.pdf',
'details' => true,
)), true);
$veryfi_client->update_check(123456, array('memo' => 'Invoice 1001'));
$veryfi_client->add_bank_statement_tags(123456, array('reviewed', 'approved'));
$tags = json_decode($veryfi_client->get_bank_statement_tags(123456), true);
$webhook = json_decode(
$veryfi_client->add_webhook('https://example.com/veryfi-webhook'),
true
);
$api_keys = json_decode($veryfi_client->get_api_keys(), true);
bash
composer