Foundations Apex API Developer Reference

fferpcore.ElectronicInvoicingService

global with sharing class ElectronicInvoicingService

Common functionality available for sending and receiving invoices electronically. In most circumstances, you should not have to call this directly - other APIs will provide more convenient services for using e-invoicing with particular documents.

Enums

DocumentResponseCode

The document status code will be used in document response.

Value Description
AB It indicates the Message acknowledgement.
AP It indicates that the Document Accepted.
RE It indicates that the Document Rejected.
IP It indicates that the Document is In Process.
UQ It indicates that the Document is Under Query.
CA It indicates that the Document Conditionally Accepted.
PD It indicates that the Document has been Paid.

ClarificationCode

The clarification Code when the document is rejected.

Value Description
REF It Indicates that the received document did not contain references as required by the receiver for correctly routing the document for approval or processing.
LEG It Indicates that the information in the received document is not according to legal requirements.
REC It Indicates that the party to which the document is addressed is not known.
QUA It Indicates that unacceptable or incorrect quality.
DEL It Indicates that delivery proposed or provided is not acceptable.
PRI It Indicates that prices not according to previous expectation.
QTY It Indicates that quantity not according to previous expectation.
ITM It Indicates that items not according to previous expectation.
PAY It Indicates that payment terms not according to previous expectation.
UNR It Indicates that commercial transaction not recognized.
FIN It Indicates that finance terms not according to previous expectation.
OTH It Indicates that reason for status is not defined by code.

ClarificationCodeType

The clarification code type when a document is rejected or under query.

Value Description
OPStatusReason Indicates the clarification is a reason (why was the document rejected/queried).
OPStatusAction Indicates the clarification is an action (what should the supplier do next).

DocumentType

The types of document supported by e-invoicing.

Value Description
INVOICE An invoice to be paid by the recipient.
CREDIT_NOTE A credit note reflecting a credit to the recipient.

Source

The source the invoice was received from.

Incoterms

Incoterms codes defining the delivery terms. EXW – Ex Works: The seller must give the buyer access to goods at an agreed location. From that moment, the buyer bears almost all costs and risks during the entire shipping process. FCA – Free Carrier The seller must make the goods available at his own risk and expense at his own premises or at an agreed place. In both cases, the seller is responsible for the clearance of the goods for export. It can be agreed that the buyer must instruct the carrier to transfer a “Bill of Lading (BL)” with a note on board to the seller. CPT – Carriage Paid To The seller has the same responsibilities as with FCA, but in this case also pays the delivery costs. CIP – Carriage Insurance Paid To The same seller responsibilities as with CPT, only in this case the seller is obliged to pay the insurance with a high coverage ratio. Parties can agree separately to apply limited coverage. DAP – Delivered At Place The seller bears the costs and risks during the transport of the goods to an agreed address. As soon as the goods have arrived at this address and are ready for unloading, the risk passes to the buyer. DPU – Delivered at Place Unloaded The seller is responsible for the costs and risks of delivering goods to an agreed destination where goods can be unloaded for further transport. The selling party arranges customs and unloads the goods at the agreed place. The buyer arranges the customs clearance and any associated rights. DDP – Delivered Duty Paid The seller bears the costs and risks of transport, carries out the export and import responsibilities and pays any import duties. As soon as the goods have arrived at the address and are ready for unloading, the risk passes to the buyer. FAS – Free Alongside Ship The seller bears all costs and risks until the goods are delivered next to the ship. From that point, the risk is for the buyer and he also arranges the export clearance and import clearance. FOB – Free On Board The seller bears all costs and risks until the goods are on board the ship and also arranges the export clearance. As soon as the goods have been delivered to the ship, the buyer bears all responsibilities. CFR – Cost And Freight The same applies to the seller and buyer as with FOB, but in this case, the seller must also pay for the transport of the goods to the port. CIF – Cost, Insurance, and Freight The seller has the same obligations as with CFR but also pays the (minimum) insurance costs. The buyer must pay for more comprehensive insurance.

Methods

send

global static fferpcore.ElectronicInvoicingService.SendResponse send(List<fferpcore.ElectronicInvoicingService.Document> documents)

Sends the given documents as electronic invoices. This will make callouts, so no DML can be performed in the same execution context before calling this method. Due to Salesforce limits around making callouts, it is possible that not all the requested documents will be sent. Documents that have not been sent will be returned on the response and will need to be processed in a separate execution context.

Input Parameters

Name Type Description
documents List<fferpcore.ElectronicInvoicingService.Document> The documents that will be sent via e-invoicing.

Return Value

An object containing information about the execution of the request.

notifyDocumentResponse

global static List<fferpcore.ElectronicInvoicingService.DocumentUpdateNotificationResponse> notifyDocumentResponse(List<fferpcore.ElectronicInvoicingService.DocumentResponse> documentResponses)

Sends the document updates to e-invoice provider. This will notify e-invoice provider about the status of documents.

Input Parameters

Name Type Description
documentResponses List<fferpcore.ElectronicInvoicingService.DocumentResponse> The document updates that will be sent to e-invoice provider.

Return Value

A list of objects containing responses received for each document update notification sent to e-invoice provider.

sendAsync

global static fferpcore.ElectronicInvoicingService.SendAsyncResponse sendAsync(List<fferpcore.ElectronicInvoicingService.Document> documents)

Sends the given documents as electronic invoices asynchronously. This uses a Queueable to start the process.

Input Parameters

Name Type Description
documents List<fferpcore.ElectronicInvoicingService.Document> The documents that will be sent via e-invoicing.

Return Value

An object containing the ID of the AsyncApexJob started by this method.

getProviderName

global static String getProviderName()

Returns the name of the connector configured for this service.

Return Value

A string containing the name of the connector used for this service.

validateConnection

global static fferpcore.ElectronicInvoicingService.ValidationResponse validateConnection()

Returns information about the validity of the connector. For example if the connector setup is correct.

Return Value

An object containing information about the validity of the connector, and whether there are any errors associated with it.

testConnection

global static fferpcore.ElectronicInvoicingService.ValidationResponse testConnection(fferpcore.ElectronicInvoicingService.TestConnectionRequest testRequest)

