mirror of
https://git.yoomoney.ru/scm/sdk/yookassa-sdk-php.git
synced 2026-08-17 18:41:19 +00:00
f5c507def70df0d70b2836230a73cd3f2d9b6c63
The YooKassa API PHP Client Library
Russian | English
This product is used for managing payments under The YooKassa API. For usage by those who implemented YooKassa using the API method.
Requirements
PHP 8.0 (or later version) with the libcurl library
Installation
Under console using Composer
- Install Composer, a package manager.
- In the console, run the following command:
composer require yoomoney/yookassa-sdk-php
Do the following for the composer.json file of your project:
- Add a string
"yoomoney/yookassa-sdk-php": "^3.0"to the list of dependencies of your project in the composer.json file:
...
"require": {
"php": ">=8.0",
"yoomoney/yookassa-sdk-php": "^3.0"
...
- Refresh the project's dependencies. In the console, navigate to the catalog with composer.json and run the following command:
composer update
- Adjust your project's code to activate automated uploading of files for our product:
require __DIR__ . '/vendor/autoload.php';
Commencing work
- Import required classes:
use YooKassa\Client;
- Create a sample of a client object, then set the store's identifier and secret key (you can get them under your YooKassa's Merchant Profile). Issuing a secret key
$client = new Client();
$client->setAuth('shopId', 'secretKey');
-
Call the required API method.
Examples of using the API SDK
What's new in SDK version 3.x
YooKassa SDK Settings
- Additional settings for Curl
- Authentication
- Statistics about the environment used
- Getting information about the store
- Working with Webhook
- Notifications
Working with payments
- Request to create a payment
- Request to create a payment via the builder
- Request for partial payment confirmation
- Request to cancel an incomplete payment
- Get payment information
- Get a list of payments with filtering
Working with refunds
- Request to create a refund
- Request to create a refund via the builder
- Get refund information
- Get a list of returns with filtering
Working with receipts
- Request to create a receipt
- Request to create a receipt via the builder
- Get information about the receipt
- Get a list of receipts with filtering
Working with safe deals
- Request to create a deal
- Request to create a deal via the builder
- Request to create a payment with info about deal
- Get deal information
- Get a list of deals with filtering
Working with payouts
Working with self-employed
Working with personal data
Working with the list of Fast Payment Service participants
Working with invoices
- Request to create an invoice
- Request to create an invoice via the builder
- Get information about the invoice
Working with payment methods
Description
Languages
PHP
100%