Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.m4psp.com/llms.txt

Use this file to discover all available pages before exploring further.

shop_order_id
string
required

Order ID in your system. Must be unique for each new invoice.

Maximum string length: 255
Example:

"5b0efa8a-153b-4421-abac-2aba4d772a86"

shop_id
integer
required

Unique shop identifier in the M4 system.

Example:

1520

status
enum<string>
required

Invoice status:

  • success — paid and credited;
  • rejected — rejected by the client or the payment system;
  • hold — held.
Available options:
success,
hold,
rejected
Example:

"success"

payment_id
integer
required

Unique identifier of the issued invoice in M4 system

Example:

12

ps_data
string
required

Additional information from the payment system in the JSON Lines format. Mandatory field - payer's account ps_payer_account. Other fields depend on the payment system.

In case of payment tokens, the payment_token parameter will also be represented in this field.

Example:

"{\"ps_payer_account\": \"412103XXXXXX7701\", \"bill_id\": \"7766\", \"amount\": \"190.99\", \"status\": \"success\"}"

ps_currency
number
required

Numeric currency identifier in accordance with ISO 4217. Example: 840

Example:

840

payway
string
required

Payway in M4 system used by the user for payment

Maximum string length: 150
Pattern: ^[A-Za-z_,\[\]]+$
description
string
required

Payment description

Example:

"Invoice for shop_id=1520"

created
string<date-time>
required

Invoice creation date and time

Example:

"2026-05-24T16:35:42"

updated
string<date-time>
required

Invoice status change date and time (payment or rejection)

Example:

"2026-04-21T20:09:02"

processed
string<date-time> | null
required

Date and time of invoice transfer to the final status

Example:

"2026-04-21T20:09:03"

shop_currency
number
required

Numeric currency identifier in accordance with ISO 4217. Example: 840

Example:

840

shop_amount
number<float>
required

Invoice amount, in the invoice currency

Example:

359.01

client_price
number<float>
required

Amount paid by the client, in the payment system currency.

Example:

365

error_code
number<integer>
required

M4 API error code. 0 in cases there is no any error. Other codes can be found here: Description of error codes

Example:

0

shop_refund
number<float>
required

Amount credited to the shop's balance. If there is no transactional conversion, the balance currency is equal to the account currency (shop_currency).

In case of transactional conversion of turnover, the currency of the shop balance (settlement_currency) and the exchange rate (settlement_rate) will be sent in the notification additionally

addons
string
required

User parameters sent by the shop when creating an invoice in JSON Lines format.

sign
string
required

Request signature