Returns information about the validity of the connector. For example if the connector's URL and API key are correct.

Return Value

An object containing information about the validity of the connector, and whether there are any errors associated with it.

sendPaymentReceivedNotification

global static fferpcore.ElectronicInvoicingService.PaymentReceivedNotificationResponse sendPaymentReceivedNotification(String externalInvoiceGuid, Map<String, Object> extraParameters)

Sends a payment_received_notification to the e-invoice provider for the given invoice submission GUID, triggering an Encaissée (payment received) lifecycle event.

Input Parameters

Name Type Description
externalInvoiceGuid String The GUID of the original invoice document submission.
extraParameters Map<String, Object> Reserved for future Storecove API extensions. Not currently forwarded to Storecove — always pass null until a future release documents supported keys.

Return Value

An object indicating success or failure with an error message on failure.

fferpcore.ElectronicInvoicingService.DocumentResponse

global with sharing class DocumentResponse

The document update to send to e-invoice provider.

Properties

Name Type Description
guid String guid for the document
message String The message that is attached to document
statusCode fferpcore.ElectronicInvoicingService.DocumentResponseCode status code for the document
effectiveDate Date The date when the status became effective.
clarificationCode fferpcore.ElectronicInvoicingService.ClarificationCode The clarification Code when the document is rejected.
clarificationCodeType fferpcore.ElectronicInvoicingService.ClarificationCodeType The clarification code type when the document is rejected. Determines whether the clarification is a reason (OPStatusReason) or an action (OPStatusAction). Defaults to OPStatusReason in the connector when not set.

Methods

DocumentResponse

global DocumentResponse()

Contructs a DocumentResponse with nothing set.

fferpcore.ElectronicInvoicingService.Document

global with sharing class Document

An invoice or credit note.

Properties

Name Type Description
AccountingCostCentre String Text identifying the customer’s accounting cost centre for this document.
AccountingSupplierParty fferpcore.ElectronicInvoicingService.AccountingSupplierParty The person or company who is issuing this document.
AccountingCustomerParty fferpcore.ElectronicInvoicingService.AccountingCustomerParty The person or company who should receive this document.
InvoiceeParty fferpcore.ElectronicInvoicingService.InvoiceeParty The party to whom the invoice is issued, where this differs from the customer receiving the document. (FR-FE BG-04)
BuyerAgentParty fferpcore.ElectronicInvoicingService.BuyerAgentParty The agent party acting on behalf of the buyer (FR-FE BG-01).
PayerParty fferpcore.ElectronicInvoicingService.PayerParty The party responsible for paying the invoice (FR-FE BG-02).
InvoicerParty fferpcore.ElectronicInvoicingService.InvoicerParty The party issuing the invoice on behalf of the supplier (FR-FE BG-05).
SalesAgentParty fferpcore.ElectronicInvoicingService.SalesAgentParty The sales agent party acting on behalf of the seller (FR-FE BG-03).
PayeeParty fferpcore.ElectronicInvoicingService.PayeeParty The party to whom the payment is made.
AllowanceCharges List<fferpcore.ElectronicInvoicingService.AllowanceCharge> Additional charges or allowances that are applicable to the document as a whole.
References List<fferpcore.ElectronicInvoicingService.Reference> References to other documents related to this invoice.
FrEReport fferpcore.ElectronicInvoicingService.FREReport The French e-reporting (FRE report) payload for this document, when applicable.
Note: this placement is provisional. The FREReport classes mirror Storecove's `frEReport` submission, which is not the same shape as this Document, our provider-agnostic internal format - an e-report is a periodic declaration rather than an invoice. It is carried here only so that the existing send pipeline can route it, and it is expected to be modelled properly once the e-reporting API is settled.
DocumentTotal Decimal The total value of the document, including the tax. This is specified separately so that rounding differences can be taken into account. If this does not equal the sum of the line net values and the tax amounts, the difference will be included on the e-invoice so that it can be taken into account by the receiver.
Attachments List<fferpcore.ElectronicInvoicingService.Attachment> Additional files to send with the document. Check with your e-invoicing provider for their limits on what can be sent.
CreatePrimaryImage Boolean Set to true to automatically include a PDF copy of the document, if one is not already present in the Attachments.
BillingReference String Reference to a previous document that is being corrected by this one.
ConsumerTaxMode Boolean Set to 'true' to use tax identifier for the sender from the receiver's country, rather than the default. Check with your e-invoicing provider before using this mode.
ContractDocumentReference String Reference to a contract to which this document relates, if one exists.
Delivery fferpcore.ElectronicInvoicingService.Delivery Information about where and when the goods or services being invoiced were delivered.
DeliveryAddress fferpcore.ElectronicInvoicingService.PostalAddress The address to which the supplied goods or services were delivered.
CustomerReference String A reference to allow the customer to identify this document.
DocumentCurrencyCode String Currency in which all monetary amounts in this document are expressed.
DocumentDate Date Date on which the document was created.
DocumentLines List<fferpcore.ElectronicInvoicingService.DocumentLine> Breakdown of the individual charges or credits that make up this document.
DocumentIdentifier String Unique identifier for the document, in the form of a UUID. If the same document is re-sent, the DocumentIdentifier must be the same.
DocumentType fferpcore.ElectronicInvoicingService.DocumentType Whether this is an invoice or a credit note. A negative invoice is equivalent to a positive credit note.
DueDate Date When the document is due to be paid.
InvoiceNumber String Sequential number identifying the document.
InvoicePeriod fferpcore.ElectronicInvoicingService.InvoicePeriod The period of time for which the document is being charged.
IssueDate Date Date when the document was sent to the customer.
IssueTime String Time when the document was issued (HH:MM:SS format). As an Storecove requirement it must match this regex: ^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$ See the Storecove documentation for more details: https://www.storecove.com/docs#_openapi_invoice
TimeZone String Time zone offset to apply to the document issue date if provided. Must follow Storecove documentation pattern: ±zzzz format (e.g. +0100 or -0900). As an Storecove requirement it must match this regex: ^[+-]\d{4}$ See the Storecove documentation for more details: https://www.storecove.com/docs#_openapi_invoice
LegalEntityId String Identifies the legal entity issuing this document.
Note String DEPRECATED by Storecove - use Notes instead. Populated on receive when the wire delivers the deprecated singular note field. Independent of Notes.
Notes List<String> Free text notes to add to the document.
PaymentMeans List<fferpcore.ElectronicInvoicingService.PaymentMeans> Instructions for how to pay this document.
PaymentTerms fferpcore.ElectronicInvoicingService.PaymentTerms Terms governing payment for this document.
PayableRoundingAmount Decimal The difference between the invoice total and the sum of the invoice lines.
AmountIncludingTax Decimal The total invoice amount payable, including tax. This is equal to the sum of the invoice_lines (amount_excluding_tax + tax.amount)
PrepaidAmount Decimal How much has already been paid toward this document, if anything.
ProjectReference String Reference to the project to which this document relates, if one exists.
Routing fferpcore.ElectronicInvoicingService.Routing Where the e-invoice is to be sent.
CustomerOrderReference String The customer's reference for the order to which this document relates, if one exists.
SalesOrderId String The seller's reference for the order to which this document relates, if one exists.
TaxPointDate Date Date used for calculating tax, if different from the document date.
TaxSubtotals List<fferpcore.ElectronicInvoicingService.TaxSubtotal> The subtotals for each different tax applied to this document. If not specified, it will be worked out automatically from the taxes on the document lines and allowances/charges.
UblExtensions List<String> UBL extensions for this document.
Source fferpcore.ElectronicInvoicingService.Source The source the invoice was received from.
ExternalKey String Used for accountants. The id you specified for the organization.
ExternalUserId String Used for the embedded portal retrieval service. The external_user_id you provided when the ShopAccount was created.
TaxSystem String The tax system of the document.
TaxAuthorityId String Identifier assigned by the relevant tax authority to this document, when one exists. Carried for received invoices from country-specific tax authorities (e.g. Poland KSeF).
UblString String The ubl file String of the document.
DocumentEntityType String The type of entities the document is sent from/to: b2b (business-to-business), or b2c (business-to-consumer).
InvoiceTypeCode String The invoice type code (BT-3 in EN 16931), expressed as a UNTDID 1001 code (e.g. 380 for a commercial invoice). Required by the French e-invoicing mandate.
CreditNoteTypeCode String The credit note type code (BT-3 in EN 16931), expressed as a UNTDID 1001 code (e.g. 381 for a credit note). Required by the French e-invoicing mandate.
FrCadreDeFacturation String The invoicing framework code ("cadre de facturation", BT-23 / TT-28) identifying the transaction context (e.g. B1 for standard goods). Required by the French e-invoicing mandate.

