PHPackages                             bee-delivery/laraifood - 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. bee-delivery/laraifood

ActiveLibrary[API Development](/categories/api)

bee-delivery/laraifood
======================

Integração rápida e fácil com o iFood, em PHP

0.1.0(2y ago)19.0k↓50%1MITPHPPHP &gt;=7.1.3

Since Aug 16Pushed 2y ago1 watchersCompare

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

READMEChangelog (10)DependenciesVersions (12)Used By (0)

Lara iFood
==========

[](#lara-ifood)

Integre seu sistema rapidamente com o iFood através deste pacote.

Instalando
----------

[](#instalando)

Instale com [composer](https://getcomposer.org/):

```
composer require bee-delivery/laraifood
```

Authentication OAuth
--------------------

[](#authentication-oauth)

Issues a user code to link applications in Partner Portal and grant them permissions to access merchant resources

```
$response = LaraiFood::auth()->getUserCode();
```

> Example of response

```
[
  "code" => 200
  "response" => [
    "userCode" => "ABCD-EFGH"
    "authorizationCodeVerifier" => "9v3tzb6uovoexps42o22cqkqtqs7v040lj30zt10efhru80ayr1y533yge8mj9i0r479lshtjaq1lmjmlgxwzhfeh5fgxzl5s00"
    "verificationUrl" => "https://portal.ifood.com.br/apps/code"
    "verificationUrlComplete" => "https://portal.ifood.com.br/apps/code?c=NFXD-RWZN"
    "expiresIn" => 600
  ]
]
```

### Requests new access token for accessing our API resources. By default, the token expires in 6 hours.

[](#requests-new-access-token-for-accessing-our-api-resources-by-default-the-token-expires-in-6-hours)

```
$response = LaraiFood::auth()->getToken([
  'authorizationCode' => 'RTHJ-TBHB', //this code is generated when Partner grants permission to your application
  'authorizationCodeVerifier' => '9v3tzb6uovoexps42o22cqkqtqs7v040lj30zt10efhru80ayr1y533yge8mj9i0r479lshtjaq1lmjmlgxwzhfeh5fgxzl5s00' //this code is received in the method getUserCode
]);
```

> Example of response

```
[
  "code" => 200
  "response" => [
    {
      "accessToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzUxMiJ9.eyJzdWIiOiJlNjkwYjczZC01OTI4LTRkMTctODE2ZC01Y2Y5YjgyZTJhOWUiLCJhdWQiOiJvcmRlciIsInVzZXJfbmFtZSI6ImU2OTBiNzNkLTU5MjgtNGQxNy04MTZkLTVjZjliODJlMmE5ZSIsInNjb3BlIjpbIm9yZGVyIl0sInRlbmFudElkIjoiNmFjNjkxZDEtMjZjNi00ZmVkLWJmN2ItOTEwMzJkNTM4NWZkIiwiaXNzIjoiaUZvb2QiLCJtZXJjaGFudF9zY29wZSI6WyI2YjQ4N2EyNy1jNGZjLTRmMjYtYjA1ZS0zOTY3YzIzMzE4ODI6b3JkZXIiXSwiZXhwIjoxNjEyMjMwNDU5LCJpYXQiOjE2MTIyMDg4NTksIm1lcmNoYW50X3Njb3BlZCI6dHJ1ZSwiY2xpZW50X2lkIjoiZTY5MGI3M2QtNTkyOC00ZDE3LTgxNmQtNWNmOWI4MmUyYTllIiwiYXV0aG9yaXRpZXMiOlsiUk9MRV9DTElFTlQiXX0.lYqdxjHoOksq8COqJ-VZxzd524MhVzH7hkMfp5zGTpqzp26z5XJwOPHAy7L6oyagUgRfxntKeu0Up_JHgJ-Vr0h5Y9wY4XHcK1yxpFXFB5f5ilGDB0hVN3UGa4GBqeVpCbAPQUl4VhbF2byeL9PuO4TfTZmoWyuec9-xEH_nbHg",
      "type": "bearer",
      "expiresIn": 21600
    }
  ]
]
```

Merchant
--------

[](#merchant)

The Merchant API provides means to interact with merchants on the platform. It is separated into three core parts. Merchant, Status and Interruption, which are described in further detail hereafter. All endpoints require authentication.

### Get all merchants

[](#get-all-merchants)

Lists the summary of all merchants related to the client in the token.

```
$accessToken = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzUxMiJ9.eyJzdWIiOiI4OGUyMzJjMi02OWQ4LTQwMGMtYjI4ZS0yZWU4Yzc0ZjUzMzIiLCJhcHBfbmFtZSI6ImRmYjk1ZjBmLThmZWItNGRhMi1iYTVlLWI4ZDI3MTlmMzFkYyIsImF1ZCI6WyJjYXRhbG9nIiwiZmluYW5jaWFsIiwicmV2aWV3IiwibWVyY2hhbnQiLCJvcmRlciIsIm9hdXRoLXNlcnZlciJdLCJvd25lcl9uYW1lIjoiIiwic2NvcGUiOlsiY2F0YWxvZyIsInJldmlldyIsIm1lcmNoYW50Iiwib3JkZXIiLCJjb25jaWxpYXRvciJdLCJpc3MiOiJpRm9vZCIsInR5cGUiOiJjb21wYWN0IiwiZXhwIjoxNjI5MTc4NDkwLCJpYXQiOjE2MjkxNTY4OTAsImp0aSI6IjI5NGRlNTE0LWM3MTQtNDY4YS1hOWNlLWYyZjM2ZGFhZjhiMiIsIm1lcmNoYW50X3Njb3BlZCI6dHJ1ZSwiY2xpZW50X2lkIjoiZGZiOTVmMGYtOGZlYi00ZGEyLWJhNWUtYjhkMjcxOWYzMWRjIn0.Y1gu30zk7vDXAWtIGJR7DnFAwEFL63rUH9DddQp-au_1OVY0yPHC92bI4lRLc8nfLiUT2drx2KFB2X0M1DCRVMA9RX4_5GFUy1bRXJiBttAsM5-C3egZMRYG5cVpDYXs8NZORLIPZVMcACAJ_1DOHabBpIyabkimMxIj8pXUG0E';
$merchantId = '75f3535e-af3e-4034-b748-908f587e45c4';

$response = LaraiFood::merchant($accessToken)->getAllMerchants();
```

> Example of response

```
[
  "code" => 200
  "response" => [
    [
      {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "name": "string",
        "corporateName": "string"
      }
    ],
    [
      {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "name": "string",
        "corporateName": "string"
      }
    ]
  ]
]
```

### Get detailed about the merchant

[](#get-detailed-about-the-merchant)

Gets detailed information about the merchant, such as merchant basic info, address and operations.

```
$accessToken = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzUxMiJ9.eyJzdWIiOiI4OGUyMzJjMi02OWQ4LTQwMGMtYjI4ZS0yZWU4Yzc0ZjUzMzIiLCJhcHBfbmFtZSI6ImRmYjk1ZjBmLThmZWItNGRhMi1iYTVlLWI4ZDI3MTlmMzFkYyIsImF1ZCI6WyJjYXRhbG9nIiwiZmluYW5jaWFsIiwicmV2aWV3IiwibWVyY2hhbnQiLCJvcmRlciIsIm9hdXRoLXNlcnZlciJdLCJvd25lcl9uYW1lIjoiIiwic2NvcGUiOlsiY2F0YWxvZyIsInJldmlldyIsIm1lcmNoYW50Iiwib3JkZXIiLCJjb25jaWxpYXRvciJdLCJpc3MiOiJpRm9vZCIsInR5cGUiOiJjb21wYWN0IiwiZXhwIjoxNjI5MTc4NDkwLCJpYXQiOjE2MjkxNTY4OTAsImp0aSI6IjI5NGRlNTE0LWM3MTQtNDY4YS1hOWNlLWYyZjM2ZGFhZjhiMiIsIm1lcmNoYW50X3Njb3BlZCI6dHJ1ZSwiY2xpZW50X2lkIjoiZGZiOTVmMGYtOGZlYi00ZGEyLWJhNWUtYjhkMjcxOWYzMWRjIn0.Y1gu30zk7vDXAWtIGJR7DnFAwEFL63rUH9DddQp-au_1OVY0yPHC92bI4lRLc8nfLiUT2drx2KFB2X0M1DCRVMA9RX4_5GFUy1bRXJiBttAsM5-C3egZMRYG5cVpDYXs8NZORLIPZVMcACAJ_1DOHabBpIyabkimMxIj8pXUG0E';
$merchantId = '75f3535e-af3e-4034-b748-908f587e45c4';

$response = LaraiFood::merchant($accessToken)->getMerchant($merchantId);
```

> Example of response

```
[
  "code" => 200
  "response" => [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "name": "string",
      "corporateName": "string",
      "description": "string",
      "averageTicket": 0,
      "exclusive": true,
      "type": "RESTAURANT",
      "status": "AVAILABLE",
      "createdAt": "2021-08-17T01:25:30.742Z",
      "address": {
        "country": "string",
        "state": "string",
        "city": "string",
        "postalCode": "string",
        "district": "string",
        "street": "string",
        "number": "string",
        "latitude": 0,
        "longitude": 0
      },
      "operations": {
        "name": "delivery",
        "salesChannel": {
          "name": "ifood-app",
          "enabled": "string"
        }
      }
    }
  ]
]
```

Order
-----

[](#order)

The Order API provides means to interact with orders on the platform. It is separated into three core parts: Events, Details and Actions, which are described in further detail hereafter. All endpoints require authentication.

### Events

[](#events)

Polls events for any orders from merchants associated with the authenticated user.

Each event received from this endpoint must be properly acknowledged, otherwise it will continue to be returned on further requests.

```
$accessToken = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzUxMiJ9.eyJzdWIiOiI4OGUyMzJjMi02OWQ4LTQwMGMtYjI4ZS0yZWU4Yzc0ZjUzMzIiLCJhcHBfbmFtZSI6ImRmYjk1ZjBmLThmZWItNGRhMi1iYTVlLWI4ZDI3MTlmMzFkYyIsImF1ZCI6WyJjYXRhbG9nIiwiZmluYW5jaWFsIiwicmV2aWV3IiwibWVyY2hhbnQiLCJvcmRlciIsIm9hdXRoLXNlcnZlciJdLCJvd25lcl9uYW1lIjoiIiwic2NvcGUiOlsiY2F0YWxvZyIsInJldmlldyIsIm1lcmNoYW50Iiwib3JkZXIiLCJjb25jaWxpYXRvciJdLCJpc3MiOiJpRm9vZCIsInR5cGUiOiJjb21wYWN0IiwiZXhwIjoxNjI5MTc4NDkwLCJpYXQiOjE2MjkxNTY4OTAsImp0aSI6IjI5NGRlNTE0LWM3MTQtNDY4YS1hOWNlLWYyZjM2ZGFhZjhiMiIsIm1lcmNoYW50X3Njb3BlZCI6dHJ1ZSwiY2xpZW50X2lkIjoiZGZiOTVmMGYtOGZlYi00ZGEyLWJhNWUtYjhkMjcxOWYzMWRjIn0.Y1gu30zk7vDXAWtIGJR7DnFAwEFL63rUH9DddQp-au_1OVY0yPHC92bI4lRLc8nfLiUT2drx2KFB2X0M1DCRVMA9RX4_5GFUy1bRXJiBttAsM5-C3egZMRYG5cVpDYXs8NZORLIPZVMcACAJ_1DOHabBpIyabkimMxIj8pXUG0E';

$response = LaraiFood::order($accessToken)->eventsPolling();
```

> Example of response

```
[
  "code" => 200
  "response" => [
      {
        "createdAt": "2019-09-19T13:40:11.822Z",
        "fullCode": "PLACED",
        "metadata": {
          "additionalProp1": {},
          "additionalProp2": {},
          "additionalProp3": {}
        },
        "code": "PLC",
        "orderId": "07110e1b-8191-4670-baed-407219481ffb",
        "id": "cd40582b-0ef2-4d52-bc7c-507fdff12e21"
      }
  ]
]
```

### Details

[](#details)

Full information on the order (items, payment, delivery information, etc.).

```
$accessToken = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzUxMiJ9.eyJzdWIiOiI4OGUyMzJjMi02OWQ4LTQwMGMtYjI4ZS0yZWU4Yzc0ZjUzMzIiLCJhcHBfbmFtZSI6ImRmYjk1ZjBmLThmZWItNGRhMi1iYTVlLWI4ZDI3MTlmMzFkYyIsImF1ZCI6WyJjYXRhbG9nIiwiZmluYW5jaWFsIiwicmV2aWV3IiwibWVyY2hhbnQiLCJvcmRlciIsIm9hdXRoLXNlcnZlciJdLCJvd25lcl9uYW1lIjoiIiwic2NvcGUiOlsiY2F0YWxvZyIsInJldmlldyIsIm1lcmNoYW50Iiwib3JkZXIiLCJjb25jaWxpYXRvciJdLCJpc3MiOiJpRm9vZCIsInR5cGUiOiJjb21wYWN0IiwiZXhwIjoxNjI5MTc4NDkwLCJpYXQiOjE2MjkxNTY4OTAsImp0aSI6IjI5NGRlNTE0LWM3MTQtNDY4YS1hOWNlLWYyZjM2ZGFhZjhiMiIsIm1lcmNoYW50X3Njb3BlZCI6dHJ1ZSwiY2xpZW50X2lkIjoiZGZiOTVmMGYtOGZlYi00ZGEyLWJhNWUtYjhkMjcxOWYzMWRjIn0.Y1gu30zk7vDXAWtIGJR7DnFAwEFL63rUH9DddQp-au_1OVY0yPHC92bI4lRLc8nfLiUT2drx2KFB2X0M1DCRVMA9RX4_5GFUy1bRXJiBttAsM5-C3egZMRYG5cVpDYXs8NZORLIPZVMcACAJ_1DOHabBpIyabkimMxIj8pXUG0E';
$orderId = '3fa85f64-5717-4562-b3fc-2c963f66afa6';
$response = LaraiFood::order($accessToken)->details($orderId);
```

> Example of response

```
[
  "code" => 200
  "response" => [
    {
      "benefits": [
        {
          "targetId": "string",
          "sponsorshipValues": [
            {
              "name": "string",
              "value": 0
            }
          ],
          "value": 0,
          "target": "string"
        }
      ],
      "orderType": "DELIVERY",
      "payments": {
        "methods": [
          {
            "wallet": {
              "name": "string"
            },
            "method": "string",
            "prepaid": true,
            "currency": "string",
            "type": "ONLINE",
            "value": 0,
            "cash": {
              "changeFor": 0
            },
            "card": {
              "brand": "string"
            }
          }
        ],
        "pending": 0,
        "prepaid": 0
      },
      "merchant": {
        "name": "string",
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      },
      "salesChannel": "string",
      "picking": {
        "picker": "string",
        "replacementOptions": "STORE_CHOOSE_OTHER_ITEMS"
      },
      "orderTiming": "IMMEDIATE",
      "createdAt": "2021-08-17T01:14:22.581Z",
      "total": {
        "benefits": 0,
        "deliveryFee": 0,
        "orderAmount": 0,
        "subTotal": 0,
        "additionalFees": 0
      },
      "preparationStartDateTime": "2021-08-17T01:14:22.581Z",
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "displayId": "string",
      "items": [
        {
          "unitPrice": 0,
          "quantity": 0,
          "externalCode": "string",
          "totalPrice": 0,
          "index": 0,
          "unit": "string",
          "ean": "string",
          "price": 0,
          "observations": "string",
          "imageUrl": "string",
          "name": "string",
          "options": [
            {
              "unitPrice": 0,
              "unit": "string",
              "ean": "string",
              "quantity": 0,
              "externalCode": "string",
              "price": 0,
              "name": "string",
              "index": 0,
              "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
              "addition": 0
            }
          ],
          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "optionsPrice": 0
        }
      ],
      "customer": {
        "phone": {
          "number": "string",
          "localizer": "string",
          "localizerExpiration": "2021-08-17T01:14:22.581Z"
        },
        "documentNumber": "string",
        "name": "string",
        "ordersCountOnMerchant": 0,
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      },
      "extraInfo": "string",
      "additionalFees": [
        {
          "type": "string",
          "value": 0
        }
      ],
      "delivery": {
        "mode": "DEFAULT",
        "deliveredBy": "IFOOD",
        "deliveryAddress": {
          "reference": "string",
          "country": "string",
          "streetName": "string",
          "formattedAddress": "string",
          "streetNumber": "string",
          "city": "string",
          "postalCode": "string",
          "coordinates": {
            "latitude": 0,
            "longitude": 0
          },
          "neighborhood": "string",
          "state": "string",
          "complement": "string"
        },
        "deliveryDateTime": "2021-08-17T01:14:22.581Z"
      },
      "schedule": {
        "deliveryDateTimeStart": "2021-08-17T01:14:22.581Z",
        "deliveryDateTimeEnd": "2021-08-17T01:14:22.581Z"
      },
      "indoor": {
        "mode": "DEFAULT",
        "deliveryDateTime": "2021-08-17T01:14:22.581Z",
        "table": "string"
      },
      "takeout": {
        "mode": "DEFAULT",
        "takeoutDateTime": "2021-08-17T01:14:22.581Z"
      }
    }
  ]
]
```

Licença
-------

[](#licença)

Sinta-se a vontade em nos ajudar. Faça um PR :)

GNU General Public License v3

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60% 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 ~64 days

Recently: every ~161 days

Total

11

Last Release

1083d ago

### Community

Maintainers

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

---

Top Contributors

[![luanrodrigues](https://avatars.githubusercontent.com/u/8210294?v=4)](https://github.com/luanrodrigues "luanrodrigues (12 commits)")[![flads](https://avatars.githubusercontent.com/u/43182319?v=4)](https://github.com/flads "flads (7 commits)")[![Jorzel21](https://avatars.githubusercontent.com/u/66644621?v=4)](https://github.com/Jorzel21 "Jorzel21 (1 commits)")

---

Tags

phplaravelifoodbee-deliverylaraifood

### Embed Badge

![Health badge](/badges/bee-delivery-laraifood/health.svg)

```
[![Health](https://phpackages.com/badges/bee-delivery-laraifood/health.svg)](https://phpackages.com/packages/bee-delivery-laraifood)
```

###  Alternatives

[joisarjignesh/bigbluebutton

BigBlueButton Server API Library for Laravel

162145.5k1](/packages/joisarjignesh-bigbluebutton)[jeroen-g/flickr

Modern PHP package to make Flickr API calls. Ships with Laravel implementation.

2559.9k2](/packages/jeroen-g-flickr)[octw/aramex

A Library to integrate with Aramex APIs

2925.2k](/packages/octw-aramex)[exlo89/laravel-sevdesk-api

A helpful Sevdesk API client for Laravel.

1116.5k](/packages/exlo89-laravel-sevdesk-api)[dystcz/lunar-api

Dystore API layer for Lunar e-commerce package

411.1k3](/packages/dystcz-lunar-api)[wxm/pdd-sdk

拼多多 SDK 封装, 调用简单、语义化增强。支持 Laravel/Lumen。

154.7k](/packages/wxm-pdd-sdk)

PHPackages © 2026

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