Handling Invoices
Simpler Checkout lets business customers (B2B) request an invoice by typing their company details, such as their tax ID and company address, directly in the checkout.
When a shopper requests an invoice, the Submit Order Request sent to your Platform Interface carries an extra invoice object at the root of the request, next to order and user. Your Platform Interface must read it and map the details to your accounting or ERP system.
Step 1: Enable invoicing
Invoicing is not enabled by default. To start receiving invoice data:
- Update your Platform Interface to parse the
invoiceobject, as described in Step 2. - Contact Simpler Support to enable invoicing for your store.
Step 2: Read the invoice object
The invoice object contains the company details the shopper gave:
| Field | What it holds |
|---|---|
tax_id | The company's tax ID (ΑΦΜ in Greece) |
company_name | The registered company name |
activity | The company's main business activity |
tax_authority | The tax office the company belongs to (ΔΟΥ in Greece) |
company_street | Street and number of the company address |
company_city | City of the company address |
company_postcode | Postcode of the company address |
company_address | The same address in one line, for example Main Street 10, Athens, 10431 |
Every request carries both the split address and the one-line company_address. company_address is deprecated and kept only so older setups keep working. Use company_street, company_city and company_postcode for new work.
This is what your endpoint receives when a shopper requests an invoice:
{
"invoice": {
"tax_id": "123456789",
"company_name": "Acme Corp S.A.",
"activity": "Wholesale of electronic equipment",
"tax_authority": "ΔΟΥ Αθηνών",
"company_street": "Main Street 10",
"company_city": "Athens",
"company_postcode": "10431",
"company_address": "Main Street 10, Athens, 10431"
}
}
Map the fields in your submit handler:
class SimplerSubmitController extends AbstractController {
public function postData(Request $request): Response {
$requestData = json_decode($request->getContent(), true);
// 1. Initialize your order/cart as usual
$cart = CartService::createCart();
// ... (add items and shipping as shown in Basic Flow)
// 2. Check if an invoice was requested
if (!empty($requestData['invoice'])) {
$invoiceDetails = $requestData['invoice'];
// Map Simpler invoice data to your system
$cart->setInvoiceRequested(true);
$cart->setTaxId($invoiceDetails['tax_id']);
$cart->setCompanyName($invoiceDetails['company_name']);
$cart->setCompanyActivity($invoiceDetails['activity']);
$cart->setTaxAuthority($invoiceDetails['tax_authority']);
$cart->setCompanyStreet($invoiceDetails['company_street']);
$cart->setCompanyCity($invoiceDetails['company_city']);
$cart->setCompanyPostcode($invoiceDetails['company_postcode']);
}
$order = CheckoutService::createOrder(
$cart,
$requestData['user'],
$requestData['order']['ship_to'] ?? null,
$requestData['order']['simpler_id']
);
return $this->json([
'request_id' => $requestData['request_id'],
'order_id' => $order->getID()
]);
}
}
ΑΦΜ autofill for Greek companies
For Greek companies, the shopper types only the tax ID (ΑΦΜ). The checkout looks it up in the AADE business registry and fills in the company name, tax office (ΔΟΥ), activity and address. The shopper can still change any field before placing the order.
The lookup also validates the tax ID:
- A tax ID with a wrong check digit, one the registry doesn't know, or one that belongs to a closed business is rejected. The shopper sees an error and can't place the order with it.
- If the registry is unavailable, the shopper fills in the fields by hand and the order goes through as usual.
- Tax IDs from other countries are not looked up.
Autofill is on by default for every store that has invoicing enabled. If you prefer shoppers to type all the details themselves, contact Simpler Support to turn it off.
AADE sends the looked-up business an email in its TAXISnet inbox, saying that Simpler looked up its details. This is how the AADE service works for every lookup.