Methods

Document

global Document()

Constructs a document. List properties are initialised to an empty list, all other properties begin as null.

fferpcore.ElectronicInvoicingService.AccountingSupplierParty

global with sharing class AccountingSupplierParty

A person or company capable of sending e-invoices.

Properties

Name Type Description
ContactName String Name of an individual within a company.
ContactFirstName String First Name of an individual within a company.
ContactSecondName String Last Name of an individual within a company.
EmailAddress String The email address by which this party can be contacted.
Telephone String The telephone number by which this party can be contacted.
City String The city.
Country String The country.
County String The county.
Department String The department who sent the invoice.
Identifiers List<fferpcore.ElectronicInvoicingService.Endpoint> The array of identifiers for this sender.
Line1 String The address
Line2 String The address, line 2
PartyName String The party who sent the invoice.
LegalName String The Legal Name of the party who sent the document
ClassificationCode String The classification code of the party who sent the document. Pattern : "^[0-9]{5}$"
AdditionalLegalInformation String Additional legal information relevant for the party who sent the document. Maximal length : 512
RegistrationAuthorityName String The registration authority name of the party who sent the document.
PassportIssuingCountry String The passport issuing country of the party who sent the document.
BuildingNumber String Building Number of the party who sent the document
SecondaryNumber String Secondary Number of the party who sent the document
Neighborhood String Neighborhood of the party who sent the document
Zip String The zip code.

Methods

AccountingSupplierParty

global AccountingSupplierParty()

Constructs a party with no fields set.

fferpcore.ElectronicInvoicingService.AccountingDetail

global with sharing class AccountingDetail

The accounting details for the invoice line.

Properties

Name Type Description
Code String The the code of the general ledger account.
Name String A textual description of the code.

Methods

AccountingDetail

global AccountingDetail()

Constructs a accountingDetail with no fields set.

fferpcore.ElectronicInvoicingService.AccountingCustomerParty

global with sharing class AccountingCustomerParty

A person or company capable of receiving e-invoices.

Properties

Name Type Description
AccountId String Id of the customer Account assigned by the seller.
CompanyName String Name of the company.
ContactId String Id of an individual contact within a company.
ContactName String Name of an individual within a company.
EmailAddress String The email address by which this party can be contacted.
PublicIdentifiers List<fferpcore.ElectronicInvoicingService.Endpoint> Unique identifiers that can be used by the e-invoicing network to identify the party.
PostalAddress fferpcore.ElectronicInvoicingService.PostalAddress Physical address of the party.
Telephone String The telephone number by which this party can be contacted.
CustomerId String Id of the customer assigned by the seller.
RegistrationName String The registration name of the customer. Minimum length : 2
ClassificationCode String The classification code of the customer. Pattern : "^[0-9]{5}$"
AdditionalLegalInformation String Additional legal information relevant for the customer. Maximal length : 512
RegistrationAuthorityName String The registration authority name of the customer.
PassportIssuingCountry String The passport issuing country of the customer.

Methods

AccountingCustomerParty

global AccountingCustomerParty()

Constructs a party with an empty list of endpoints. All other properties begin as null.

fferpcore.ElectronicInvoicingService.InvoiceeParty

global with sharing class InvoiceeParty

The party to whom the invoice is issued, where this differs from the customer. (FR-FE BG-04)

Properties

Name Type Description
Party fferpcore.ElectronicInvoicingService.ReceiverParty The party to whom the invoice is issued.
PublicIdentifiers List<fferpcore.ElectronicInvoicingService.Endpoint> Unique identifiers that can be used by the e-invoicing network to identify the party.

Methods

InvoiceeParty

global InvoiceeParty()

