PHPackages                             placetopay/emailage - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. placetopay/emailage

ActiveLibrary[API Development](/categories/api)

placetopay/emailage
===================

SDK to connect with Emailage service

2.0.0(2y ago)185.0k↓35.8%MITPHPPHP ^8.1

Since Jun 12Pushed 2y ago3 watchersCompare

[ Source](https://github.com/placetopay-org/emailage)[ Packagist](https://packagist.org/packages/placetopay/emailage)[ RSS](/packages/placetopay-emailage/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (22)Used By (0)

Emailage PHP SDK
================

[](#emailage-php-sdk)

Installation
------------

[](#installation)

This SDK can be installed easily through composer

```
composer require placetopay/emailage
```

Usage
-----

[](#usage)

```
$emailage = new \PlacetoPay\Emailage\Validator([
    'account' => 'YOUR_MERCHANT',
    'token' => 'THE_API_KEY_PROVIDED',
    'sandbox' => false,
]);
```

Also can provide "verify\_ssl" boolean to check or ignore valid ssl certificates

### Additional parameters

[](#additional-parameters)

You can send additional information to Emailage with the following structure

```
$additional = [
    // Person related
    'payer' => [
        'name' => 'Diego',
        'surname' => 'Calle',
        'email' => 'dnetix@gmail.com',
        'document' => '1040035000',
        'documentType' => 'CC',
        'address' => [
            'street' => 'Fake street 123',
            'city' => 'Medellin',
            'state' => 'Antioquia',
            'postalCode' => '050012',
            'country' => 'CO',
            'phone' => '4442310',
        ],
    ],
    'payment' => [
        'reference' => '1234',
        'amount' => [
            'currency' => 'COP',
            'total' => '12300',
        ],
        'shipping' => [
            'name' => 'Diego',
            'surname' => 'Calle',
            'email' => 'fake@email.com',
            'address' => [
                'street' => 'Fake street 321',
                'city' => 'Sabaneta',
                'state' => 'Antioquia',
                'postalCode' => '050013',
                'country' => 'CO',
                'phone' => '4442310',
            ],
        ],
    ],
    'instrument' => [
        'card' => [
            'number' => '9bbef19476623ca56c17da75fd57734dbf82530686043a6e491c6d71befe8f6e',
            'bin' => '411111',
        ],
    ],
    'userAgent' => 'Chrome XYZ',
];
```

### Validating an email

[](#validating-an-email)

Keep in mind that additional it's optional

```
$result = $emailage->query('test@example.com', $additional);

if ($result->isSuccessful()) {
    // There are more information about the response, see src/Messages/RiskResponse
    $score = $result->score();
    // Handle the score
} else {
    // There is some error, you can handle it
    print_r($result->errorMessage());
}
```

### Validating an email and ip

[](#validating-an-email-and-ip)

```
$result = $emailage->query('test@example.com+127.0.0.1');

if ($result->isSuccessful()) {
    // There are more information about the response, see src/Messages/RiskResponse
    $score = $result->score();
    // Handle the score
} else {
    // There is some error, you can handle it
    print_r($result->errorMessage());
}
```

### Validating an ip

[](#validating-an-ip)

```
$result = $emailage->query('127.0.0.1');

if ($result->isSuccessful()) {
    $riskLevel = $result->ipRiskLevel();
} else {
    // There is some error, you can handle it
    print_r($result->errorMessage());
}
```

### Flag an email as fraud

[](#flag-an-email-as-fraud)

```
$result = $emailage->flagFraudEmail('test@example.com', \PlacetoPay\Emailage\Validator::FR_CARD_NOT_PRESENT_FRAUD);

if ($result->isSuccessful()) {
    // Email has been flagged
} else {
    // There is some error, you can handle it
    print_r($result->errorMessage());
}
```

### Flag an email as good

[](#flag-an-email-as-good)

```
$result = $emailage->flagGoodEmail('test@example.com');

if ($result->isSuccessful()) {
    // Email has been flagged
} else {
    // There is some error, you can handle it
    print_r($result->errorMessage());
}
```

### Getting the EmailAge Response

[](#getting-the-emailage-response)

Although Emailage delivers the results in a one-level-deep array, you have access to convenient methods for getting specifically the information you need from the returned response. You can organize the data in a grouped way according to the type of data:

```
$result = $emailage->query('test@gmail.com+12.12.12.12');

$response = [
    'score' => $result->score(),
    'riskReason' => $result->riskReason(),
    'riskReasonMessage' => $result->riskReasonMessage(),
    'riskStatus' => $result->riskStatus(),
    'riskAdvice' => $result->riskAdvice(),
    'riskAdviceMessage' => $result->riskAdviceMessage(),
    'riskBand' => $result->riskBand(),
    'riskBandMessage' => $result->riskBandMessage(),
    'ipRiskLevel' => $result->ipRiskLevel(),
    'ipRiskLevelMessage' => $result->ipRiskLevelMessage(),
    'sourceIndustry' => $result->sourceIndustry(),
    'lastFlaggedOn' => $result->lastFlaggedOn(),
    'fraudType' => $result->fraudType(),
    'disOverallScore' => $result->disOverallScore(),
    'disOverallScoreDescrition' => $result->disOverallScoreDescrition(),
    'addressInformation' => $result->addressInformation(),
    'digitalIdentityScoreInformation' => $result->digitalIdentityScoreInformation(),
    'emailInformation' => $result->emailInformation(),
    'ipInformation' => $result->ipInformation(),
    'ipRiskInformation' => $result->ipRiskInformation(),
    'ipLocationInformation' => $result->ipLocationInformation(),
    'ownerInformation' => $result->ownerInformation(),
    'phoneInformation' => $result->phoneInformation(),
    'socialMediaInformation' => $result->socialMediaInformation(),
];
```

The above will create an array with the following structure:

```
[
    'score' => '995',
    'riskReason' => '1',
    'riskReasonMessage' => 'Fraud Level 6',
    'riskStatus' => '3',
    'riskAdvice' => '1',
    'riskAdviceMessage' => 'Fraud Review',
    'riskBand' => '6',
    'riskBandMessage' => 'Fraud Score 900 to 999',
    'ipRiskLevel' => '3',
    'ipRiskLevelMessage' => 'Moderate',
    'sourceIndustry' => 'Anti-Fraud Solution Provider',
    'lastFlaggedOn' => '2018-05-29T17:29:00Z',
    'fraudType' => 'Customer Dispute (Chargeback)',
    'disOverallScore' => '48',
    'disOverallScoreDescrition' => 'Moderate Confidence',
    'addressInformation' => [
        'billRiskCountry' => 'No',
        'cityPostalMatch' => '',
        'domainCountryMatch' => 'Yes',
        'shippingCityPostalMatch' => 'No',
        'shippingForward' => '',
    ],
    'digitalIdentityScoreInformation' => [
        'description' => 'Moderate Confidence',
        'overallScore' => '48',
        'billAddressToFullNameConfidence' => '10',
        'billAddressToLastNameConfidence' => '10',
        'emailToIpConfidence' => '72',
        'emailToBillAddressConfidence' => '30',
        'emailToFullNameConfidence' => '30',
        'emailToLastNameConfidence' => '29',
        'emailToPhoneConfidence' => '32',
        'emailToShipAddressConfidence' => '56',
        'ipToBillAddressConfidence' => '10',
        'ipToFullNameConfidence' => '29',
        'ipToLastNameConfidence' => '68',
        'ipToPhoneConfidence' => '34',
        'ipToShipAddressConfidence' => '29',
        'phoneToBillAddressConfidence' => '43',
        'phoneToFullNameConfidence' => '40',
        'phoneToLastNameConfidence' => '38',
        'phoneToShipAddressConfidence' => '43',
        'shipAddressToBillAddressConfidence' => '40',
        'shipAddressToFullNameConfidence' => '32',
        'shipAddressToLastNameConfidence' => '32',
    ],
    'emailInformation' => [
        'email' => 'test@example.com',
        'age' => '',
        'country' => 'US',
        'company' => '',
        'exists' => 'Not Anymore',
        'status' => 'EmailInexistent',
        'firstSeen' => '2005-05-30T00:00:00Z',
        'firstSeenDays' => '4758',
        'lastSeen' => '2018-06-08T08:15:49Z',
        'imageUrl' => '',
        'hits' => '510',
        'uniqueHits' => '3',
        'creationDays' => '',
        'domain' => [
            'name' => 'gmail.com',
            'age' => '1995-08-13T04:00:00Z',
            'category' => 'Webmail',
            'corporate' => 'No',
            'exists' => 'Yes',
            'company' => 'Google',
            'countryName' => 'United States',
            'riskLevel' => '3',
            'riskCountry' => 'No',
            'riskLevelMessage' => 'Moderate',
            'relevantInfo' => '508',
            'relevantInfoMessage' => 'Valid Webmail Domain from United States',
            'creationDays' => '8335',
            'fraudRisk' => '995 Very High',
        ],
    ],
    'ipInformation' => [
        'ip' => '12.12.12.12',
        'anonymousDetected' => 'No',
        'autonomousSystemNumber' => '32328 alascom inc.',
        'city' => 'fairbanks',
        'corporateProxy' => 'Yes',
        'country' => 'US',
        'countryMatch' => 'Yes',
        'domain' => 'att.com',
        'isp' => 'att services inc.',
        'region' => 'alaska',
        'latitude' => '64.8363',
        'longitude' => '-147.715',
        'netSpeed' => 'broadband',
        'organization' => 'alascom inc.',
        'reputation' => 'Good',
        'userType' => 'wifi',
    ],
    'ipRiskInformation' => [
        'level' => '3',
        'levelMessage' => 'Moderate',
        'reasonId' => '311',
        'reason' => 'Moderate By Proxy Reputation And Country Code',
        'riskCountry' => '',
    ],
    'ipLocationInformation' => [
        'callingCode' => '907',
        'city' => 'fairbanks',
        'cityConfidence' => '95',
        'continentCode' => 'na',
        'country' => 'United States',
        'countryCode' => 'US',
        'countryConfidence' => '99',
        'distanceMil' => '5366',
        'distanceKm' => '8633',
        'latitude' => '64.8363',
        'longitude' => '-147.715',
        'map' => 'https://app.emailage.com/query/GoogleMaps?latLng=64.8363,-147.715',
        'metroCode' => '745',
        'region' => 'alaska',
        'regionConfidence' => '99',
        'postalCode' => '99701',
        'postalConfidence' => '50',
        'timeZone' => '-800',
    ],
    'ownerInformation' => [
        'eName' => 'Test EA',
        'location' => '',
        'title' => '',
    ],
    'phoneInformation' => [
        'carrierName' => 'Verizon Wireless',
        'carrierType' => 'mobile',
        'inBillingLocation' => 'Not Found',
        'owner' => 'Test EA',
        'ownerMatch' => 'Y',
        'ownerType' => 'CONSUMER',
        'status' => 'Valid',
    ],
    'socialMediaInformation' => [
        'smFriends' => '2',
        'smLinks' => [
            [
                'source' => 'GooglePlus',
                'link' => 'https://plus.google.com/10886018',
            ],
        ],
    ],
]
```

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 52.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~121 days

Recently: every ~333 days

Total

21

Last Release

832d ago

Major Versions

0.2.14 → 1.0.02020-06-12

1.2.0 → 2.0.02024-02-06

PHP version history (2 changes)1.0.0PHP &gt;=7.3

1.2.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/03d2682a1a3738e26a24c2233b17f57a902d930b534dab3898a7d43616410580?d=identicon)[dnetix](/maintainers/dnetix)

![](https://www.gravatar.com/avatar/188a6d118a8949533ff4154931c90b50f20e0fdebfb98831fd215a50430cfa67?d=identicon)[placetopay](/maintainers/placetopay)

---

Top Contributors

[![dnetix](https://avatars.githubusercontent.com/u/4644865?v=4)](https://github.com/dnetix "dnetix (37 commits)")[![asilvabe](https://avatars.githubusercontent.com/u/2821564?v=4)](https://github.com/asilvabe "asilvabe (19 commits)")[![placetopay](https://avatars.githubusercontent.com/u/6070773?v=4)](https://github.com/placetopay "placetopay (8 commits)")[![drakenya](https://avatars.githubusercontent.com/u/1884762?v=4)](https://github.com/drakenya "drakenya (3 commits)")[![egarcam](https://avatars.githubusercontent.com/u/4977525?v=4)](https://github.com/egarcam "egarcam (2 commits)")[![lauana-oh](https://avatars.githubusercontent.com/u/56528319?v=4)](https://github.com/lauana-oh "lauana-oh (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/placetopay-emailage/health.svg)

```
[![Health](https://phpackages.com/badges/placetopay-emailage/health.svg)](https://phpackages.com/packages/placetopay-emailage)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[wheelpros/fitment-platform-api

Magento 2 (Open Source)

12.1k1.2k](/packages/wheelpros-fitment-platform-api)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

517.9M7](/packages/avalara-avataxclient)[alexacrm/dynamics-webapi-toolkit

Web API toolkit for Microsoft Dynamics 365 and Dynamics CRM

81324.1k1](/packages/alexacrm-dynamics-webapi-toolkit)[commercetools/commercetools-sdk

The official PHP SDK for the commercetools Composable Commerce APIs

19281.5k](/packages/commercetools-commercetools-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
