Skip to content

// e-commerce and billing

Via API

Adobe Commerce email verification with pingutil

Adobe Commerce stores lose order confirmations and invoices to mistyped and disposable addresses, and guest checkout makes it easy. A small observer on the sales_order_place_after event runs a fast pingutil classification on the customer email and leaves an admin-only order comment, so staff spot throwaway and gibberish addresses before they become support tickets.

Where it connects: Adobe Commerce (Magento) event observer on sales_order_place_after, declared in etc/events.xml

What goes wrong without it

  • Guest orders with addresses like test123@mailinator.com sit in the grid next to real ones and nobody notices until a chargeback.
  • Our transactional mail bounces climb every sale because buyers mistype their address at checkout.
  • We have no quick way to tell a real B2B buyer from a personal webmail account in the order grid.

What you can do with Adobe Commerce and pingutil

  • Comment on suspicious orders

    Classify the email with /v1/lookup and skip_enrichment, which returns in milliseconds, and add an order comment when verdict.is_spam is true or the category is disposable.

  • Verify mailboxes in a background job

    Full /v1/verify checks can take seconds, so run them from a cron job or message queue consumer over recent orders and comment on invalid ones.

  • Flag B2B buyers

    Category company versus free tells you whether the buyer used a work address, which helps B2B stores route new accounts.

Set it up

  1. 1

    Create an API key in the pingutil dashboard and store it in your module configuration or env.php.

  2. 2

    Create a module and declare an observer for sales_order_place_after in etc/events.xml.

  3. 3

    In the observer, read the order from the event, call /v1/lookup with skip_enrichment and a two second timeout, and catch every error.

  4. 4

    Add a comment with addCommentToStatusHistory when the result is suspicious. The order is saved after the event, so the comment is stored with it.

  5. 5

    For mailbox-level checks, add a cron job that calls /v1/verify/batch for recent orders.

Observer/FlagOrderEmail.php
<?php
// etc/events.xml:
// <event name="sales_order_place_after">
//   <observer name="pingutil_flag_order_email" instance="Vendor\Pingutil\Observer\FlagOrderEmail" />
// </event>
namespace Vendor\Pingutil\Observer;

use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\HTTP\Client\Curl;
use Psr\Log\LoggerInterface;

class FlagOrderEmail implements ObserverInterface
{
    public function __construct(private Curl $curl, private LoggerInterface $logger) {}

    public function execute(Observer $observer): void
    {
        $order = $observer->getEvent()->getOrder();
        $email = $order->getCustomerEmail();
        if (!$email) {
            return;
        }

        try {
            $this->curl->setTimeout(2); // never hold up order placement
            $this->curl->addHeader('Authorization', 'Bearer ' . getenv('PINGUTIL_KEY'));
            $this->curl->addHeader('Content-Type', 'application/json');
            $this->curl->post('https://pingutil.com/v1/lookup', json_encode([
                'input' => $email,
                'skip_enrichment' => true,
            ]));
            if ($this->curl->getStatus() !== 200) {
                return; // fail open
            }
            $result = json_decode($this->curl->getBody(), true);
        } catch (\Throwable $e) {
            $this->logger->warning('pingutil lookup failed: ' . $e->getMessage());
            return;
        }

        if ($result['verdict']['is_spam']) {
            $order->addCommentToStatusHistory(
                'pingutil: ' . $result['category'] . ' address (' . $result['verdict']['reason'] . '). Confirm before fulfilling.'
            );
        }
    }
}

What to do with each result

pingutil resultAction in Adobe Commerce
verdict.is_spam: trueAdd an order comment and review before shipping or issuing store credit.
category: "disposable"Comment on the order and exclude the address from newsletter sign-up.
verdict.low_trust: trueRole or system address (billing@, noreply@). Fine for B2B, worth a note for consumer orders.
status: "invalid" (from /v1/verify in cron)Comment and contact the buyer by phone, since order emails will not arrive.

Limits to plan for

  • Observers run inside order placement, so any slow call delays the shopper. Keep the in-request call to the fast lookup with a short timeout and do mailbox checks asynchronously.
  • The fast lookup catches disposable domains and randomized addresses but does not test the mailbox, so it will not catch a typo on a real domain. That needs /v1/verify.
  • pingutil verifies up to 300 addresses a day (3,000 a month) per account and allows 2,000 lookups a day (30,000 a month). Those are Free plan limits; Enterprise has custom limits.

Adobe Commerce documentation

Adobe Commerce is a trademark of its owner. This integration uses Adobe Commerce's documented extension points; it is not an official Adobe Commerce app.

Common questions

Can I use Adobe I/O Events instead of a PHP observer?
Yes. Adobe Commerce can publish observer events such as sales_order_place_after to Adobe I/O Events, and an App Builder action can call pingutil. That keeps the HTTP call off your storefront servers entirely.
Does this work on Magento Open Source?
The events.xml observer mechanism is the same on Magento Open Source and Adobe Commerce.

Stop bad addresses in Adobe Commerce today

Sign in with your email, create an API key and paste it into the step above. Test on a few real addresses first: the live demo shows exactly what your Adobe Commerce setup will receive.