Constructs an InvoiceeParty with an empty list of endpoints. All other properties begin as null.

fferpcore.ElectronicInvoicingService.BuyerAgentParty

global with sharing class BuyerAgentParty

The agent party acting on behalf of the buyer (FR-FE BG-01).

Properties

Name Type Description
Party fferpcore.ElectronicInvoicingService.ReceiverParty The party details.
PublicIdentifiers List<fferpcore.ElectronicInvoicingService.Endpoint> Unique identifiers that can be used by the e-invoicing network to identify the party.

Methods

BuyerAgentParty

global BuyerAgentParty()

Constructs a party with an empty list of endpoints. All other properties begin as null.

fferpcore.ElectronicInvoicingService.PayerParty

global with sharing class PayerParty

The party responsible for paying the invoice (FR-FE BG-02).

Properties

Name Type Description
Party fferpcore.ElectronicInvoicingService.ReceiverParty The party details.
PublicIdentifiers List<fferpcore.ElectronicInvoicingService.Endpoint> Unique identifiers that can be used by the e-invoicing network to identify the party.

Methods

PayerParty

global PayerParty()

Constructs a party with an empty list of endpoints. All other properties begin as null.

fferpcore.ElectronicInvoicingService.InvoicerParty

global with sharing class InvoicerParty

The party issuing the invoice on behalf of the supplier (FR-FE BG-05).

Properties

Name Type Description
Party fferpcore.ElectronicInvoicingService.ReceiverParty The party details.
PublicIdentifiers List<fferpcore.ElectronicInvoicingService.Endpoint> Unique identifiers that can be used by the e-invoicing network to identify the party.

Methods

InvoicerParty

global InvoicerParty()

Constructs a party with an empty list of endpoints. All other properties begin as null.

fferpcore.ElectronicInvoicingService.SalesAgentParty

global with sharing class SalesAgentParty

The sales agent party acting on behalf of the seller (FR-FE BG-03).

Properties

Name Type Description
Party fferpcore.ElectronicInvoicingService.ReceiverParty The party details.
PublicIdentifiers List<fferpcore.ElectronicInvoicingService.Endpoint> Unique identifiers that can be used by the e-invoicing network to identify the party.

Methods

SalesAgentParty

global SalesAgentParty()

Constructs a party with an empty list of endpoints. All other properties begin as null.

fferpcore.ElectronicInvoicingService.PayeeParty

global with sharing class PayeeParty

The party to whom the payment is made.

Properties

Name Type Description
Party fferpcore.ElectronicInvoicingService.ReceiverParty The party details.
PublicIdentifiers List<fferpcore.ElectronicInvoicingService.Endpoint> Unique identifiers that can be used by the e-invoicing network to identify the party.

Methods

PayeeParty

global PayeeParty()

Constructs a party with an empty list of endpoints. All other properties begin as null.

fferpcore.ElectronicInvoicingService.AllowanceCharge

global with sharing class AllowanceCharge

A discount or surcharge. Should be negative for discounts.

Properties

Name Type Description
NetValue Decimal Amount being charged, net of tax.
Reason String Text describing the reason for the charge or discount.
ReasonCode String Coded reason for the charge or discount (Peppol BIS, UNCL5189).
TaxExemptionReason String Free-text reason why tax on this charge or discount is exempt or zero-rated (FR-FE EXT-FR-FE-187/189).
TaxExemptionReasonCode String Coded reason (VATEX code) why tax on this charge or discount is exempt or zero-rated (FR-FE EXT-FR-FE-188/190).
TaxBreakdown List<fferpcore.ElectronicInvoicingService.Tax> Taxes applicable to this charge or discount.

Methods

AllowanceCharge

global AllowanceCharge()

Constructs an AllowanceCharge with an empty list of TaxBreakdown. All other properties begin as null.

fferpcore.ElectronicInvoicingService.Attachment

global with sharing class Attachment

Files that can be attached to the document.

Properties

Name Type Description
Document String The contents of the attachment, using base64 encoding.
Filename String The name of the file being attached.
MimeType String The format of the attachment. Check with your e-invoicing provider for which types are supported.
PrimaryImage Boolean If true, indicates that this attachment is a visual copy of the document.

Methods

Attachment

global Attachment()

Constructs an Attachment with no fields set.

fferpcore.ElectronicInvoicingService.Delivery

global with sharing class Delivery

Information about what has been or will be delivered for this document.

Properties

Name Type Description
ActualDate Date The date on which the delivery takes or took place.
Location fferpcore.ElectronicInvoicingService.Location Codes for quick identification of a location, for example a Global Location Number.
Quantity Decimal The quantity that has been or will be delivered.
PartyName String The party the goods/services were delivered to.
DeliveryParty fferpcore.ElectronicInvoicingService.DeliveryParty Information about the party responsible for the delivery.
DeliveryLocation fferpcore.ElectronicInvoicingService.DeliveryLocation Specific location where goods were delivered (may be different from delivery party address).
Shipment fferpcore.ElectronicInvoicingService.Shipment Information about the shipment including origin and charges.
DeliveryPeriod fferpcore.ElectronicInvoicingService.InvoicePeriod The requested delivery period for the goods/services. Pattern : "^[0-9]{4}-[0-9]{2}-[0-9]{2} - [0-9]{4}-[0-9]{2}-[0-9]{2}$"
DeliveryTerms fferpcore.ElectronicInvoicingService.DeliveryTerms Terms of delivery including incoterms.

Methods

Delivery

global Delivery()

Constructs a Delivery with no fields set.

fferpcore.ElectronicInvoicingService.ReceiverParty

global with sharing class ReceiverParty

Properties

Name Type Description
CompanyName String
ClassificationCode String The classification code of the company transporting the invoice. Pattern : "^[0-9]{5}$"
RegistrationName String
AdditionalLegalInformation String Additional legal information relevant for the Seller. Maximal length : 512
RegistrationAuthorityName String The registration authority name of the party.
PassportIssuingCountry String The passport issuing country of the party.
Address fferpcore.ElectronicInvoicingService.PostalAddress Address of the party.
ContactDetails fferpcore.ElectronicInvoicingService.InvoiceContactDetails Contact details of the person to whom the invoice is sent.

