Shopware · News from · Published · Stefan Hamann

Shopware’s UCP checkout now runs the payment when an agent completes an order

Shopware’s development branch now runs the payment when an agent completes a UCP checkout. Invoice, prepayment and cash on delivery are listed first.

ShopwareUCPCheckoutShopping agentsMerchant operations

A smartphone with a chat and a basket next to an invoice with a tick and a parcel, connected by an orange ribbon.
From the basket in the chat through payment to the parcel. Illustration: Agentic Commerce.

The order exists. Has anyone paid for it?

An agent has put the basket together, the customer has said yes, and the shop returns an order. Until today, that was where Shopware’s UCP checkout ended. The order was there, and nobody had started a payment. If you’ve ever had to match orders against incoming payments, you know how much work hides in a gap like that.

On November 30, Shopware merged payment processing for UCP checkout completion into the main branch of its Agentic Commerce extension. Completing a checkout now starts the payment for the order it places. It’s the same step a headless storefront triggers after placing an order. Last week I wrote about the payment option check that came first and noted that the work on the payment flow itself was still open. That issue is now closed.

Which payment methods can an agent use?

The UCP profile of every sales channel with UCP switched on now lists payment handlers. A payment handler is the integration that can process a particular payment instrument. The extension brings three of its own, one each for invoice, prepayment and cash on delivery. A channel lists one of them when an active payment method of that kind is assigned to it. Handlers registered by payment extensions show up as well. The order gets the payment method of the handler the agent named. The channel’s default payment method no longer steps in here.

Starting with invoice may look modest next to wallets and network tokens. I think it’s the right place to begin. In chapter 8 of my book I describe how a German merchant usually starts from payment on invoice, PayPal, cards or instalments, and that an agent should explain the choice and obtain the confirmation the selected method requires. Cards and wallets arrive through payment extensions. According to the documentation for the payment flow, their handler receives the agent’s payment instrument and can charge it.

There’s one detail I particularly like. The payment method switches as soon as the agent sends a payment instrument while creating or updating the checkout. The total the customer sees then includes that method’s surcharge or discount. A completion whose payment instrument would change the total is refused, and no order is placed. The customer approves an amount, and that’s the amount that gets paid.

What happens when the payment needs the customer, or fails?

A payment that needs no redirect completes the checkout. If the payment needs the buyer, for example to confirm it with the payment provider, the checkout answers with the status requires_escalation and the payment page. The agent sends the buyer there. Once the buyer has paid, the checkout reads completed.

A failed payment keeps the order. The agent gets an error it can recover from. It can complete the checkout again or set another payment instrument first. Both pay the existing order, so a retry doesn’t create a second one. Cancelling the checkout is refused once the order is placed. There’s one setting merchants should know: from Shopware 6.6.10.21 and 6.7.13.0 on, an order can only be paid again with a payment method that has Allow payment change after checkout switched on. Without it, the agent is told to use another handler.

The pull request also lists what’s still missing. A buyer who never finishes at the payment page leaves the checkout waiting, and the agent has no call that replaces the open payment. A handler whose payment method an availability rule blocks for this buyer is still listed and only refused when the agent selects it. The three Shopware handlers have no published specification yet.

Can merchants use it today, and what would I test?

The change is in the source. Release 1.4.0 is still the latest published version, and the new flow sits under the next version in the changelog. If you want to try it, do it on a test system running the development state.

I’d take one basket down three routes. First a channel with invoice payment assigned and a completion with the handler com.shopware.invoice. Does the order really carry invoice as its payment method afterwards? Then a payment method that sends the buyer to the payment provider, once all the way through and once abandoned on the payment page. Finally a failed payment with a second attempt, and then I’d count the orders in the admin. There should be one.

My agentic checkout guide follows the steps from the offer through to confirmation. At the end, the customer should know whether they’ve ordered and how they’re paying. And the merchant should find the same answer in the admin.

Source and further reading

Read the original announcement ↗

How agentic checkout and payments work ↗

The basics: What is agentic commerce? Definition and examples ↗

The Agentic Commerce handbook ↗

Save and share