Skip to main content
The official Laravel package for the Yativo Fiat API. It’s built on the PHP SDK and adds Laravel config, a facade, a webhook route that checks every signature, and Laravel events for every webhook.

Package

yativo/fiat-sdk-laravel

Requires

Laravel 10–13, PHP 8.1+ (8.2+ for Laravel 11 and newer)

Source

Yativo/yativo-fiat-laravel

Install

Laravel discovers the package automatically.

Configure

Add your API key to .env. The key needs your server’s IP on its IP whitelist.
.env
Run php artisan config:clear after changing .env if you cache your config.

Make your first request

Use the facade, or inject \Yativo\Fiat\Yativo:

Accept a payment

1

Find a payment method

Look up the method for your customer’s country and currency once, and keep its id.
2

Create the deposit and redirect

amount is in the method’s currency. currency is the wallet you’re credited in.
3

Confirm when the customer returns

Never trust the redirect alone: read the deposit.

Webhooks become Laravel events

The package serves POST /webhooks/yativo in the api middleware group and checks every signature. Register the URL once and put the returned secret in YATIVO_WEBHOOK_SECRET:
Every verified webhook fires Yativo\Fiat\Laravel\Events\WebhookReceived and yativo.{type}, such as yativo.deposit.updated:
For production, use a queued listener so the webhook is answered within 3 seconds:
  • Duplicate deliveries are skipped using your cache. A delivery is only remembered after your listeners succeed, so a failure is retried.
  • A bad signature gets 401 and never reaches your listeners.
  • Change the path with YATIVO_WEBHOOK_PATH, or set YATIVO_WEBHOOK_ROUTE=false and add Route::yativoWebhooks('your/path'); yourself.

Everyday tasks

Every method of the PHP SDK is on the facade: $yativo->cardCheckout->createOrder() becomes Yativo::cardCheckout()->createOrder().

Errors

See Troubleshooting for common errors.

Configuration

Test your app

Send a signed webhook in a feature test:
Against the sandbox, send sample webhooks with Yativo::sandbox()->simulateWebhook('payin').