Methods

ReceiverParty

global ReceiverParty()

Constructs a ReceiverParty with no fields set.

fferpcore.ElectronicInvoicingService.InvoiceContactDetails

global with sharing class InvoiceContactDetails

Properties

Name Type Description
FirstName String First Name of an individual within a company.
LastName String Last Name of an individual within a company.
EmailAddress String The email address by which this party can be contacted.
Telephone String The telephone number by which this party can be contacted.

Methods

InvoiceContactDetails

global InvoiceContactDetails()

Constructs a InvoiceContactDetails with no fields set.

fferpcore.ElectronicInvoicingService.DeliveryLocation

global with sharing class DeliveryLocation

Properties

Name Type Description
Id String Identifier for the location.
LocationName String Name of the location.
SchemeId String ID of the agency that issues the Id (e.g. 'ZZZ')
Address fferpcore.ElectronicInvoicingService.PostalAddress Address of the party.

Methods

DeliveryLocation

global DeliveryLocation()

Constructs a DeliveryLocation with no fields set.

fferpcore.ElectronicInvoicingService.DeliveryParty

global with sharing class DeliveryParty

Code for a party involved in a delivery.

Properties

Name Type Description
Party fferpcore.ElectronicInvoicingService.ReceiverParty The party the goods/services were delivered to.
PublicIdentifiers List<fferpcore.ElectronicInvoicingService.Endpoint> Unique identifiers that can be used by the e-invoicing network to identify the party.

Methods

DeliveryParty

global DeliveryParty()

Constructs a DeliveryParty with an empty list of endpoints. All other properties begin as null.

fferpcore.ElectronicInvoicingService.Reference

global with sharing class Reference

Reference to another document related to this invoice or invoice line.

Properties

Name Type Description
DocumentType String The type of the referenced document (e.g., 'Contract', 'Order', 'Delivery Note').
DocumentId String Identifier for the referenced document.
DocumentDescription String Description of the referenced document.
IssueDate Date Issue date of the referenced document. Pattern : "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
DocumentIdListId String List identifier for the document ID (used for invoice line references).
DocumentTypeCode String Code describing the type of the referenced document.
LineId String Identifier of the line within the referenced document.
DocumentUuid String Universally unique identifier of the referenced document.
DocumentIdSchemeId String Identifier of the scheme used for the referenced document ID.
DocumentIdSchemeAgencyId String Identifier of the agency that maintains the scheme used for the referenced document ID.
DocumentIdSchemeVersionId String Version of the scheme used for the referenced document ID.
DocumentIdListAgencyId String Identifier of the agency that maintains the list used for the referenced document ID.
DocumentIdListVersionId String Version of the list used for the referenced document ID.

Methods

Reference

global Reference()

Constructs a DocumentReference with no fields set.

fferpcore.ElectronicInvoicingService.Location

global with sharing class Location

Codes for quick identification of a location, for example a Global Location Number.

Properties

Name Type Description
Id String Identifies the location.
SchemeAgencyId String ID of the agency that issues the Id (e.g. 'ZZZ')
SchemeId String The scheme that the Id conforms to (e.g. 'EAN')
City String Address city.
Country String Address country.
County String Address county.
Line1 String Address line 1.
Line2 String Address line 2.
Zip String Address zip code
BuildingNumber String Address Building Number
SecondaryNumber String Address Secondary Number
Neighborhood String Address Neighborhood
Department String Department name.

Methods

Location

global Location()

Constructs a Location with no fields set.

fferpcore.ElectronicInvoicingService.Shipment

global with sharing class Shipment

Information about the shipment including origin and additional charges.

Properties

Name Type Description
OriginAddress fferpcore.ElectronicInvoicingService.PostalAddress Address where the shipment originated from.
AllowanceCharges List<fferpcore.ElectronicInvoicingService.AllowanceCharge> Additional charges related to the shipment.

Methods

Shipment

global Shipment()

Constructs a Shipment with empty lists.

fferpcore.ElectronicInvoicingService.DeliveryTerms

global with sharing class DeliveryTerms

Terms of delivery including incoterms and other delivery conditions.

Properties

Name Type Description
Incoterms fferpcore.ElectronicInvoicingService.Incoterms Incoterms code defining the delivery terms (e.g. 'EXW', 'FOB', 'CIF').
DeliveryLocationId String Specific location identifier for delivery terms.
SpecialTerms String Special terms or conditions for the delivery.

Methods

DeliveryTerms

global DeliveryTerms()

Constructs a DeliveryTerms with no fields set.

fferpcore.ElectronicInvoicingService.Endpoint

global with sharing class Endpoint

A unique identifier for an Endpoint on the e-invoicing network, to allow routing of documents to the correct place.

Properties

Name Type Description
Id String Identifier for an Endpoint. This may be in one of many formats, as described by the scheme.
Scheme String Identifies the type of id that describes the company. Valid values can be obtained from your e-invoicing provider.
SuperScheme String The Superscheme of the identifier.
SchemeNumeric String The SchemeNumeric of the identifier.

Methods

Endpoint

global Endpoint(String id, String scheme)

Constructs an Endpoint. All arguments are required.

Input Parameters

Name Type Description
id String Identifier for an Endpoint. This may be in one of many formats, as described by the scheme.
scheme String Scheme that describes how the id is to be interpreted, e.g. as a VAT Id.

Endpoint

global Endpoint(String id, String scheme, String superScheme, String schemeNumeric)

Constructs an Endpoint. All arguments are required.

Input Parameters

Name Type Description
id String Identifier for an Endpoint. This may be in one of many formats, as described by the scheme.
scheme String Scheme that describes how the id is to be interpreted, e.g. as a VAT Id.
superScheme String The Superscheme of the identifier.
schemeNumeric String The SchemeNumeric of the identifier.

Endpoint

global Endpoint()

Constructs a Endpoint with no fields set.

fferpcore.ElectronicInvoicingService.PaymentMeans

global with sharing class PaymentMeans

Instructions for how to pay this document.

Properties

