PHPackages                             beedelivery/laravel-ifood - 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. beedelivery/laravel-ifood

ActiveLibrary[API Development](/categories/api)

beedelivery/laravel-ifood
=========================

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

0.1.7(7mo ago)05.0k↓25.8%MITPHPPHP &gt;=8.1

Since Jul 3Pushed 7mo agoCompare

[ Source](https://github.com/bee-delivery/laravel-ifood)[ Packagist](https://packagist.org/packages/beedelivery/laravel-ifood)[ RSS](/packages/beedelivery-laravel-ifood/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)DependenciesVersions (18)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/LaravelIfood
```

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

[](#authentication-oauth)

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

```
$response = LaravelIfood::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 = LaravelIfood::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 = LaravelIfood::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 = LaravelIfood::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 = LaravelIfood::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 = LaravelIfood::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

39

—

LowBetter than 84% of packages

Maintenance64

Regular maintenance activity

Popularity23

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~32 days

Recently: every ~101 days

Total

17

Last Release

221d ago

PHP version history (2 changes)0.0.1PHP &gt;=7.1.3

0.0.2PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/877555b5761ecafd8257f3a8fa201c68360a23ebee4d80b7d4dc13c7691aee4e?d=identicon)[Jorzel21](/maintainers/Jorzel21)

---

Top Contributors

[![ramonbeedelivery](https://avatars.githubusercontent.com/u/72159417?v=4)](https://github.com/ramonbeedelivery "ramonbeedelivery (17 commits)")[![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)")[![johnkmedeiros](https://avatars.githubusercontent.com/u/51450133?v=4)](https://github.com/johnkmedeiros "johnkmedeiros (2 commits)")[![Jorzel21](https://avatars.githubusercontent.com/u/66644621?v=4)](https://github.com/Jorzel21 "Jorzel21 (1 commits)")

---

Tags

phplaravelifoodbee-deliverylaravelifood

### Embed Badge

![Health badge](/badges/beedelivery-laravel-ifood/health.svg)

```
[![Health](https://phpackages.com/badges/beedelivery-laravel-ifood/health.svg)](https://phpackages.com/packages/beedelivery-laravel-ifood)
```

###  Alternatives

[joisarjignesh/bigbluebutton

BigBlueButton Server API Library for Laravel

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

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

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

A Library to integrate with Aramex APIs

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

A helpful Sevdesk API client for Laravel.

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

Dystore API layer for Lunar e-commerce package

411.2k3](/packages/dystcz-lunar-api)[yxx/laravel-quick

agile development

145.6k](/packages/yxx-laravel-quick)

PHPackages © 2026

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