Create Invoice
POST/rest/invoices
/rest/invoicesProduction URL
https://api.betterpayment.de/rest/invoicesTest URL
https://testapi.betterpayment.de/rest/invoicesThe Jetztzahlen Invoice Creation API allows you to create new invoices programmatically. This endpoint will automatically generate a unique invoice number if none is provided, set default values for missing fields, and return a complete invoice object with payment links.
New invoices are always created active — active is not accepted here, and is ignored if sent. If the channel already holds an active invoice with the same number, that invoice is deactivated automatically so the new one takes the number over. Use the Update Invoice endpoint to deactivate or reactivate an invoice afterwards.
All parameters should be nested under the invoice key in the request body. You also have to pass url_name of your channel on the root level of the request body.
Request
url_nameStringrequiredinvoice.debt_claim_numberStringinvoice.first_nameStringinvoice.last_nameStringinvoice.addressStringinvoice.address2Stringinvoice.postal_codeStringinvoice.cityStringinvoice.emailStringinvoice.countryStringinvoice.amountFloatrequired10.55, "10.55" and German-style "10,55". Stored unsigned, so -10.55 is saved as 10.55.invoice.descriptionStringinvoice.customer_idStringinvoice.currencyStringinvoice.stateStringinvoice.print_dateStringinvoice.tax_idStringinvoice.companyStringinvoice.phoneStringinvoice.redirect_after_paymentsBooleaninvoice.success_urlStringinvoice.error_urlStringinvoice.expires_inIntegerexpires_in_unit)invoice.expires_in_unitString"minutes", "hours", or "days" (requires expires_in). Omit both to disable expiration.invoice.send_initial_emailBooleantrue, the customer receives the e-mail immediately after creation. Defaults to false. Requires email to be present — the create fails with 422 otherwise.invoice.initial_email_typeString"initial" or "reminder". Only honoured when send_initial_email is true. Defaults to "initial" if blank; rejected with 422 if outside the whitelist.invoice.localeStringen, de, pt. Defaults to channel language; rejected with 422 if outside the whitelist.POST /rest/invoices
Authorization: Basic <base64(api_key:api_password)>
Content-Type: application/json
{
"url_name": "your_channels_url_name",
"invoice": {
"debt_claim_number": "INV-2024-001",
"first_name": "Peter",
"last_name": "Struwwel",
"address": "Teststr 5",
"address2": "12B",
"postal_code": "10178",
"city": "Berlin",
"email": "dev@betterpayment.de",
"country": "Germany",
"amount": 10.55,
"description": "Payment for drinks",
"customer_id": "123456",
"currency": "EUR",
"state": "BE",
"print_date": "2024-08-14",
"tax_id": "123456789",
"company": "Example GmbH",
"phone": "+4917143214321",
"redirect_after_payments": false,
"success_url": "https://example.com/success",
"error_url": "https://example.com/error",
"expires_in": 24,
"expires_in_unit": "hours",
"send_initial_email": true,
"initial_email_type": "initial",
"locale": "de"
}
}
Response
invoiceObjectmessageStringerrorStringnull on success)paylinkStringqrcodeString{
"invoice": {
"status": "pending",
"active": true,
"created_at": "2024-08-14T07:50:20.123Z",
"updated_at": "2024-08-14T07:50:20.123Z",
"debt_claim_number": "INV-2024-001",
"print_date": "2024-08-14",
"first_name": "Peter",
"last_name": "Struwwel",
"address": "Teststr 5",
"address2": "12B",
"postal_code": "10178",
"city": "Berlin",
"country": "Germany",
"email": "dev@betterpayment.de",
"amount": 10.55,
"amount_cents": 1055,
"currency": "EUR",
"description": "Payment for drinks",
"customer_id": "123456",
"state": "BE",
"phone": "+4917143214321",
"redirect_after_payments": false,
"success_url": "https://example.com/success",
"error_url": "https://example.com/error",
"tax_id": "123456789",
"company": "Example GmbH",
"expires_in": 24,
"expires_in_unit": "hours",
"expired": false,
"uuid": "f34b3b2f-2680-4d62-a0c9-ce2e50ddbb8a",
"channel_id": 123,
"import_id": 456,
"locale": "de",
"effective_locale": "de",
"send_initial_email": true,
"initial_email_type": "initial",
"effective_initial_email_type": "initial",
"last_email": {
"email_type": "reminder",
"status": "sent",
"sent_at": "2026-05-20T14:30:00Z",
"recipient_email": "dev@betterpayment.de",
"locale": "de"
},
"id": 789
},
"message": "Invoice has been successfully created.",
"error": null,
"paylink": "http://yourchannel.jetztzahlen.de/pay/f34b3b2f-2680-4d62-a0c9-ce2e50ddbb8a",
"qrcode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}