Name Type Description
Account String The bank account number.
BranchCode String SWIFT or BIC code used to identify the bank. Not required if using an IBAN number for the Account.
Code String Identifies the type of payment being used. Different types of payment will require different information. Consult your e-invoicing provider for the available values, and what data is needed in each case.
Holder String Name of the holder of the bank account.
Mandate String Direct debit mandate code, if paying by direct debit.
Network String Name of the card or other payment network, e.g. VISA, PayPal.
PaymentId String ID to be used when paying that you can use to associate the payment with the document.

Methods

PaymentMeans

global PaymentMeans()

Constructs a new PaymentMeans with no fields set.

fferpcore.ElectronicInvoicingService.PaymentTerms

global with sharing class PaymentTerms

The terms under which a document is to be paid.

Properties

Name Type Description
Note String Text describing the payment terms.

Methods

PaymentTerms

global PaymentTerms()

Constructs a new PaymentTerms with no fields set.

fferpcore.ElectronicInvoicingService.PostalAddress

global with sharing class PostalAddress

A physical address that can receive post.

Properties

Name Type Description
AddressLine1 String Street Address / P.O Box / Company Name.
AddressLine2 String Apartment Suite / Unit / Building / Floor.
CityName String Town / City.
County String County / state / province / region.
Country String Name of the country.
CountryIdentificationCode String Code for the country, taken from the ISO 3166-1 alpha-2 standard list.
PostalCode String ZIP / Postal code for the area.

Methods

PostalAddress

global PostalAddress()

Constructs a postal address with no fields set.

fferpcore.ElectronicInvoicingService.Routing

global with sharing class Routing

Information used to deliver the document to the recipient. The EIdentifiers will be used by preference, to send the document across the electronic invoicing network. If the recipient cannot receive e-invoices in this way, the document will be sent to the specified emails.

Properties

Name Type Description
EIdentifiers List<fferpcore.ElectronicInvoicingService.Endpoint>
Emails List<String>
Networks List<fferpcore.ElectronicInvoicingService.Network>

Methods

Routing

global Routing()

Constructs a Routing with empty lists of EIdentifiers, Emails, and Networks.

fferpcore.ElectronicInvoicingService.Network

global with sharing class Network

Represents a network configuration for e-invoice routing.

Properties

Name Type Description
Application String The application name for the network.
Settings fferpcore.ElectronicInvoicingService.Settings Settings for the network configuration.

Methods

Network

global Network()

Constructs a Network with no fields set.

fferpcore.ElectronicInvoicingService.Settings

global with sharing class Settings

Settings for network configuration.

Properties

Name Type Description
Enabled Boolean Whether the network is enabled.
Mock Boolean Whether the network is in mock mode.

Methods

Settings

global Settings()

Constructs a Settings with no fields set.

fferpcore.ElectronicInvoicingService.TaxSubtotal

global with sharing class TaxSubtotal

Describes the total amount charged for a particular tax across an entire document.

Properties

Name Type Description
TaxCode String Code identifying the tax being applied.
CountryIdentificationCode String Code for the country levying the tax, taken from the ISO 3166-1 alpha-2 standard list.
Percent Decimal Rate used to calculate the tax.
Amount Decimal Amount payable for this tax.
TaxableAmount Decimal The amount that is being taxed.
Tax fferpcore.ElectronicInvoicingService.Tax Constructs a Tax with no fields set.

Methods

TaxSubtotal

global TaxSubtotal()

Constructs a TaxSubtotal with no fields set.

fferpcore.ElectronicInvoicingService.DocumentLine

global with sharing class DocumentLine

An individual line on an invoice or credit note, corresponding to a single charge or credit.

Properties

Name Type Description
AccountingCostCentre String Text identifying the customer’s accounting cost centre for this document line.
AccountingDetail fferpcore.ElectronicInvoicingService.AccountingDetail Accounting detail for the document line.
AdditionalItemProperties List<fferpcore.ElectronicInvoicingService.AdditionalItemProperty> Additional information about this document line that does not belong in any other field.
References List<fferpcore.ElectronicInvoicingService.Reference> References to other documents related to this invoice line.
Notes List<String> Free text notes to add to the document line.
CustomerItemIdentification String ID used by the customer to identify the product or service.
Delivery fferpcore.ElectronicInvoicingService.Delivery Delivery information for the product on this line.
DeliveryAddress fferpcore.ElectronicInvoicingService.PostalAddress The address to which the supplied goods or services were delivered.
Description String Description providing additional information about the line.
DiscountAmount Decimal Total Amount of any discount applied to this line.
AmountExcludingTax Decimal The amount excluding Tax. This is equal to quantity x price_amount + ∑ allowance_charges.
ItemName String Name of the product or service being charged for.
LineId String Identifier for the line. Must be unique within the document.
NetValue Decimal Amount being charged, net of tax.
OrderLineReferenceLineId String A reference to the order line to which this document line relates.
Period fferpcore.ElectronicInvoicingService.InvoicePeriod Period of time over which the product or service being charged for was supplied.
Quantity Decimal How many units (see UnitCode) are being charged for.
SellersItemIdentification String ID used by the seller to identify the product or service.
StandardItemIdentification String A code identifying the product or service, taken from a standardized code as specified in StandardItemIdentificationSchemeId.
StandardItemIdentificationSchemeAgencyId String ID of the agency that issues the StandardItemIdentification.
StandardItemIdentificationSchemeId String The scheme that the StandardItemIdentification conforms to, e.g. GTIN.
TaxBreakdown List<fferpcore.ElectronicInvoicingService.Tax> Taxes applicable to this line.
UnitCode String Code describing the unit by which quantity is measured, e.g. kg or cm Codes can be taken from UN/ECE Recommendation 20, or an 'X' followed by a code from UN/ECE Recommendation 21.
UnitPrice Decimal The price charged per unit of this product (unit defined in the UnitCode field).
BaseQuantity Decimal The number of items the price is for.
AllowanceCharges List<fferpcore.ElectronicInvoicingService.AllowanceCharge> Additional charges or allowances that are applicable to the document line as a whole.

Methods

DocumentLine

global DocumentLine()

Constructs a document line. List properties are initialised to an empty list, all other properties begin as null.

fferpcore.ElectronicInvoicingService.AdditionalItemProperty

global with sharing class AdditionalItemProperty

An additional property for a document line that isn't already specified elsewhere.

