Download the PHP package sverraest/revolut-php without Composer

On this page you can find all versions of the php package sverraest/revolut-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package revolut-php

RevolutPHP

(Unofficial) PHP API Client and bindings for the Revolut Business API.

Build Status codecov Scrutinizer Code Quality Maintainability Latest Stable Version License composer.lock

Using this PHP API Client you can interact with your:

Revolut Business API does not support - ๐Ÿงพ Invoices

Installation

Requires PHP 7.0 or higher

The recommended way to install revolut-php is through Composer:

First, install Composer:

Next, install the latest revolut-php:

Finally, you need to require the library in your PHP application:

Development

Quick Start

RevolutPHP\Auth\Provider

Start by following the authentication instructions in the Revolut API docs:

Paste the generated public key on the Revolut for Business API settings page, and use the private key to instantiate a new RevolutPHP\Auth\Provider:

You can now redirect the user to the authorisation flow in the Revolut for Business app:

Once the user has confirmed authorisation, the user will be redirected back to the redirectUri with an authorisation code attached. You can exchange this authorisation code for an access token:

You can save this $accessToken somewhere safe and pass it directly to the RevolutPHP\Client. The token is valid for 40 minutes. To request a new token after expiration, you can use the refresh token to get a new access token:

RevolutPHP\Client

If you want to get a production client:

If you want to get a sandbox client:

If you want to pass additional GuzzleHTTP options:

Available API Operations

The following exposed API operations from the Revolut For Business API are available using the API Client.

See below for more details about each resource.

๐Ÿ’ฐ Accounts

Get all accounts, Get a specific account and get details for a specific account.

๐Ÿข Counterparties

Get all counterparties, get a specific counterparty, create a new counterparty and delete a counterparty.

๐Ÿ’ธ Payments

Create and schedule new payments.

๐Ÿ•ฐ๏ธ Payment Drafts

Create, get and delete payment drafts for approval by a business owner/admin.

๐Ÿ”€ Transfers

Create a transfer between your accounts.

๐Ÿ“Š Transactions

Get all transactions or a subset (with queryFilters), cancel a scheduled transaction, get a specific transaction and get a transaction by the unique specified requestId.

A Transaction is either created as a Payment or a Transfer.

๐Ÿ’น Rates

Get exchange rates.

๐Ÿ’ฑ Exchanges

There are two ways of using this endpoint:

If you know the amount of currency you want to sell (e.g: I want to exchange 135.5 USD to EUR), then you should specify the amount in the "from" object.

If, on the other hand, you want to specify the amount of currency you want to buy (e.g: I want to exchange USD to receive 200 EUR), then you should specify the amount in the "to" object.

โ— Please note that the "amount" field can be specified only once, either in the "from" object or in the "to" object.

๐Ÿ”— Webhooks

Create new webhooks.

Usage details

๐Ÿ’ฐ Accounts

Get all accounts

See more at https://developer.revolut.com/docs/api-reference/business/#tag/Accounts

Get one account

See more at https://developer.revolut.com/docs/api-reference/business/#tag/Accounts/operation/getAccount

Get account details

See more at https://developer.revolut.com/docs/api-reference/business/#tag/Accounts/operation/getAccountDetails

๐Ÿข Counterparties

Add a Counterparty

See more at https://developer.revolut.com/docs/api-reference/business/#tag/Counterparties/operation/addCounterparty

Delete a Counterparty

See more at https://developer.revolut.com/docs/api-reference/business/#tag/Counterparties/operation/deleteCounterparty

Get all Counterparties

See more at https://developer.revolut.com/docs/api-reference/business/#tag/Counterparties/operation/getCounterparties

Get a specific Counterparty

See more at https://developer.revolut.com/docs/api-reference/business/#tag/Counterparties/operation/getCounterparty

๐Ÿ’ธ Payments

Create a payment

See more at https://developer.revolut.com/docs/api-reference/business/#tag/Payments/operation/createPayment

Schedule a payment (for up to 30 days in the future)

See more at https://developer.revolut.com/docs/api-reference/business/#tag/Payments/operation/createPayment

๐Ÿ•ฐ๏ธ Payment Drafts

Get all Payment Drafts

See more at https://developer.revolut.com/docs/api-reference/business/#tag/Payment-Drafts/operation/getPaymentDrafts

Get a specific Payment Draft

See more at https://developer.revolut.com/docs/api-reference/business/#tag/Payment-Drafts/operation/getPaymentDraft

Create a Payment Draft

See more at https://developer.revolut.com/docs/api-reference/business/#tag/Payment-Drafts/operation/createPaymentDraft

Delete a payment draft

See more at https://developer.revolut.com/docs/api-reference/business/#tag/Payment-Drafts/operation/deletePaymentDraft

๐Ÿ”€ Transfers

Transfer money between your accounts

See more at https://developer.revolut.com/docs/api-reference/business/#tag/Transfers/operation/createTransfer

๐Ÿ“Š Transactions

Get a specific transaction (Transfer, Payment)

See more at https://developer.revolut.com/docs/api-reference/business/#tag/Payments/operation/getTransaction

Get a specific transaction by requestId (Transfer, Payment)

You can fetch a transaction by the requestId that you specified on creation. See more at https://developer.revolut.com/docs/api-reference/business/#tag/Payments/operation/getTransaction

Cancel a scheduled transaction

See more at https://developer.revolut.com/docs/api-reference/business/#tag/Payments/operation/cancelTransaction

Get all transactions

See more at https://developer.revolut.com/docs/api-reference/business/#tag/Payments/operation/getTransactions

Get all transactions with filters applied

See more at https://developer.revolut.com/docs/api-reference/business/#tag/Payments/operation/getTransactions

Default 'count' is 100 if you want to retreive more transactions even with dates selected you should specify bigger 'count'. Highiest value of 'count' is 1000.

๐Ÿ’น Rates

Get exchange rates

See more at https://developer.revolut.com/docs/api-reference/business/#tag/Exchanges

๐Ÿ’ฑ Exchanges

Exchange currency

See more at https://developer.revolut.com/docs/api-reference/business/#tag/Exchanges/operation/exchangeMoney

๐Ÿ”— Webhooks

Create a webhook

See more at https://developer.revolut.com/docs/api-reference/business/#tag/Webhooks/operation/setupWebhook

Frameworks

If you're looking to use this PHP API Client in a specific PHP framework you currently have the following options:

Framework Package
Symfony https://github.com/sverraest/revolut-php-bundle
Laravel https://github.com/vdbelt/laravel-revolut

Errors

Currently the following errors are defined in the Revolut Business API.

Error Description
400 Bad request Your request is invalid.
401 Unauthorized Your API key is wrong.
403 Forbidden Access to the requested resource or action is forbidden.
404 Not Found The requested resource could not be found.
405 Method Not Allowed You tried to access an endpoint with an invalid method.
406 Not Acceptable You requested a format that isn't JSON.
429 Too Many Requests You're sending too many requests.
500 Internal Server Error We had a problem with our server. Try again later.
503 Service Unavailable We're temporarily offline for maintenance. Please try again later.

About

You can follow me on ๐Ÿฆ Twitter or โœ‰๏ธ email me at simon[-at-]appfleet.uk.


www.appfleet.uk


All versions of revolut-php with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^6.0|^7.0
php Version >= 7.0
vdbelt/oauth2-revolut Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sverraest/revolut-php contains the following files

Loading the files please wait ....