PHPackages                             payfully/integrator - 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. [Payment Processing](/categories/payments)
4. /
5. payfully/integrator

ActiveLibrary[Payment Processing](/categories/payments)

payfully/integrator
===================

Generates payfully integration url

1.0.0(7y ago)09MITPHPPHP &gt;=5.4.0

Since Jan 22Pushed 7y ago2 watchersCompare

[ Source](https://github.com/payfully/payfully-integrator-php)[ Packagist](https://packagist.org/packages/payfully/integrator)[ RSS](/packages/payfully-integrator/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Payfully Integrator PHP
=======================

[](#payfully-integrator-php)

- [Introduction](#introduction)
    - [How it works](#how-it-works)
- [Integration Links](#integration-links)
    - [Data Structure](#-data-structure)
    - [Credentials Explained](#credentials-explained)
    - [Generating Integration URLs](#api-link-generation-php)
- [Creating User Data](#user-required-data)
- [Creating Advance Applications](#aa-required-data)
- [Attaching Documents to an Advance Application](#document-upload)

Introduction
------------

[](#introduction)

Welcome! We greatly appreciate your interest in the [Payfully](https://www.payfully.co/) platform! In this guide we are going to walk you through our integration features.

If you have any questions please don't hesitate to [contact us](alberto@payfully.co).

###  How it works

[](#-how-it-works)

We provide url generator that will create an advance application with the information provided. If the user does not exist in our platform, we will automatically create it.

**Payfully has two (2) environments:**

- Production: Live environment
- Staging: Testing environment

We'll provide the testing environment keys for you, and when the integration is ready we will send the production ones.

**Instructions:**

1. You need to obtain the specific environment credentials: `relativeUrl` and `aesKey`.
2. Gather the required information (user, application, and documents).
3. Add each component to the `$urlGenerator`.
4. Generate a special URL (referred as IntegrationURL).
5. Place them on your platform, so that agents can click on them.

When the Agent (user) which is logged into your platform clicks on the link, they get redirected to Payfully, we automatically log the agent in (and create an account if needed). Finally, the Advance Application is also generated at the same time automatically. The agent will only need to fill out the information that was not provided via the link generator.

**Important:**Integration URLs should be considered as sensitive information and should not be exposed to anyone except the users (which they are generated for). As following the Integration URL allows logging into Payfully account.

 Integration Links
---------------------------------------------------------------

[](#-integration-links)

The generated Integration URL looks like:

`https://.payfully.co/integrations/[relativeUrl]/[encodedData]`

- `**relativeUrl**`: It's the one provided by us for your specific Environment.
- `**encodedData**`: It's the **JSON data** that is first **AES Encrypted** and then **Base64 encoded**.

An example Integration URL looks like:

`https://integration-stage.payfully.co/integrations/SuperAgency/VTJGc2RHVmtYMTlDSlo0Uk16TjJKOFZNZU4rcmc3VWNobUVXMjNtQzQ4ST0=`

###  Data Structure

[](#-data-structure)

The URLGenerator expects you to pass the following data:

```
$urlgenerator->setUser([...]);
$urlgenerator->setApplication([...]);
$urlgenerator->setDocuments([...]);
```

Please refer to the specific sections to get more detail:

- [user](#user-required-data)
- [application](#aa-required-data)
- [documents](#document-upload)

### Credentials Explained

[](#credentials-explained)

In order to generate Integration URLs you will need to get the following credentials:

- `relativeUrl`: Provided by us.
- `aesKey`: - AES Key used to encrypt the data. Also, provided by us.

Please contact immediately a Payfully Admin in case it gets exposed/compromised. The Admin will rotate it and provide you with the new key.

###  Generating an Integration URL

[](#-generating-an-integration-url)

Instructions:

1. Add the library to composer.

```
composer require payfully/integrator

```

2. Instantiate the library object, and set the `relativeUrl`, `aesKey` and `Env` values inside the constructor.

```
require __DIR__ . '/vendor/autoload.php';

use Payfully\Integrator\UrlGenerator;
use Payfully\Integrator\Env;

$relativeUrl = 'SuperAgency';
$aesKey = "Qkoghsks1Oe3V+/s+wtV6b1FFmM+YdQCg0mGPTiO3xofssrcsgR6yA3rvsSIyq/85DiHm/7BIbrEg1GOL1soag==";
$urlgenerator = new UrlGenerator($relativeUrl, $aesKey, Env::Stage);
```

**NOTE: The possible environment values are:**

- `Env::Stage`
- `Env::Production`

*If no environment is set, then we assume it's `production`*

3. Form a PHP array containing the required [data](#data-structure) and set the Data to each section.

```
$urlgenerator->setUser([...]);
$urlgenerator->setApplication([...]);
$urlgenerator->setDocuments([...]);
```

4. Finally call the method `generate()`

```
echo $urlgenerator->generate();
```

Here is the full example:

```
require __DIR__ . '/vendor/autoload.php';

use Payfully\Integrator\UrlGenerator;
use Payfully\Integrator\Env;

$relativeUrl = 'SuperAgency';
$aesKey = "Qkoghsks1Oe3V+/s+wtV6b1FFmM+YdQCg0mGPTiO3xofssrcsgR6yA3rvsSIyq/85DiHm/7BIbrEg1GOL1soag==";
$urlgenerator = new UrlGenerator($relativeUrl, $aesKey, Env::Stage);
$urlgenerator->setUser([...]);
$urlgenerator->setApplication([...]);
$urlgenerator->setDocuments([...]);

echo $urlgenerator->generate();
```

The code above outputs:

```

https://integration-stage.payfully.co/integrations/SuperAgency/VTJGc2RHVmtYMS9EY0FEdnJ0MFdhSkJqdGlIYXB1ZVF5cWE2VkpYSXhiTT0=

```

**NOTE: Tested with PHP v7.1**

 User Data
------------------------------------------------------

[](#-user-data)

### Required Data

[](#required-data)

Each Integration URL must contain the user information.

```
$user = [
  "email"=> "...", // (required) [string] Agent's email
  "fullName" => "...", // (required) [string] Agent's full name
  "phone" => "..." // (required) [string] Agent phone number; Must be a valid US phone number; Format: '+19179246228'
];
```

We are going to create a Payfully account basing on this data.

Note:

- The password is generated and send over the email along with the reset password link.
- If the user with such email already exists **and** created over the integration we just log the user in. (e.g. that could happen if agent follow the same Integration URL twice or more times)

 Advance Applications Data
----------------------------------------------------------------------

[](#-advance-applications-data)

If you have internal MLS ID's for deals please provide it as `dealInformation['mlsId']`. This is used to avoid duplicating Advance Applications. If `mlsId` Is missing it's going to be auto-generated by combining `dealInformation['closingDate']` and `dealInformation['propertyAddress']`.

Any optional data that was not provided by Integration URL can be filled later manually.

### Required Data

[](#required-data-1)

```
$application = [
  'shareOfCommission' => ..., // (optional) [number] - Commission ammount expected by the Agent for the deal
  'dealInformation' => [
    'propertyAddress' => "...", // (optional) [string] - Address of the property
    'propertyType' => "...", // (optional) [string] - Type of property
    'isNewConstruction' => true/false, // (optional) [boolean] - Is it a new contruction?
    'isShortSale' => true/false, // (optional) [boolean] - Is it a short sale?
    'ratificationDate' => "...", // (optional) [string] ISO 8601 Date String - Date in which al contingencies are met
    'closingDate' => "...", // (optional) [string] ISO 8601 Date String - Closing date of the contract
    'mlsId' => "..." // (optional) [string] - MLS ID
  ],
  'agentInformation' => [
    'represents' => "...", // (optional) [string] - Who does the agent represents on this deal (see below)
    'completedTransactions' => ..., // (optional) [number] - Completed transactions by the agent in the last 6 months
    'pendingContracts' => ..., // (optional) [number] - Number of Agent's pending contracts at the moment
    'activeListings' => ..., // (optional) [number] - Number of Agent's active listings at the moment
    'licenseNumber' => "..." // (optional) [string] - Agent's license number
  ]
];
```

`agentInformation['represents']` can only be one of:

- 'Listing'
- 'Buying'
- 'Both'

`dealInformation['propertyType']` should be one of:

- 'Condo'
- 'Co-op'
- 'Single-Family'
- 'Multi-Family'
- 'Townhouse'
- 'Manufactured Home'
- 'Half Duplex'
- 'Mobile Home'
- 'Other' - Provide the string

###  Attaching Documents to Advance Application

[](#-attaching-documents-to-advance-application)

The `documents` property on Integration URLs data allows attaching documents to Advance Application. If this object is empty, the agent will need to upload all documents on our platform.

The documents object looks like:

```
$documents = [
  [
    "type" => "..." // (required) [string] Document type. Please find the list of available document types below.
    "url" => "..." // (required) [string] A URL for a direct document download. HTTP GET is used to fetch the document.
  ],
  [ ... ]
];
```

The document type should be one of:

- "idDocuments" - You can upload up to 2 documents here with the same type
- "contract" - Contract of sale
- "commission\_report" - Commission report for the Agent
- "agreement" - MLS agreement for that specific listing
- "money\_deposit" - Earnest Money Deposit
- "pre\_approval\_letter" - Pre approval letter of the buyer
- "inspection\_report" - A document that contains the inspection report
- "bank\_approval" - The bank approval for the mortgage

Note: Documents are downloaded in a separate process. That happens in a background. The agent is going to be notified that the documents are loading when he visits Payfully website.

Also if any of the document downloads fail, the agent will be able to do a manual upload at Payfully website.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 54.2% 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

Unknown

Total

1

Last Release

2669d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b55c05e4ecd03a15f40437d09f697451e14d2a895d06163c3acfb39cae484e2f?d=identicon)[duvanmonsa](/maintainers/duvanmonsa)

---

Top Contributors

[![duvanmonsa](https://avatars.githubusercontent.com/u/2709271?v=4)](https://github.com/duvanmonsa "duvanmonsa (13 commits)")[![asheinfeld](https://avatars.githubusercontent.com/u/825651?v=4)](https://github.com/asheinfeld "asheinfeld (11 commits)")

---

Tags

integratorPayfullyRealState

### Embed Badge

![Health badge](/badges/payfully-integrator/health.svg)

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

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[oxid-solution-catalysts/paypal-module

OXID eSales PayPal payment module for OXID

2126.8k](/packages/oxid-solution-catalysts-paypal-module)

PHPackages © 2026

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