Properties

Name Type Description
name String The name identifying the property.
value String The value of this property.
nameCode String The code identifying the measured property (FR-FE EXT-FR-FE-159).
valueQuantity String The numeric value of the measurement (FR-FE EXT-FR-FE-160).
valueQuantityUnitCode String The unit code for the valueQuantity (FR-FE EXT-FR-FE-161).

Methods

AdditionalItemProperty

global AdditionalItemProperty()

Constructs an empty AdditionalItemProperty. Use the setters to populate either the textual form (name, value) or the coded-measurement form (nameCode, valueQuantity, valueQuantityUnitCode).

AdditionalItemProperty

global AdditionalItemProperty(String name, String value)

Constructs an AdditionalItemProperty

Input Parameters

Name Type Description
name String The name identifying the property.
value String The value of this property.

fferpcore.ElectronicInvoicingService.InvoicePeriod

global with sharing class InvoicePeriod

The period for which a document or line is being charged.

Properties

Name Type Description
EndDate Date The end of the period.
StartDate Date The start of the period.

Methods

InvoicePeriod

global InvoicePeriod()

InvoicePeriod

global InvoicePeriod(Date startDate, Date endDate)

Constructs an invoice period. The start date must be less than or equal to the end date.

Input Parameters

Name Type Description
startDate Date The start of the period.
endDate Date The end of the period.

fferpcore.ElectronicInvoicingService.Tax

global with sharing class Tax

Describes a tax charged on a document line.

Properties

Name Type Description
Amount Decimal Amount payable for this tax.
Percent Decimal Rate used to calculate the tax.
TaxCode String Tax Category code
Type String Rate used to calculate the tax.
LineItemTaxCode String Code identifying the tax being applied.
CountryIdentificationCode String Code for the country levying the tax, taken from the ISO 3166-1 alpha-2 standard list.

Methods

Tax

global Tax()

Constructs a tax with no fields set.

fferpcore.ElectronicInvoicingService.ValidationResponse

global with sharing class ValidationResponse

Describes the validity of the connector.

Properties

Name Type Description
Errors List<String> A list of errors associated with the validation process.
IsValid Boolean A boolean describing if the connector is valid.

Methods

ValidationResponse

global ValidationResponse(List<String> errors)

Constructs a ValidationResponse from the provided list of errors

Input Parameters

Name Type Description
errors List<String> A list of errors to be included in the response. If this parameter is null, then an empty list of errors will be added to the response.

fferpcore.ElectronicInvoicingService.SendResponse

global with sharing class SendResponse

Response to a request to the send method. This contains information about what has happened when executing send.

Properties

Name Type Description
Results Map<String, fferpcore.ElectronicInvoicingDelivery.DeliveryUpdate> A map of the delivery results by document unique identifier.
UnsentDocuments List<fferpcore.ElectronicInvoicingService.Document> Documents that could not be sent in the current execution context because of limits governing the use of callouts. These documents should be sent in another execution context.

Methods

SendResponse

global SendResponse(Map<String, fferpcore.ElectronicInvoicingDelivery.DeliveryUpdate> results)

Constructs a SendResponse with a map of delivery results.

SendResponse

global SendResponse()

Constructs a SendResponse with nothing set.

fferpcore.ElectronicInvoicingService.SendAsyncResponse

global with sharing class SendAsyncResponse

Response to a request to the sendAsync method. This contains information about what has happened when executing sendAsync.

Properties

Name Type Description
AsyncApexJobId Id Id of the AsyncApexJob that has been created to send the e-invoice. This can be used to track the progress of the job.

Methods

SendAsyncResponse

global SendAsyncResponse(Id asyncApexJobId)

Constructs a successful SendAsyncResponse.

Input Parameters

Name Type Description
asyncApexJobId Id Id of the AsyncApexJob that has been created to send the e-invoice.

fferpcore.ElectronicInvoicingService.TestConnectionRequest

global with sharing class TestConnectionRequest

Contains the credentials of the connector.

Properties

Name Type Description
JsonSettings String Json blob containing settings provided for testing the connection.

Methods

TestConnectionRequest

global TestConnectionRequest()

Constructs a TestConnectionRequest with nothing set.

fferpcore.ElectronicInvoicingService.DocumentUpdateNotificationResponse

global with sharing class DocumentUpdateNotificationResponse

Response to a request to the notifyDocumentResponse method. This contains information about what has happened when executing notifyDocumentResponse.

Properties

Name Type Description
guid String A guid for the document

Methods

DocumentUpdateNotificationResponse

global DocumentUpdateNotificationResponse()

Contructs a DocumentUpdateNotificationResponse with nothing set.

fferpcore.ElectronicInvoicingService.PaymentReceivedNotificationResponse

global with sharing class PaymentReceivedNotificationResponse

Response to a request to the sendPaymentReceivedNotification method.

Properties

Name Type Description
success Boolean Indicates whether the notification was sent successfully.
errorMessage String Error message populated when success is false.

Methods

PaymentReceivedNotificationResponse

global PaymentReceivedNotificationResponse()

Constructs a PaymentReceivedNotificationResponse with nothing set.

fferpcore.ElectronicInvoicingService.FREReport

global with sharing class FREReport

The French e-reporting (FRE report) envelope, mirroring Storecove's `frEReport` submission.

Properties

Name Type Description
TypeCode String The report type, e.g. `IN` (initial) or `RE` (rectificative).
DocumentId String Identifier for this report instance.
IssueDate Date Report issue date.
IssueTime String Report issue time (24-hour), formatted `hh:mm:ss`.
TimeZone String The difference from UTC, formatted `±zzzz`, e.g. `+0100` or `-0900`.
DeclarantParty fferpcore.ElectronicInvoicingService.FREReportDeclarantParty The party submitting the report.
TransactionReport fferpcore.ElectronicInvoicingService.FREReportTransactionReport The transaction report, covering cross-border B2B invoices and aggregated B2C transactions for the reporting period.
PaymentReport fferpcore.ElectronicInvoicingService.FREReportPaymentReport The payment report, covering B2B / cross-border payments and aggregated B2C payments for the reporting period.

Methods

FREReport

global FREReport()

Constructs an FREReport with nothing set.

