Create invoice
POST https://pos.paysera.com/eapi/v1/invoices
Create a new invoice, typically generated from a completed order.
Authorization​
This endpoint requires a Personal Access Token, sent as a Bearer token.
To obtain one, your account needs API permission. Once granted, go to /user/settings in your POS account and create a personal access token.
Authorization Header Format:
Authorization: Bearer YOUR_ACCESS_TOKEN
Example:
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
For more details, see the Authentication section.
Request Body​
| Field | Type | Required | Description |
|---|---|---|---|
type | string | ✓ | Invoice type. Credit invoices cannot be created via this endpoint — |
issueDate | string | Issue date (defaults to today) | |
dueDate | string | Payment due date | |
currency | string | Currency code (ISO 4217, defaults to EUR) | |
notes | string | Additional notes | |
orderId | string | ✓ | POS order UUID (every invoice must be linked to an order) |
relatedInvoiceId | string | UUID of an existing invoice to link to (e.g. converting a proforma | |
customer | object | ✓ | |
invoicePositions | array | ✓ |
type​
Invoice type. Credit invoices cannot be created via this endpoint — they are automatically generated during the refund flow.
relatedInvoiceId​
UUID of an existing invoice to link to (e.g. converting a proforma invoice into a debit invoice). Optional. Note: credit invoices are not creatable here — they are auto-generated during the refund flow.
Errors​
This endpoint may return the following errors:
400 - Bad Request​
The request was invalid or cannot be served.
401 - Unauthorized​
Unauthorized
This error was produced by providing incorrect credentials.
403 - Forbidden​
Forbidden
This error indicates you don't have permission to access this resource.
404 - Not Found​
The requested resource could not be found.
409 - Conflict​
Invoice number already exists
422 - Unprocessable Entity​
Unprocessable entity
429 - Too Many Requests​
You have exceeded the rate limit. Please try again in a minute.
500 - Internal Server Error​
Internal server error
Example​
Request​
POST https://pos.paysera.com/eapi/v1/invoices
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN
{
"type": "debit",
"issueDate": "2026-05-05",
"dueDate": "2026-06-05",
"currency": "EUR",
"notes": "WooCommerce order #1234",
"orderId": "123e4567-e89b-12d3-a456-426614174000",
"relatedInvoiceId": "123e4567-e89b-12d3-a456-426614174000",
"customer": {
"firstName": "Jonas",
"lastName": "Jonaitis",
"companyName": "UAB SaulÄ—",
"companyCode": "123456789",
"companyVat": "LT123456789",
"email": "jonas@example.com",
"billingAddress": {
"phone": "+37060012345",
"address1": "Gedimino pr. 1",
"address2": "string",
"city": "Vilnius",
"zip": "01103",
"country": "LT"
}
},
"invoicePositions": [
{
"name": "Cappuccino 0.3L",
"quantity": "2",
"price": {
"unit": {
"regular": "3.50",
"special": "string",
"discount": "string"
},
"tax": {
"rate": "21.0",
"classifier": "PVM1"
}
}
}
]
}
Response​
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"prefix": "POS",
"number": "00001",
"fullNumber": "POS00001",
"type": "debit",
"currency": "EUR",
"order": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"number": "123456"
},
"customer": {
"firstName": "John",
"lastName": "Doe",
"companyName": "Acme Inc.",
"companyCode": "123456789",
"companyVat": "LT123456789",
"billingAddress": {
"phone": "+1-555-123-4567",
"address1": "123 Main St",
"address2": "Apt 4B",
"zip": "LT12345",
"city": "Anytown",
"country": "LT"
}
},
"invoicePositions": [
{
"name": "Product Name",
"quantity": 2,
"price": {
"unit": {
"regular": "45.99",
"special": "39.99",
"discount": "6.00",
"globalDiscount": "2.00"
},
"total": {
"withoutTax": "91.98",
"tax": "19.32",
"withTax": "111.30"
},
"tax": {
"rate": "21.0",
"classifier": "PVM1"
}
}
}
],
"totals": {
"subtotal": "62.20",
"discount": "5.00",
"tax": "12.79",
"total": "74.99"
},
"notes": "Additional notes",
"issueDate": "2024-11-04T10:15:30Z",
"createdAt": "2024-11-04T10:15:30Z"
}
AUTHORIZATION: HTTP
REQUEST
{
"type": "debit",
"issueDate": "2026-05-05",
"dueDate": "2026-06-05",
"currency": "EUR",
"notes": "WooCommerce order #1234",
"orderId": "123e4567-e89b-12d3-a456-426614174000",
"relatedInvoiceId": "123e4567-e89b-12d3-a456-426614174000",
"customer": {
"firstName": "Jonas",
"lastName": "Jonaitis",
"companyName": "UAB SaulÄ—",
"companyCode": "123456789",
"companyVat": "LT123456789",
"email": "jonas@example.com",
"billingAddress": {
"phone": "+37060012345",
"address1": "Gedimino pr. 1",
"address2": "string",
"city": "Vilnius",
"zip": "01103",
"country": "LT"
}
},
"invoicePositions": [
{
"name": "Cappuccino 0.3L",
"quantity": "2",
"price": {
"unit": {
"regular": "3.50",
"special": "string",
"discount": "string"
},
"tax": {
"rate": "21.0",
"classifier": "PVM1"
}
}
}
]
}
RESPONSE
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"prefix": "POS",
"number": "00001",
"fullNumber": "POS00001",
"type": "debit",
"currency": "EUR",
"order": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"number": "123456"
},
"customer": {
"firstName": "John",
"lastName": "Doe",
"companyName": "Acme Inc.",
"companyCode": "123456789",
"companyVat": "LT123456789",
"billingAddress": {
"phone": "+1-555-123-4567",
"address1": "123 Main St",
"address2": "Apt 4B",
"zip": "LT12345",
"city": "Anytown",
"country": "LT"
}
},
"invoicePositions": [
{
"name": "Product Name",
"quantity": 2,
"price": {
"unit": {
"regular": "45.99",
"special": "39.99",
"discount": "6.00",
"globalDiscount": "2.00"
},
"total": {
"withoutTax": "91.98",
"tax": "19.32",
"withTax": "111.30"
},
"tax": {
"rate": "21.0",
"classifier": "PVM1"
}
}
}
],
"totals": {
"subtotal": "62.20",
"discount": "5.00",
"tax": "12.79",
"total": "74.99"
},
"notes": "Additional notes",
"issueDate": "2024-11-04T10:15:30Z",
"createdAt": "2024-11-04T10:15:30Z"
}