---
title: "POST /sandbox/invoice-generator"
method: POST
path: "/sandbox/invoice-generator"
tags: ["Testing"]
---

# POST /sandbox/invoice-generator

`POST /sandbox/invoice-generator`

!!! The documentation website is not able to display the full response of this endpoint. The use of the curl command is recommended. !!!

Generate a fake invoice that will produce a given scenario on the sandbox, for example a rejected loan.
The generation will not add the invoice to the list of your invoices. You must do this via API.
To achieve this, you can copy the invoice_creation_payload into the payload of the invoice creation API.
If you want to test another scenario on a given business, create another fake invoice.
For more information on the scenarios of the sandbox, please refer to the <a href="https://developers.getdefacto.com/reference/testing-your-integration">Testing your integration</a> section.
Warning: these invoices and their IBANs will not work in production.

## Request body

- GenerateInvoiceRequest
  - `buyer` APICounterpartyCreation
    - `address` Address
      - `address_line_1` string, nullable
      - `address_line_2` string, nullable
      - `city` string, nullable
      - `country` string, nullable
      - `postal_code` string, nullable
      - `state` string, nullable
    - `contact` APICounterpartyContact
      - `email` string, email, required
      - `first_name` string, required
      - `last_name` string, required
      - `phone_number` string, required
    - `identifier` string, nullable — Legal identifier of the business, such as its SIRET or SIREN in France. Must not contain spaces.
    - `identifier_type` 'belgium_registration_number' | 'bsn' | 'cif' | 'hr_nummer' | 'kvk' | 'name' | 'nif' | 'siren' | 'siret' | 'steuernummer' | 'vat_number' | 'null', nullable — Type of legal business identifier of the business, such as the SIRET in France.
    - `name` string, nullable — Legal name of the business.
    - `vat_number` string, nullable — VatNumber
  - `country` 'BEL' | 'DEU' | 'ESP' | 'FRA' | 'GUF' | 'ISL' | 'MAF' | 'NLD' | 'REU'
  - `scenario` 'CANCEL' | 'FAIL' | 'REJECT' | 'SUCCESS' | 'SUCCESS_ONE_DAY_LATER'
  - `seller` APICounterpartyCreation
    - `address` Address
      - `address_line_1` string, nullable
      - `address_line_2` string, nullable
      - `city` string, nullable
      - `country` string, nullable
      - `postal_code` string, nullable
      - `state` string, nullable
    - `contact` APICounterpartyContact
      - `email` string, email, required
      - `first_name` string, required
      - `last_name` string, required
      - `phone_number` string, required
    - `identifier` string, nullable — Legal identifier of the business, such as its SIRET or SIREN in France. Must not contain spaces.
    - `identifier_type` 'belgium_registration_number' | 'bsn' | 'cif' | 'hr_nummer' | 'kvk' | 'name' | 'nif' | 'siren' | 'siret' | 'steuernummer' | 'vat_number' | 'null', nullable — Type of legal business identifier of the business, such as the SIRET in France.
    - `name` string, nullable — Legal name of the business.
    - `vat_number` string, nullable — VatNumber

## Response `201`

Created

---

[API](https://skmtc.net/getdefacto/apis/api-reference.md) · [All operations](https://skmtc.net/getdefacto/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getdefacto/api-reference/revisions/0a9c1f8784f2/schema)
