Payments and orders

Payments and orders

Who can do this: Owner to add and change a payments connector (the editor says "Only a project owner can change connector settings"). Edit on the storefront to point it at a connector. Owner to build the rule that sends payment links. See the .

What it's for

This chapter is about your customers paying you. You connect your own account at a payment provider. Payments land on that account, not on the platform's. You are the merchant of record, so refunds, disputes and provider fees are between you and the provider.

The subscription you pay the platform for seats and AI credit is a different system, with a different Stripe account. It is covered in .

Money can reach you three ways:

•

Storefront checkout: a shopper pays at the end of an order on your shop.

•

Payment links: a rule opens a payment for any row (an invoice, a booking, a deal) and writes the link into a column. You send it.

•

Portal-app checkout: a custom customer app charges through the same connector. A developer builds the app and its checkout rules (which table holds the orders, how lines are priced, which statuses to set); no screen lets you change those. Your part is to bind a payments connector. Open the app's app connection in the navigator and go to its "Connectors" tab, which appears only when the app asks for a connector. Pick the payments connector for the slot the app asks for. The line under the picker says whether it can charge: "Live — this connector can take payment.", "Live in TEST mode — it takes no real money. Say so to the payer.", or "Bound, but it cannot charge — usually missing credentials on the connector document". If the slot is not bound or cannot charge, the order is still created but the app gets no payment page, so nobody is asked to pay.

Before you start

•

You need an account with one of the providers below. Their credentials are yours; nobody else can create them.

•

Provider choices in this version of the code: ЮKassa, Stripe, Yandex Pay, T-Bank, and a test mode that moves no money. Mamo appears as a name in the code but has no driver, so it is not available.

•

For a shop: a storefront (New storefront) and, for orders, its orders table.

Needs your administrator: Stripe is the only provider that also needs the installation's own Stripe keys, set under /system/config. You can tell it is missing when the connector editor says "Stripe isn't configured on this platform (an admin sets the keys in System → Config)." Stripe also needs a webhook registered for connected accounts; the administrator does that. ЮKassa, Yandex Pay, T-Bank and test mode need nothing from your administrator.

Steps

1. Add a payments connector

1.

In the navigator press New connector… (under Advanced). The gallery is titled Add a connector; pick Payments.

2.

Choose a provider. The editor shows only that provider's fields:

Provider

You enter

Notes

ЮKassa

"shopId" and the "Secret key"

Press "Test connection". In your ЮKassa shop, point the notification URL at /api/webhooks/inbound/yookassa on your installation's address

Stripe

Nothing to paste. Press "Connect Stripe" and finish Stripe's hosted onboarding

Shows "Charges enabled" once Stripe has approved the account. Not live before that

Yandex Pay

"API key" and a "Sandbox (test mode)" tick

In the sandbox the API key equals your merchant id. The platform receives Yandex Pay notifications at /api/webhooks/inbound/yandex on your installation's address, but the order it sends to Yandex Pay carries no notification address and the editor shows no instruction. If the Yandex Pay cabinet asks for a notification address, enter that one; it is Yandex's setting. Without notifications, the platform's own check every 5 minutes still marks paid orders as paid

T-Bank

"TerminalKey" and "Terminal password"

A test terminal key ends in DEMO. Notifications are addressed per payment, so nothing to set in the T-Bank cabinet

Test mode

Nothing

See step 2

1.

Press "Test connection" where offered. It says "Connection OK" or the provider's rejection. A rejected key is the usual problem; for Yandex Pay check the sandbox tick.

2.

Press "Save".

Secrets are stored encrypted and never shown again. Typing a new value replaces the stored one.

2. Rehearse with test mode first

Choose "⚠ Test mode (no real money)". A shop on this provider runs the whole checkout: hosted payment page, redirect back, signed notification, order marked paid, shipment and confirmation email. Nothing is charged. Orders paid this way keep payment_provider = test, and the storefront warns the shopper.

Setting

What it does

"Settlement"

"Manual (choose on the page)", "Always succeed" or "Always decline". Default Manual

"Simulated fee, %"

Fills the order's fee and net columns like a real payout. Default 0

"Webhook delay, ms"

Delays the notification to test a thank-you page that opens before confirmation. Default 0, maximum 60000

Under "Test payments" the connector lists recent test payments. Press "Pay" or "Decline" on a pending one to settle it yourself. It fires the same notification as the shopper would.

Careful: while the connector is on test mode your shop takes no real money. Switch it to the real provider before you open the shop to customers. Orders already paid in test mode stay marked test.

3. Fiscal receipts (54-ФЗ)

If you sell in Russia, receipts are built from the order lines.

•

ЮKassa always sends a receipt. T-Bank sends one only when "Tax system" is set; leave it at "No receipts" if your terminal has no online cash register. Test mode builds a receipt and stores it, so you can inspect the payload. Yandex Pay shows the same fields, but the code does not send a receipt for it.

•

