Skip to content
A
For administrators
Running the administration — content, users, e-shop, invoicing and settings
Payments / How payments work

How payments work#

The payments module is shared. The e-shop, adverts, the company catalogue and the discussion all use it — each merely asks for a payment and waits for the outcome.

What a payment is#

One attempt to pay a given amount. A payment carries:

Field Note
Amount and currency
Payment code your designation; used to find it
Variable symbol for matching against the bank
Gateway how it is paid
User and email who is paying
Status where the payment stands
Created and paid dates
Description what is being paid for

Payment statuses#

Status Key Meaning
Unknown UNKNOWN the status could not be determined
New NEW created, the customer has not paid yet
Started START they went off to the gateway
Pending PENDING the gateway will confirm later — a bank transfer, say
Paid COMPLETED the money arrived
Cancelled CANCELED the customer clicked out of it
Voided by the gateway VOIDED the gateway cancelled it, not the customer
Refunded REFUNDED the money went back
Failed FAILED the gateway refused it
Expired EXPIRED the customer did not finish in time
Wrong amount BAD_PRICE the gateway confirmed a different amount than expected
Invalid INVALID the gateway returned details that make no sense

"Cancelled" and "Voided by the gateway" are not the same

The first was the customer, the second the gateway — typically over suspicion or a timeout on its side. When disputing a payment it helps to know which side stopped it.

"Wrong amount" and "Invalid" are two different statuses

With the first the payment went through, just for a different amount. With the second the details themselves do not add up. They are handled differently, so do not conflate them.

A pending payment is not a paid one

With transfers and deferred payments, "pending" can last several days. Do not release goods or a service against this status.

A wrong amount means the payment matches but the money does not

The gateway confirmed a different amount from the one expected. It is rarely the customer's fault — more often a price change between creating the payment and paying it. It is resolved by hand and does need looking at.

Who changes the status#

The gateway changes it, not the administrator. It arrives as a message from the gateway to the address the system handed over when the payment started.

A customer returning to the shop is not payment confirmation

They may come back before the gateway confirms, or close the window despite having paid. The gateway's message decides. That is why a status can change long after the customer has walked away from the computer.

The gateway does not overwrite a final status#

Once a payment is paid or refunded, a further message from the gateway no longer changes its status. The same holds for a paid payment you cancelled by hand. A late or repeated gateway message is only recorded in the gateway communication. Only you can change such a status in the administration.

The exception is a new paid transaction of the same payment — the customer paid again. For a tariff the service is activated again (see repeated activation), for an e-shop order it is an overpayment to refund.

An unpaid cancelled payment stays open — the customer can pay it again.

Editing a payment by hand#

You can edit a payment in Systém → Platby. Three rules apply:

Rule What it means
Changes are recorded every change of status, amount, currency, invoicing status and payment date is written after saving to an audit record on the server (the file log/paymentAudit.log): who, when, from what to what
A payment with a document cannot be repriced if the payment already has a document, the form does not save a change of amount or currency and shows a message at the field. Correct the difference with a credit note or a new document in Invoicing
A cancelled order cannot be paid for a payment of a cancelled or expired e-shop order neither the payment page nor a new gateway transaction goes through

Change a status by hand only with a reason

The audit record shows who changed the payment, not why. Note the reason on the payment or the order.

What happens after payment#

The payment itself activates nothing. It calls a callback — a handler belonging to whichever module asked for the payment.

Module What it does
E-shop moves the order on
Adverts pays for the advert or its promotion
Company catalogue extends the listing
Membership extends the tariff validity

See Regions and callbacks.

The gateway fee#

The fee is recorded on the payment — a fixed amount, a percentage, or both. It is stored with the payment, so it stays visible what the gateway cost.

A paid payment can ask for a document. Which statuses and which document type is set in the invoicing settings.

One payment may have several documents

A regular invoice plus a credit note or a cancellation. A credit note from a payment is issued only for the part that has not been credited yet — once everything has been credited, no further document is created. See Invoices.

Order payments are invoiced by the e-shop

For a payment of an e-shop order the document is not issued by the automatic payment processing but by the e-shop according to the order status (for example only at dispatch). Look for the document of such a payment on the order.

Where to find payments#

Systém → Platby — an overview of all of them. Besides the status and the amount, a payment shows its communication with the gateway, which is the first place to look when something does not add up.

The Stav (status) column shows the exact status of the payment. Its filter groups the statuses into four groups:

Filter choice Which statuses it covers
Dokončené (completed) Paid
Čekající (pending) New, Started, Pending
Neúspěšné (failed) Cancelled, Failed, Expired, Wrong amount, Invalid
Ostatní (other) all the rest (Unknown, Refunded, Voided by the gateway)

The Platby podle stavu (payments by status) widget on the dashboard counts the statuses the same way; clicking one of its parts opens the payment list with the matching filter.

Communication with the gateway#

A gateway often reports one payment several times — the customer returns from the payment page, the gateway sends a background notification and sometimes repeats it. Every such notification is recorded. You find the list in the payment edit form on the Komunikace s bránou tab (newest first); the eye icon in the payment overview row takes you straight there.

Column Meaning
Přijato when the notification arrived
Kanál gateway return / notification, delivery receipt / server notification, or SMS
ID u brány the transaction number the gateway uses for the payment
Stav od brány and Částka od brány what the gateway reported
Výsledek Zpracováno (the notification changed the payment), Bez změny (a repeated or late message for an already closed payment), Odmítnuto (payment, amount or currency do not match — the reason is shown), Chyba (processing failed)

Records older than the configured period are deleted once a day — see clean-up jobs.

Cookie settings