nextAction.type is payment_submitted or order.outcome is confirmed. Then show the buyer the merchant’s confirmation.
Read the transaction
maxWaitSeconds (up to 25) holds the call open until something changes. since is the version from your last read. Reading never pays. It asks the merchant only while the merchant is completing the order. An agent on the MCP tools reads with sapiom_get_transaction.
After the card is sent
Once the card reaches the merchant’s payment processor,nextAction.type is payment_submitted. Your agent stops reading and never pays again for this transaction. For a UCP checkout, your backend gets the confirmation.
When you can buy again
If the transaction readspayment_submitted, or its order.outcome is confirmed or unknown, the card can be with the merchant. Never buy again for it. A card payment that reads blocked with reason: payment_ended ended before Sapiom sent the card.
The most frequent cause of
payment_ended is an expired approval. The placeholder card works for about one hour after the buyer approves. Get the approval when your browser worker is ready to pay.
Order outcome
For a UCP checkout,order.outcome comes from the merchant’s checkout. After payment_submitted, it changes only when your backend refreshes the checkout.
A browser checkout has no order outcome:
order is null. The merchant’s page is the only confirmation, so tell the buyer what it showed.
Show the order confirmation
For a UCP checkout, the merchant’s completed checkout is the order confirmation. Afterpayment_submitted:
- Refresh the checkout every 5 seconds or more until
order.outcomeisconfirmed. - Read the transaction.
- Show the buyer what’s in
order.
A field the merchant didn’t send is
null, and links is empty. Show only what’s there. Sapiom drops any link that isn’t https. Other outcomes carry only outcome.
Refresh the checkout
For a UCP checkout only. Your backend calls refresh with the buyer’s key whennextAction.type is reconcile_checkout, or after payment_submitted to get the confirmation. Then your agent reads the transaction again:
Recover without buying twice
Error formats and codes are in Errors.