Skip to content

Create a payment

POST
/payments

Creates a new payment attempt. The payment type and net cost must be provided. Depending on the payment method, the response may include a redirect URL that the user must open in a browser to complete the payment.

The payment request payload

Media type application/json

Payment creation request payload

object
net_val
required

Net payment amount (real value, e.g. 50.00 for 50.00 EUR). Total including fees and VAT is calculated automatically.

number
type
required

Payment type: “sepa” = SEPA direct debit, “stored_card” = stored credit/debit card

string
Allowed values: sepa stored_card
method_id
required

ID of the payment method from GET /payment-methods (stored card ID or SEPA mandate ID)

integer
Examples

Stored card payment

Example request for creating a payment with a previously saved credit/debit card

{
"net_val": 100,
"type": "stored_card",
"method_id": 94
}

Payment created

Payment attempt details (JSON-LD)

object
@id

JSON-LD ID

string
@type

JSON-LD type

string
@context
One of:
string
id

Payment Attempt ID

integer
created_at

Creation date (unix timestamp)

integer
completed_at

Completion date (unix timestamp), null if not completed

integer | null
status

Payment status: 0 = New, 10 = In Progress (before request), 20 = In Progress (after request), 100 = Done, 200 = Canceled by user, 300 = Canceled by timeout, 400 = Canceled by admin, 1000 = Error

integer
Allowed values: 0 10 20 100 200 300 400 1000
amount

Total payment amount

number
net_val

Net cost value

number
vat_val

VAT value

number
fee_val

Fee value

number
currency

Currency

string
default: EUR
Allowed values: EUR CHF
type

Payment method: 1 = SEPA, 6 = Bank Transfer, 7 = PayPal, 8 = Sofort, 91 = Stored Card, 92 = New Card

integer
Allowed values: 1 6 7 8 91 92
invoice

URI to related invoice, null if not yet created

string | null
error

Error message if payment failed, null otherwise

string | null
Examples
Example bank_transfer

Bank transfer payment created

Example response for a bank transfer payment (no redirect, invoice created immediately)

{
"id": 120,
"created_at": 1750066200,
"completed_at": 1750066200,
"status": 100,
"amount": 100,
"net_val": 100,
"vat_val": 0,
"fee_val": 0,
"currency": "EUR",
"type": 6,
"invoice": "/invoices/456",
"error": null
}

Invalid input

Client ID or API key isn’t active or invalid!

There are not enough funds on your account!

Account isn’t activated. Please wait or contact to support!

The request was well-formed but was unable to be followed due to semantic errors

IP address was temporary blocked, because during short time from it was sent many request with invalid credentials. Please wait and try later.

Code Samples

curl -s -X POST 'https://api.lox24.eu/payments' \
-H 'X-LOX24-AUTH-TOKEN: YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"net_val": 100.00, "type": "stored_card", "method_id": 94}' | jq