fferpcore.ElectronicInvoicingService.FREReportDeclarantParty

global with sharing class FREReportDeclarantParty

The party submitting an FRE report, together with its public identifiers.

Properties

Name Type Description
Party fferpcore.ElectronicInvoicingService.FREReportParty The declarant party's legal name and address details.
PublicIdentifiers List<fferpcore.ElectronicInvoicingService.Endpoint> Public identifiers for the declarant. For French declarants these carry schemes such as `FR:VAT`, `FR:SIRET`, `FR:SIREN` / `FR:SIRENE`.

Methods

FREReportDeclarantParty

global FREReportDeclarantParty()

Constructs a declarant party with an empty list of public identifiers.

fferpcore.ElectronicInvoicingService.FREReportParty

global with sharing class FREReportParty

Legal entity details for an FRE report party.

Properties

Name Type Description
CompanyName String Name of the company.

Methods

FREReportParty

global FREReportParty()

Constructs a party with nothing set.

fferpcore.ElectronicInvoicingService.FREReportTransactionReport

global with sharing class FREReportTransactionReport

The transaction-report subtree of an FRE report, mirroring Storecove's `frEReportTransactionReport`.

Properties

Name Type Description
Period fferpcore.ElectronicInvoicingService.InvoicePeriod The period the transaction report covers, as a start and end date.
B2biInvoices List<fferpcore.ElectronicInvoicingService.FREReportB2bCrossBorderInvoice> Cross-border (B2B International) invoices to report for the period.
B2cTransactions List<fferpcore.ElectronicInvoicingService.FREReportB2cTransaction> Aggregated B2C transactions in France for the period.

Methods

FREReportTransactionReport

global FREReportTransactionReport()

Constructs a transaction report with empty invoice and transaction lists.

fferpcore.ElectronicInvoicingService.FREReportB2bCrossBorderInvoice

global with sharing class FREReportB2bCrossBorderInvoice

A cross-border B2B invoice within an FRE transaction report, mirroring Storecove's `frEReportB2bCrossBorderInvoice`. Reuses the existing party, line and tax value-objects.

Properties

Name Type Description
InvoiceNumber String Sequential number identifying the invoice.
IssueDate Date Date the invoice was issued.
DueDate Date Date the invoice is due.
DocumentCurrency String Currency in which the invoice amounts are expressed.
AmountIncludingVat Decimal The total invoice amount payable, including tax.
TaxSubtotals List<fferpcore.ElectronicInvoicingService.TaxSubtotal> The subtotals for each different tax applied to the invoice.
AccountingSupplierParty fferpcore.ElectronicInvoicingService.AccountingSupplierParty The party issuing the invoice.
AccountingCustomerParty fferpcore.ElectronicInvoicingService.AccountingCustomerParty The party receiving the invoice.
InvoiceLines List<fferpcore.ElectronicInvoicingService.DocumentLine> The individual lines making up the invoice.

Methods

FREReportB2bCrossBorderInvoice

global FREReportB2bCrossBorderInvoice()

Constructs a cross-border invoice with empty tax-subtotal and invoice-line lists.

fferpcore.ElectronicInvoicingService.FREReportB2cTransaction

global with sharing class FREReportB2cTransaction

An aggregated B2C transaction within an FRE transaction report, mirroring Storecove's `frEReportB2cTransaction`.

Properties

Name Type Description
TransactionDate Date The transaction date.
CurrencyCode String Currency in which the transaction amounts are expressed.
VatPaymentOption String The French VAT payment option indicating who is liable, e.g. `customer`.
Category String The French transaction category code, e.g. `TLB1` or `TPS1`.
AmountExcludingVat Decimal The aggregated transaction amount excluding VAT.
AmountIncludingVat Decimal The aggregated transaction amount including VAT.
TransactionsCount Integer The number of individual transactions represented by this aggregated line.
TaxSubtotals List<fferpcore.ElectronicInvoicingService.TaxSubtotal> The subtotals for each different tax applied to the aggregated transaction.

Methods

FREReportB2cTransaction

global FREReportB2cTransaction()

Constructs a B2C transaction with an empty tax-subtotal list.

fferpcore.ElectronicInvoicingService.FREReportPaymentReport

global with sharing class FREReportPaymentReport

The payment-report subtree of an FRE report, mirroring Storecove's `frEReportPaymentReport`.

Properties

Name Type Description
Period fferpcore.ElectronicInvoicingService.InvoicePeriod The period the payment report covers, as a start and end date.
B2biPayments List<fferpcore.ElectronicInvoicingService.FREReportB2bPayment> Payments for B2B / cross-border invoices in scope for the period.
B2cPayments List<fferpcore.ElectronicInvoicingService.FREReportB2cPayment> Aggregated B2C payments for the period.

Methods

FREReportPaymentReport

global FREReportPaymentReport()

Constructs a payment report with empty payment lists.

fferpcore.ElectronicInvoicingService.FREReportB2bPayment

global with sharing class FREReportB2bPayment

A B2B / cross-border payment within an FRE payment report, mirroring `frEReportB2bPayment`.

Properties

Name Type Description
InvoiceNumber String Number of the invoice being paid.
IssueDate Date Date the invoice was issued.
PaymentDate Date Date the payment was made.
Amount Decimal The payment amount.
CurrencyCode String Currency in which the payment amounts are expressed.
PaymentMeansCode String Code identifying the means of payment.

Methods

FREReportB2bPayment

global FREReportB2bPayment()

Constructs a B2B payment with an empty tax-subtotal list.

fferpcore.ElectronicInvoicingService.FREReportB2cPayment

global with sharing class FREReportB2cPayment

An aggregated B2C payment within an FRE payment report, mirroring `frEReportB2cPayment`.

Properties

Name Type Description
PaymentDate Date The payment aggregate date. Maps to the schema `date` field.
CurrencyCode String Currency for the aggregate. Optional — the France payment XML reads currency from each tax-subtotal row rather than this top-level value.

Methods

FREReportB2cPayment

global FREReportB2cPayment()

Constructs a B2C payment with an empty tax-subtotal list.

© Copyright 2009–2026 Certinia Inc. All rights reserved. Various trademarks held by their respective owners.