---
url: https://bajoski34.github.io/Laravel/reference/services.md
---
# Services

Each Flutterwave API area is a service class, reached through the facade. Methods return Flutterwave's decoded JSON response as an array.

```php
use Flutterwave\Payments\Facades\Flutterwave;

Flutterwave::transfers()->create([...]);
Flutterwave::use('transfers')->create([...]);   // same thing, by config key
```

## Errors

When the API returns an error, methods throw `Flutterwave\Payments\Exception\FlutterwaveException` (or its `NetworkConnection` subclass when Flutterwave can't be reached):

```php
use Flutterwave\Payments\Exception\FlutterwaveException;

try {
    Flutterwave::transfers()->create($payload);
} catch (FlutterwaveException $e) {
    $e->getMessage();      // Flutterwave's message
    $e->getStatusCode();   // HTTP status
    $e->getResponse();     // the full error body
}
```

The exception is the transactions service: verifying, listing, refunding and fee lookups return the error body instead, so check `$response['status'] === 'success'`.

You can [replace or turn off](/guide/configuration#swapping-or-turning-off-services) any service in the config.

## Explorer

## At a glance

| Accessor | Class | Methods |
| --- | --- | --- |
| `Flutterwave::balances()` | Balances | `all`, `currency` |
| `Flutterwave::banks()` | Banks | `all`, `options`, `branches`, `resolveAccount`, `resolveMerchant` |
| `Flutterwave::beneficiaries()` | Beneficiaries | `create`, `all`, `find`, `delete`, `panel` |
| `Flutterwave::bills()` | Bills | `categories`, `billers`, `items`, `validate`, `pay`, `payValidated`, `status`, `history` |
| `Flutterwave::bvn()` | Bvn | `requestConsent`, `verification`, `matches` |
| `Flutterwave::cards()` | Cards | `bin`, `charge`, `preauthorize`, `chargeMany`, `bulkStatus`, `bulkTransactions`, `updateToken` |
| `Flutterwave::chargebacks()` | Chargebacks | `all`, `find`, `accept`, `decline`, `uploadProof`, `declineWithProof`, `panel` |
| `Flutterwave::fx()` | Fx | `quote`, `findQuote`, `trade`, `findTrade`, `tradeIfReady`, `panel` |
| `Flutterwave::use('modals')` | Modal | `render`, `displayInline`, `prepare` |
| `Flutterwave::plans()` | PaymentPlans | `create`, `all`, `find`, `update`, `cancel` |
| `Flutterwave::payoutSubaccounts()` | PayoutSubaccounts | `create`, `all`, `find`, `update`, `balance`, `transactions`, `staticAccount`, `delete` |
| `Flutterwave::preauth()` | Preauthorizations | `capture`, `void`, `refund` |
| `Flutterwave::refunds()` | Refunds | `all`, `find`, `panel` |
| `Flutterwave::settlements()` | Settlements | `all`, `find`, `panel` |
| `Flutterwave::stablecoins()` | Stablecoins | `send`, `fund`, `fee`, `find`, `balances` |
| `Flutterwave::subaccounts()` | Subaccounts | `create`, `all`, `find`, `update`, `delete` |
| `Flutterwave::subscriptions()` | Subscriptions | `all`, `activate`, `cancel` |
| `Flutterwave::transactions()` | Transactions | `verify`, `verifyTransactionReference`, `refund`, `all`, `fees`, `fee`, `resendFailedHooks`, `panel`, `timeline`, `generateTransactionReference` |
| `Flutterwave::transfers()` | Transfers | `create`, `bulk`, `find`, `all`, `fee`, `rates`, `retry`, `retries` |
| `Flutterwave::virtualAccounts()` | VirtualAccounts | `create`, `dynamic`, `dynamicFor`, `bulk`, `find`, `findBulk`, `updateBvn`, `delete` |
| `Flutterwave::webhooks()` | Webhooks | `getHook`, `verifySignature`, `isValid`, `eventAfterHook`, `eventBeforeHook` |