Set the connector defaults "payment_subject" (default Goods) and "payment_mode" (default Full payment).

•

The VAT rate comes from the shop's VAT setting, or from the payment-link rule (step 5).

•

A payment link on a receipt-sending connector needs the payer's email or phone. Without one the action is refused.

4. Take payments in a shop

1.

Open the storefront (created with New storefront) and find its payment section.

2.

Tick "Collect payment at checkout".

3.

Under "Payment connector" pick the connector. The default is "— None (no online payment)".

4.

Optional: "Pay on delivery (оплата при получении)" lets shoppers order without paying online. It works even with no connector.

5.

Save the storefront.

Checkout goes live only when the box is ticked and the connector is fully set up (credentials present; Stripe also needs charges enabled). With no usable connector, checkout falls back to pay-on-delivery or a free order.

1.

In Automations, make a rule on the table that holds the amounts (see ). A Manual trigger plus a Button column works well.

2.

Add action, choose Request payment (link), and set:

Field

What to choose

Payments connector

Required. If none exists the editor says to add one first

Amount column

A number, currency, formula, rollup or lookup column. It must be a column, not typed text

Write the link to

A link or text column

What is being paid for

Required. The payer sees it and it is the receipt line

Payer email, Payer phone

Required when the connector sends 54-ФЗ receipts

Link valid for, hours

Default 72. Allowed 1 to 2160

Receipt VAT

Default No VAT; 0%, 10%, 20%, 10/110, 20/120

Move status column with While awaiting payment, When paid, When the link expires

Optional. Moves the row's own status as the payment settles

1.

Add a later step (Send email or Send external message) that puts the link column into the text. The action only writes the link.

The editor has no currency field, and links are opened in RUB. The action does have an optional currency setting (a 3-letter code such as EUR), but it cannot be set from the editor: only the AI assistant or an MCP connection can write it into the rule. The editor keeps it when you change other fields of that rule. The currency of the amount column is never read, so without that setting every link is in RUB. T-Bank accepts RUB only: any other code fails the action with T-Bank acquiring charges in RUB only (got <code>).. ЮKassa, Yandex Pay and Stripe receive the code as given; which currencies your account there accepts is up to the provider.

Running the rule again on a row:

•

Open link, same amount, more than an hour left: the same link is reused.

•

Already paid: the step is skipped, no new link.

•

Amount changed while a link is open: only T-Bank can withdraw the old link. With the other providers the action fails until the link expires or is paid.

How to check it worked

•

Connection: "Test connection" says "Connection OK".

•

Shop: place a test-mode order. The connector's "Test payments" shows it. Settle it with "Pay"; the order shows paid and the confirmation email goes out.

•

Link: run the rule with Preview (it says only that it would open a link), then Run & save on a test row, with the connector on test mode: a real provider would open a real payment. The link column fills.

•

History: the connector editor shows a run history of the payment notifications it received. Each rule run also appears in Run history.

Order status and reconciliation

Every order or payment row gets platform-owned bookkeeping: payment status (pending, paid, failed or expired), provider, reference, amount, fee and net. If your table has columns whose ids contain payment_status, payment_ref, payment_provider, payment_amount, payment_url, or a fee or net column, they are filled too. Your own column rules never block the record of money taken. The write goes through the normal row path, so rules that watch the row can fire on payment.

A paid storefront order also queues its delivery shipment (if delivery is set up) and sends the order confirmation email once.

A paid row is never reopened as pending. Settlement can arrive by notification, by the shopper returning to your site, or by a check the platform runs itself every 5 minutes on every unpaid payment. So a lost notification delays an order by minutes, not forever. The check stops after 3 days and marks the row as given up. It stays pending for you to decide. A payment link past its enforced expiry (plus 30 minutes) is marked expired, which maps to your When the link expires state.

Undo / what can go wrong

Problem

Cause and fix

Checkout does not appear in the shop

"Collect payment at checkout" off, no connector, or credentials not verified. Press "Test connection"; for Stripe finish onboarding

Stripe shows "Onboarding incomplete — finish in Stripe"

Press "Manage Stripe onboarding" and finish it. Checkout stays off until it says "Charges enabled"

Order stays pending after the shopper paid

Wait up to the next 5-minute check. For ЮKassa also confirm the notification URL in your shop

Link rule fails: "A 54-ФЗ receipt needs the payer's email or phone."

Fill Payer email or Payer phone

Link rule fails: "The amount cell is blank, zero or not a number."

Fix the amount on the row

Refund needed

The platform has no refund feature: nothing in the payment code refunds through a provider. Refund in the provider's own cabinet. The platform does not record it. Payment status has no refunded value (only pending, paid, failed, expired), the 5-minute check looks only at unpaid payments, and no notification handler reads a refund. The order keeps its paid status, fee and net, so correct your own columns by hand

Payment links and test settlements cannot be recalled by rolling back a run. Rolling back restores table cells only.

· · · · · .