### Install Peppyrus API Client for PHP via Composer Source: https://github.com/tigron/peppyrus-api-php/blob/main/README.md Instructions for installing the Peppyrus API client library for PHP using Composer. This is the recommended method for managing dependencies. ```bash composer require tigron/peppyrus-api-php ``` -------------------------------- ### Perform Peppol Participant Lookup Source: https://github.com/tigron/peppyrus-api-php/blob/main/README.md Example of how to look up participant capabilities in the SMP using the Peppyrus API client. This operation returns document types supported by a given participant. ```php $response = Peppyrus\Api\Peppol::lookup('iso6523-actorid-upis', '9925:be0886776275'); ``` -------------------------------- ### Get Organization Info (PHP) Source: https://context7.com/tigron/peppyrus-api-php/llms.txt Retrieves general information about the organization registered with Peppyrus. This function requires the Peppyrus API client library and a valid API key for authentication. ```php getMessage(); } ``` -------------------------------- ### Configure Peppyrus API PHP Client Source: https://context7.com/tigron/peppyrus-api-php/llms.txt Set up API authentication and optionally configure the test endpoint or logging for the Peppyrus API PHP Client. Requires the 'vendor/autoload.php' file and a valid API key. ```php setIdentificationCode('BE'); $address = (new \NumNum\UBL\Address()) ->setStreetName('Korenmarkt') ->setBuildingNumber(1) ->setCityName('Gent') ->setPostalZone('9000') ->setCountry($country); $supplierCompany = (new \NumNum\UBL\Party()) ->setName('Supplier Company Name') ->setPhysicalLocation($address) ->setPostalAddress($address); $clientCompany = (new \NumNum\UBL\Party()) ->setName('My client') ->setPostalAddress($address); $legalMonetaryTotal = (new \NumNum\UBL\LegalMonetaryTotal()) ->setPayableAmount(12) ->setAllowanceTotalAmount(0); $taxScheme = (new \NumNum\UBL\TaxScheme())->setId(0); $productItem = (new \NumNum\UBL\Item()) ->setName('Product Name') ->setDescription('Product Description'); $price = (new \NumNum\UBL\Price()) ->setBaseQuantity(1) ->setUnitCode(\NumNum\UBL\UnitCode::UNIT) ->setPriceAmount(10); $lineTaxTotal = (new \NumNum\UBL\TaxTotal())->setTaxAmount(2.1); $invoiceLine = (new \NumNum\UBL\InvoiceLine()) ->setId(0) ->setItem($productItem) ->setPrice($price) ->setTaxTotal($lineTaxTotal) ->setInvoicedQuantity(1); $taxCategory = (new \NumNum\UBL\TaxCategory()) ->setId(0) ->setName('VAT21%') ->setPercent(.21) ->setTaxScheme($taxScheme); $taxSubTotal = (new \NumNum\UBL\TaxSubTotal()) ->setTaxableAmount(10) ->setTaxAmount(2.1) ->setTaxCategory($taxCategory); $taxTotal = (new \NumNum\UBL\TaxTotal()) ->addTaxSubTotal($taxSubTotal) ->setTaxAmount(2.1); $invoice = (new \NumNum\UBL\Invoice()) ->setId(1234) ->setCopyIndicator(false) ->setIssueDate(new \DateTime()) ->setAccountingSupplierParty($supplierCompany) ->setAccountingCustomerParty($clientCompany) ->setInvoiceLines([$invoiceLine]) ->setLegalMonetaryTotal($legalMonetaryTotal) ->setTaxTotal($taxTotal); $generator = new \NumNum\UBL\Generator(); $xml_string = $generator->invoice($invoice); // Now send via Peppyrus $data = [ 'sender' => '9925:be0886776275', 'recipient' => '9925:be0886776275', 'documentType' => 'busdox-docid-qns::urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1', 'processType' => 'cenbii-procid-ubl::urn:fdc:peppol.eu:2017:poacc:billing:01:1.0', 'fileName' => 'invoice.xml', 'fileContent' => base64_encode($xml_string), ]; $response = Peppyrus\Api\Message::create($data); ``` -------------------------------- ### Peppol Search Parameters Source: https://github.com/tigron/peppyrus-api-php/blob/main/README.md Lists and describes the available parameters for searching participants in the Peppol directory via the Peppyrus API client. These parameters allow for fine-grained searching. ```text Available parameters: - query: Generic query term - participantId: Searches for exact matches in the Peppol participant identifier field (the identifier scheme must be part of the value) - name: Searches for partial matches in business entity names - country: Searches for exact matches in business entity country codes (ISO-2 code) - geoInfo: Searches for partial matches in the geographical information - identifierScheme: Searches for exact matches in the additional identifier schemes. Combine it with identifierValue for fine grained search results. - identifierValue: Searches for exact matches in the additional identifier values. Combine it with identifierScheme for fine grained search results. - contact: Searches for partial matches in the business entity contact information. It searches in all sub-fields of contact (type, name, phone number and email address). ``` -------------------------------- ### Search Participants in Peppol Directory Source: https://github.com/tigron/peppyrus-api-php/blob/main/README.md Illustrates how to search for participants in the Peppol directory using various search parameters with the Peppyrus API client. The 'query' parameter is used for a generic search term. ```php $parameters = [ 'query' => 'peppyrus' ]; $response = Peppyrus\Api\Peppol::search($parameters); ``` -------------------------------- ### PEPPOL Participant Lookup with PHP Source: https://context7.com/tigron/peppyrus-api-php/llms.txt Look up participant capabilities in the SMP (Service Metadata Publisher) to retrieve supported document types and endpoints for a given PEPPOL participant ID. This function requires a valid API key and the 'vendor/autoload.php' file. ```php getMessage(); } /* Response: Array ( [scheme] => iso6523-actorid-upis [identifier] => 9925:be0886776275 [services] => Array ( [0] => Array ( [documentType] => busdox-docid-qns::urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2::CreditNote##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1 [process] => cenbii-procid-ubl::urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 [transportProfile] => peppol-transport-as4-v2_0 [endpoint] => https://ap.peppol.tigron.be/domibus/services/msh [description] => Peppol BIS Billing UBL Credit Note V3 [contact] => support@tigron.be ) [1] => Array ( [documentType] => busdox-docid-qns::urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1 [process] => cenbii-procid-ubl::urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 [transportProfile] => peppol-transport-as4-v2_0 [endpoint] => https://ap.peppol.tigron.be/domibus/services/msh [description] => Peppol BIS Billing UBL Invoice V3 [contact] => support@tigron.be ) ) ) */ ``` -------------------------------- ### Lookup Best Match PEPPOL Participant using PHP Source: https://context7.com/tigron/peppyrus-api-php/llms.txt Finds the best matching PEPPOL participant ID in SMP based on a country code and VAT number. Requires the 'peppyrus/api-php' package and an API key. Handles exceptions if no match is found. ```php getMessage(); } ``` -------------------------------- ### Search PEPPOL Participants using PHP Source: https://context7.com/tigron/peppyrus-api-php/llms.txt Searches for participants in the PEPPOL Directory using various criteria like participant ID, name, country, or contact information. Requires the 'peppyrus/api-php' package and an API key. ```php '9925:be0886776275', ]; $response = Peppyrus\Api\Peppol::search($parameters); // Alternative search parameters: // 'query' - Generic query term // 'name' - Partial match in business entity names // 'country' - ISO-2 country code (e.g., 'BE', 'NL') // 'geoInfo' - Partial match in geographical information // 'contact' - Partial match in contact information // 'identifierScheme' - Exact match in identifier schemes // 'identifierValue' - Exact match in identifier values print_r($response); /* Response: Array ( [0] => Array ( [participant] => Array ( [scheme] => iso6523-actorid-upis [identifier] => 9925:be0886776275 ) [entities] => Array ( [0] => Array ( [name] => Array ( [0] => Array ( [name] => Tigron BV [language] => en ) ) [geoInfo] => Zaventem, Belgium [identifiers] => Array ( [0] => Array ( [scheme] => VAT [value] => 0886776275 ) ) [website] => Array ( [0] => https://www.tigron.be ) [contacts] => Array ( [0] => Array ( [type] => Technical [name] => Christophe Gosiau [phone] => +32.26090000 [email] => christophe.gosiau@tigron.be ) ) [additionalInfo] => Provided by Peppyrus.be [regDate] => 2025-05-26 ) ) ) ) */ ``` -------------------------------- ### List Messages with Filters (PHP) Source: https://context7.com/tigron/peppyrus-api-php/llms.txt Retrieves a paginated list of messages, allowing filtering by folder, sender, receiver, and confirmation status. Requires the Peppyrus API client library and an API key for authentication. ```php 'INBOX', // INBOX or OUTBOX 'sender' => '9925:be0886776275', 'perPage' => 10, 'page' => 1, 'confirmed' => 0, // 0 = unconfirmed, 1 = confirmed ]; $response = Peppyrus\Api\Message::get_list($parameters); print_r($response); ``` -------------------------------- ### Send UBL Invoice/Document via PEPPOL using PHP Source: https://context7.com/tigron/peppyrus-api-php/llms.txt Sends a UBL invoice or other document through the PEPPOL network. The document content must be base64 encoded. Requires the 'peppyrus/api-php' package and an API key. Handles exceptions during message creation. ```php ...'; // Your UBL XML content $data = [ 'sender' => '9925:be0886776275', 'recipient' => '9925:be0886776275', 'documentType' => 'busdox-docid-qns::urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1', 'processType' => 'cenbii-procid-ubl::urn:fdc:peppol.eu:2017:poacc:billing:01:1.0', 'fileName' => 'invoice.xml', 'fileContent' => base64_encode($xml_string), ]; try { $response = Peppyrus\Api\Message::create($data); print_r($response); } catch (\Exception $e) { echo "Error: " . $e->getMessage(); } ``` -------------------------------- ### Confirm Message Receipt (PHP) Source: https://context7.com/tigron/peppyrus-api-php/llms.txt Confirms the successful reception and processing of a message using its ID. This action marks the message as processed within the Peppyrus system. Requires the Peppyrus API client and an API key. Handles potential errors like 'Already confirmed' or 'Message not found'. ```php getMessage(); } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.