Skip to main content

Create order

POST https://pos.paysera.com/epapi/v1/orders

Create a new order with specified products, customer information, and payment details.

Order Positions​

Each order must contain at least one order position (product/service).

Customer Information​

Optional customer details can be included for invoicing and tracking.

Payments​

Payment information can be included or added separately.

Authorization​

This endpoint requires MAC (Message Authentication Code) authentication.

Authorization Header Format:

Authorization: MAC id="CLIENT_ID", ts="TIMESTAMP", nonce="RANDOM_STRING", mac="MAC_HASH", ext="body_hash=BODY_HASH"

Example:

Authorization: MAC id="a9b8c7d6e5f4g3h2", ts="1234567890", nonce="xyz123abc456def", mac="dGhpcyBpcyBhIHJhbmRvbSBtYWMgaGFzaCB2YWx1ZQ==", ext="body_hash=cmFuZG9tQm9keUhhc2hWYWx1ZQ%3D%3D"

For more details, see the Authentication section.

Request Body​

FieldTypeRequiredDescription
numberstringCustom order number (optional, auto-generated if not provided)
currencystringCurrency code (ISO 4217)
languageCodestringLanguage code (ISO 639-1)
discountPricenumberDiscount amount
expiresAtstringOrder expiration timestamp
reservationNamestringReservation name
reservationCommentstringAdditional reservation information
createdAtstringCustom creation timestamp (optional)
customerobject
orderPositionsarray✓List of order items (at least one required)
paymentsarrayPayment information

Example​

Request​

POST https://pos.paysera.com/epapi/v1/orders
Content-Type: application/json
Authorization: MAC id="CLIENT_ID", ts="TIMESTAMP", nonce="RANDOM_STRING", mac="MAC_HASH", ext="body_hash=BODY_HASH"
{
"number": "ORD12345",
"currency": "EUR",
"languageCode": "en",
"orderPositions": [
{
"productId": "PROD001",
"quantity": 2,
"price": 19.99,
"name": "Coffee Beans 1kg",
"vatRate": 21
}
]
}

Response​

{
"id": "550e8400-e29b-41d4-a716-446655440000",
"number": "ORD12345",
"currency": "EUR",
"languageCode": "en",
"status": "pending",
"totalPrice": 3998,
"discountPrice": 0,
"createdAt": "2024-11-04T14:30:00Z",
"updatedAt": "2024-11-04T14:30:00Z",
"orderPositions": [
{
"id": "pos-1",
"productId": "PROD001",
"name": "Coffee Beans 1kg",
"quantity": 2,
"price": 1999,
"totalPrice": 3998,
"vatRate": 21,
"vatAmount": 692
}
],
"payments": []
}

AUTHORIZATION: HTTP

REQUEST

Base URL
https://pos.paysera.com
Body REQUIRED
{
"number": "ORD12345",
"currency": "EUR",
"languageCode": "en",
"orderPositions": [
{
"productId": "PROD001",
"quantity": 2,
"price": 19.99,
"name": "Coffee Beans 1kg",
"vatRate": 21
}
]
}

RESPONSE

Order created successfully
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"number": "ORD12345",
"currency": "EUR",
"languageCode": "en",
"status": "pending",
"totalPrice": 3998,
"discountPrice": 0,
"createdAt": "2024-11-04T14:30:00Z",
"updatedAt": "2024-11-04T14:30:00Z",
"orderPositions": [
{
"id": "pos-1",
"productId": "PROD001",
"name": "Coffee Beans 1kg",
"quantity": 2,
"price": 1999,
"totalPrice": 3998,
"vatRate": 21,
"vatAmount": 692
}
],
"payments": []
}