Download the PHP package reefki/laravel-flip without Composer
On this page you can find all versions of the php package reefki/laravel-flip. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download reefki/laravel-flip
More information about reefki/laravel-flip
Files in reefki/laravel-flip
Package laravel-flip
Short Description Fluent Laravel SDK for the Flip for Business (flip.id) payment API.
License MIT
Informations about the package laravel-flip
Laravel Flip
A fluent, fully-tested Laravel SDK for the Flip for Business payment API.
Covers everything Flip publishes:
- General — balance, supported banks, maintenance probe
- Disbursement (v2 + v3) — money transfer, list, lookup by id / idempotency key, bank account inquiry, special money transfer (PJP)
- Reference data (v2-only) — city, country, combined lists
- Accept Payment (v3-only) — create / list / read / edit bill, list payments per bill, list all payments, settlement report
- International Disbursement (v2-only) — exchange rates, form data, list, find, C2C/C2B + B2C/B2B create
- Webhook signature validation
Accept Payment v2 is deprecated; bill/payment/settlement-report resources are pinned to v3 and ignore FLIP_VERSION. Multi-version resources (disbursement, special disbursement) follow the configured default and can be overridden per call.
Install
The service provider and Flip facade are auto-discovered.
Publish the config (optional):
Configure
Set these in your .env:
config/flip.php exposes everything (timeout, retries, base URLs).
The default version applies to the disbursement family (money transfer, special money transfer). Everything else is pinned because Flip only ships each endpoint on one version: bank account inquiry, city/country lists, exchange rates and the international transfer family are v2-only; accept payment (bill, payment listing, settlement report) is v3-only. Pinned resources ignore the config default — see "Versioning" below.
Quickstart
Resources
Balance
Banks
Maintenance
Disbursement (Money Transfer)
Bank Account Inquiry
inquiry() is pinned to v2 — Flip has not shipped a v3 of this endpoint.
If the result isn't cached, status will be PENDING and Flip will hit your configured callback URL with the final result.
Special Money Transfer (PJP)
Accept Payment (Bills)
Payments
Settlement Report
International Disbursement (v2)
Reference Data
Versioning
Flip ships some endpoints on both v2 and v3, others on only one. The package handles that for you:
- Configurable default:
config('flip.version')(defaultv3) applies to all multi-version resources. - Per-call override:
Flip::disbursement()->withVersion('v2')->list()returns a clone with the version forced. - Global override:
Flip::useVersion('v2')->disbursement()->list()for a one-off facade chain. - Pinned endpoints: these endpoints ignore the configured default:
- v2-only (Flip does not publish v3): bank account inquiry, city/country lists, exchange rates, form data, every international-disbursement endpoint.
- v3-only (v2 is deprecated): accept-payment bills, payment listings, settlement report.
Webhooks
Every Flip callback POSTs application/x-www-form-urlencoded with two fields: data (JSON-encoded payload) and token (your validation token). Verify it with one call:
Or just check whether a token is valid:
Errors
Flip's documented error responses map to typed exceptions:
| HTTP / Cause | Exception |
|---|---|
| 401 | Reefki\Flip\Exceptions\AuthenticationException |
| 404 | Reefki\Flip\Exceptions\NotFoundException |
| 422 | Reefki\Flip\Exceptions\ValidationException |
| 503 | Reefki\Flip\Exceptions\MaintenanceException |
| Network / DNS | Reefki\Flip\Exceptions\ConnectionException |
| ★ any other | Reefki\Flip\Exceptions\FlipException (base class) |
Webhook verification raises its own pair:
| Cause | Exception |
|---|---|
| Validation token mismatch | Reefki\Flip\Exceptions\InvalidWebhookSignatureException |
Signature OK but data field isn't valid JSON |
Reefki\Flip\Exceptions\MalformedWebhookPayloadException |
All inherit from FlipException, which exposes the response body and Flip's errors[] array:
Testing your code
The package uses Laravel's HTTP client under the hood, so you can fake requests in your own tests with Http::fake():
Running the package's own test suite
Pest covers every resource, both versions, error mapping, and webhook signature validation.
License
MIT.
All versions of laravel-flip with dependencies
guzzlehttp/guzzle Version ^7.5
illuminate/contracts Version ^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0