Skip to main content

Import Invoices

POST/rest/import

The Jetztzahlen Import API is used to create invoice records for your Jetztzahlen channels.

Request

url_nameStringrequired
URL name of the channel. You can find it under channel configurations in the Jetztzahlen Dashboard.
batch_nameString
A reference you would like to add to this batch import. Optional.
invoicesArrayrequired
An array of invoice params as hash. See below for invoice params.
Example Request
POST /rest/import
Authorization: Basic <base64(api_key:api_password)>
Content-Type: application/json
{
"url_name": "test_url",
"batch_name": "any optional note you would like to add",
"invoices": [
{
"debt_claim_number": "123",
"amount": 1.99,
"currency": "EUR",
"print_date": "12.10.2018",
"first_name": "Peter",
"last_name": "Mustermann",
"address": "Egal Str. 1",
"address2": "Complementary str",
"tax_id": null,
"postal_code": "10434",
"city": "Berlin",
"email": "test@testov.com",
"state": "Berlin",
"country": "Deutschland",
"phone": "+49333222111",
"description": "Sport sneakers",
"redirect_after_payments": false,
"success_url": null,
"error_url": null,
"send_initial_email": true,
"initial_email_type": "initial",
"locale": "de"
}
]
}

Invoice params

debt_claim_numberStringrequired
Invoice number
amountFloatrequired
Amount for the invoice. One EUR and 90 CENTS is represented as 1.90.
print_dateStringrequired
Due date for the invoice. DD-MM-YYYY format.
currencyString
Falls back to channel's default currency if not given. 3 letter currency code. ISO-4217. E.g EUR, USD, CHF...
first_nameString
First name of the payee
last_nameString
Last name of the payee
addressString
Address of the payee
address2String
Complementary address of the payee
tax_idString
Tax ID of the payee
postal_codeString
Postal code of the payee
cityString
City of the payee
emailString
Email of the payee
countryString
Country of the payee. Full country name either in English or German.
phoneString
Phone number of the payee
redirect_after_paymentsBoolean
True or false. Indicating if customers should be redirected to success or error URLs after payments
success_urlString
Success URL that customers should be redirected to after payments
error_urlString
Error URL that customers should be redirected to after failed payments
send_initial_emailBoolean
Opt-in flag for the initial invoice e-mail. When true, the customer receives the e-mail right after the import completes. Defaults to false. Accepts JSON boolean true/false, or the strings "true", "1", "yes".
initial_email_typeString
Which template to use for the on-creation e-mail. One of "initial" or "reminder". Only meaningful when send_initial_email is true. Defaults to "initial" when blank or unrecognised.
localeString
Per-invoice language for customer e-mails. One of en, de, pt. Unrecognised values are stored as null. Falls back to the channel's default language, then en.
Invoice Object Fields
{
"debt_claim_number": "123",
"amount": 1.99,
"currency": "EUR",
"print_date": "12.10.2018",
"first_name": "Peter",
"last_name": "Mustermann",
"address": "Egal Str. 1",
"address2": "Complementary str",
"tax_id": null,
"postal_code": "10434",
"city": "Berlin",
"email": "test@testov.com",
"state": "Berlin",
"country": "Deutschland",
"phone": "+49333222111",
"description": "Sport sneakers",
"redirect_after_payments": false,
"success_url": null,
"error_url": null,
"send_initial_email": true,
"initial_email_type": "initial",
"locale": "de"
}
About the initial e-mail

Rows where send_initial_email is true, active is true, and email is present have their initial e-mail enqueued for delivery in the background once the import has committed. The HTTP response returns as soon as the rows are persisted — actual e-mail delivery happens asynchronously. Use the Send Invoice E-mail endpoint to retry a single send manually.

Response

messageString
Success message
Example Response
{
"message": "Invoices have been successfully imported."
}