{"id":15036078,"url":"https://github.com/willdiealone/yoomoney-api","last_synced_at":"2025-10-04T03:31:33.981Z","repository":{"id":205761513,"uuid":"714299623","full_name":"willdiealone/yoomoney-api","owner":"willdiealone","description":"This library will allow you to: generate a payment link and process the payment notification asynchronously, access account information, get access to payment history, access payment details.","archived":true,"fork":false,"pushed_at":"2023-11-18T14:52:16.000Z","size":295,"stargazers_count":42,"open_issues_count":3,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-04T18:13:12.164Z","etag":null,"topics":["api","csharp","csharp-library","library","wallet","yoomoney"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/willdiealone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-04T14:01:46.000Z","updated_at":"2025-06-29T12:53:04.000Z","dependencies_parsed_at":"2023-11-17T07:52:29.314Z","dependency_job_id":"2964fda4-64aa-40a1-9ee2-6e0663d46564","html_url":"https://github.com/willdiealone/yoomoney-api","commit_stats":null,"previous_names":["willdiealone/yoomoney-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/willdiealone/yoomoney-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willdiealone%2Fyoomoney-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willdiealone%2Fyoomoney-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willdiealone%2Fyoomoney-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willdiealone%2Fyoomoney-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willdiealone","download_url":"https://codeload.github.com/willdiealone/yoomoney-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willdiealone%2Fyoomoney-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278259828,"owners_count":25957546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","csharp","csharp-library","library","wallet","yoomoney"],"created_at":"2024-09-24T20:30:04.483Z","updated_at":"2025-10-04T03:31:33.713Z","avatar_url":"https://github.com/willdiealone.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API Yoomoney - Unofficial C# Library\n![Logo](https://imgur.com/4tWrKD2.png)\n\n[![YouTube video about yoomoney-api]( https://img.shields.io/badge/watch%20on-YouTube-blue?logo=youtube\u0026style=for-the-badge)](https://youtu.be/c9gv_IWgV4Y)\n[![Nuget version](https://img.shields.io/nuget/v/yoomoney-api?style=for-the-badge)](https://www.nuget.org/packages/yoomoney-api)\n[![Dotnet](https://img.shields.io/badge/platform-.NET-blue?style=for-the-badge)](https://www.nuget.org/packages/yoomoney-api)\n[![Nuget download](https://img.shields.io/nuget/dt/yoomoney-api?style=for-the-badge)](https://www.nuget.org/packages/yoomoney-api)\n\n## Summary\n- [Introduction](#introduction)\n- [Features](#features)\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n  1. [Access Token](#access-token)\n  3. [Account Information](#account-information)\n  4. [Operation History](#operation-history)\n  5. [Operation Details](#operation-details)\n  6. [Quickpay](#quickpay)\n## Introduction\n**This library will allow you to:**\n- **Generate a payment link and process the payment notification asynchronously**\n- **Access account information**\n- **Get access to payment history**\n- **Access payment details**\n## Features\n\nImplemented methods:\n\n- [Access Token](#access-token) - Getting an access token\n- [Account Information](#account-information) - Getting information about the status of the user account.\n- [Operation History](#operation-history) - This method allows viewing the full or partial history of operations in page mode. History records are displayed in reverse chronological order (from most recent to oldest).\n- [Operation Details](#operation-details) - Provides detailed information about a particular operation from the history.\n- [Quickpay](#quickpay) - The YooMoney form is a set of fields with information about a transfer. You can embed the payment form into your interface (e.g., a website or blog). When the sender pushes the button, the details from the form are sent to YooMoney, and an order for a transfer to your wallet is initiated.\n## Installation\n\nYou can install it with .Net CLI command:\n\n```csharp\ndotnet add package yoomoney-api --version 1.4.0\n```\n\n# Quick start\n\n1. Log in to your YooMoney wallet with your username. If you do not have a wallet, [create it](https://yoomoney.ru/reg).\n2. Go to the [App registration](https://yoomoney.ru/myservices/new) page.\n\u003cimg src=\"https://i.imgur.com/jroGrUL.png\" width=\"600px\"\u003e \n3. Follow the example, enter all the required data and click the \"all correct\" button   \n4. Set the application parameters. Save CLIENT_ID and YOUR_REDIRECT_URI for the next steps.\n5. Click the Confirm button.\n6. Paste CLIENT_ID and REDIRECT_URI instead of YOUR_CLIENT_ID and YOUR_REDIRECT_URI. Choose scopes and run the code.\n7. Follow all steps from the program.\n\n## Access token\nAuthorization proceeds as follows:\n\n1. Paste this code and run it\n```csharp\nusing yoomoney_api.authorize;\n\nAuthorize authorize = new(clientId:\"YOUR_CLIENT_ID\",redirectUl:\"YOUR_REDIRECT_URL\",scope:new []\n{\n    \"account-info\",\n    \"operation-history\",\n    \"operation-details\",\n    \"incoming-transfers\",\n    \"payment-p2p\",\n});\n```\n2. You get a link in the console to navigate to, but if you want to use it somewhere else, the Authorize class constructor initializes the AuthorizeUrl property with that link.\n```csharp\nauthorize.AuthorizeUrl\n```\n3. Visit this website and confirm the application authorization request.\n```csharp\nhttps://yoomoney.ru/oauth/authorize?client_id=XXXXXXXXXXXXXXXXXXXXXXXXXX\n``` \n4. You follow the generated link, enter the code that you will receive, after which you will be redirected to YOUR_REDIRECT_URL.\n5. Once the redirect to YOUR_REDIRECT_URL is complete, you copy the address bar of that page you're currently on (but keep in mind that the lifetime of that address is a minute) and pass that address as a method parameter `GetAccessToken` and the access token we need will be returned to the `token` variable.\n\nExample url\n```csharp\nhttps://example/k/?code=A54AB5755DFA80B0167532E413C87F90CBD8677C72758EAAD6E7F1AAD341FEBEBAD7B3754D2A6E42101029C134E55CB55A382412D953497D9CE5FCC7F96FE47B92615B0167BA727E49DC81F21A36312FDF440CAD5A1813E9849167C5B7307661504D134A432DDB727FDA302E040326425F82D41F3237FCFD6A9A6DE3C904D4A1\n```\nCopy and paste this code  \n```csharp\nvar token = await authorize.GetAccessToken(code: \"YOUR_СODE\", clientId: \"YOUR_CLIENT_ID\", redirectUri: \"YOUR_REDIRECT_URL\");\n```\n6. Your access token\n```csharp\nYour access token:\n4100118408605024.16F0ADB9BFE2156AF44828F2B7A7347A146B487DF8AF88343832A44F39691B888E3FFAEFE6087AD8F8C425809360F712E8A9BE9C1EC0B1906A967413A8FD66A132D786C4097D8EA4D60F086666FDABEF0FD89EFDCFB29CA4936A10E7F89463C337DED49799349B0D3A8581F7D7434A0938F3E0A9E75256752C4A78484630762A\n```\nYou are done with the most difficult part!\n\n## Account information\nYou can copy the received token or get it from the Token Url property of the Authorize class after authorization.\nPaste YOUR_TOKEN and run this code:\n\n```csharp\nusing yoomoney_api.account;\nusing yoomoney_api.authorize;\n\nvar client = new Client(token:authorize.TokenUrl);\nvar accountInfo = client.GetAccountInfo(token:YOUR_TOKEN);\naccountInfo.Print();\n```\n## Output:\n``` csharp\nAccount number:                             550019014512302\nAccount balance:                            999999999999.99\nAccount currency code in ISO 4217 format:   643\nAccount status:                             identified\nAccount type:                               personal\nExtended balance information:\n        --\u003e total:                   999999999999.99\n        --\u003e available:               999999999999.99\n        --\u003e deposition_pending:      Null\n        --\u003e blocked:                 Null\n        --\u003e debt:                    Null\n        --\u003e hold:                    Null\nInformation about linked bank cards:\n        No card is linked to the account\n```\n\n## Operation history\nPaste YOUR_TOKEN and run this code:\n\n```csharp\nvar operationHistory = client.GetOperationHistory(token:YOUR_TOKEN);\noperationHistory.Print();\n```\n## Output:\n```csharp\nList of operations:\n\n        operation id:         --\u003e 752413347835145104\n        status                --\u003e success\n        datetime              --\u003e 04.11.2023 11:42:27\n        title                 --\u003e Пополнение с карты ****5769\n        pattern id            --\u003e Null\n        direction             --\u003e in\n        amount                --\u003e 145,50\n        label                 --\u003e b5c57192-e7d0-4ecc-8d9d-623b8426890d\n        type                  --\u003e deposition\n        amount_currency       --\u003e RUB\n        is_sbp_operations     --\u003e false\n```\n\n## Operation details\nPaste YOUR_TOKEN with an OPERATION_ID (example: 752413347835145104) from previous example output and run this code:\n```csharp\nvar operationDetails = client.GetOperationDetails(token:YOUR_TOKEN,operationId:operationId);\noperationDetails.Print();\n```\n\n## Output:\nThis way we can check whether the payment went through, generate a link for transfer using the card number, and then receive the transaction history and check (status, datetime, label).\n```csharp\nOperation details:\n        operation_id           --\u003e 752413347835145104\n        status                 --\u003e success\n        pattern_id             --\u003e p2p\n        direction              --\u003e in\n        amount                 --\u003e 145,50\n        amount_due             --\u003e Null\n        fee                    --\u003e Null\n        datetime               --\u003e 04.11.2023 11:42:27\n        title                  --\u003e Пополнение с карты ****5769\n        sender                 --\u003e Null\n        recipient              --\u003e Null\n        recipient_type         --\u003e Null\n        message                --\u003e Перевод по кнопке\n        comment                --\u003e Null\n        coderpo                --\u003e Null\n        protection_code        --\u003e Null\n        expires                --\u003e Null\n        answer_datetime        --\u003e Null\n        label                  --\u003e b5c57192-e7d0-4ecc-8d9d-623b8426890d\n        details                --\u003e Пополнение с банковской карты, операция №2cd841d2-0011-5000-a000-1c1da48c5f72.Банковская карта: ****5769.\n        type                   --\u003e deposition\n        DigitalBonus is empty\n        DigitalProduct is empty\n```\n\n## Quickpay\n[![YouTube video about yoomoney-api]( https://img.shields.io/badge/watch%20on-YouTube-blue?logo=youtube\u0026style=for-the-badge)](https://youtu.be/c9gv_IWgV4Y)\n\u003cp\u003e\t\u003ca href=\"https://youtu.be/c9gv_IWgV4Y\"\u003e\n    \u003cimg src=\"https://imgur.com/5z1XqIl.png\" width=\"600px\"\u003e\n\u003c/a\u003e\n\n\u003c/p\u003e\n\nThe first step is to install our\n[notifications](https://yoomoney.ru/transfer/myservices/http-notification)\nin the YooMoney client.\nEnter the address to which you will receive notifications, and also be sure to save the secret key, we will need it for the next step.\nAfter this we need to generate a payment link, copy and paste this code\n\nLabel - make it unique for each payment.\nRun this code:\n```csharp\nvar label = Guid.NewGuid().ToString();\nvar quickpay = new Quickpay(receiver: \"4100118408605024\", quickpayForm: \"shop\", sum: 10, \n\tlabel: label, paymentType: \"AC\"); //Payment method. Possible values: PC - payment from the YuMoney wallet; AC - from a bank card.\nWriteLine(quickpay.LinkPayment);\n\n//replace --\u003e (\"YOUR_IP_ADDRESS_OR_DNS_NAME\",\"NOTIFICATION_SECRET\",YOUR_PORT\")\nPaymentListenerToYooMoney paymentListenerToYooMoney = new(label,DateTime.Today,\"NOTIFICATION_SECRET\");\nvar resultPayment = await paymentListenerToYooMoney.Listen(\"YOUR_IP_ADDRESS_OR_DNS_NAME\",\"YOUR_PORT\");\nWriteLine(resultPayment);\n```\n## Output:\n```csharp\nhttps://yoomoney.ru/transfer/quickpay?requestId=353432303336353332305f39366662343561383966646635393039633365396165366566656231366237383762333062346237\n\nIP-appec: XXX.X.X.X // Доменное имя: https://XXXXXXXXXXX, IP: XX.XXX.XXX.XX\nСервер запущен. Ожидание подключений...\n```\nFollow the link, pay and wait for notifications from YooMooney,it will arrive immediately after a notification on your phone.\n\n## Output:\n```csharp\nПодключен клиент.\nHTTP Requests\n-------------\n\nPOST /\nТекущий платеж:\n        NotificationType   --\u003e card-incoming\n        OperationId        --\u003e 753525659460074104\n        DateTime           --\u003e 2023-11-17 12:40\n        Amount             --\u003e 9.70\n        WithdrawAmount     --\u003e 10.00\n        Firstname          --\u003e  Null\n        Lastname           --\u003e  Null\n        Fathersname        --\u003e  Null\n        Email              --\u003e  Null\n        Phone              --\u003e  Null\n        City               --\u003e  Null\n        Street             --\u003e  Null\n        Building           --\u003e  Null\n        Suite              --\u003e  Null\n        Flat               --\u003e  Null\n        Zip                --\u003e  Null\n        Sender             --\u003e  Null\n        Unaccepted         --\u003e false\n        Codepro            --\u003e false\n        Currency           --\u003e 643\n        Label              --\u003e eb0db09d-7354-48e9-abf8-bceef21c0b01\n\nУспешно!\nСервер завершил работу\n```\nContact information is available only by protocol HTTPS\n```csharp\nvar quickpay = new Quickpay(\n\treceiver: \"4100118408605024\",\n\tquickpayForm: \"shop\",\n\tsum: 10, \n\tlabel: label,\n\tpaymentType: \"AC\",\n\tfirstname:\"Oleg\",\n\tlastname:\"Olegov\",\n\tfathersname:\"Olegovich\",\n\tcity:\"Saint Petersburg\",\n\tstreet:\"Begovaya street\",\n\tzip:\"197374\",\n\tbuilding:\"11\",\n\tsuite:\"1\",\n\tflat:\"43\",\n\tphone:\"+7987674115\",\n\tsender:\"4100167987654\");\n\n//replace --\u003e (\"YOUR_IP_ADDRESS_OR_DNS_NAME\",\"NOTIFICATION_SECRET\",YOUR_PORT\")\nPaymentListenerToYooMoney paymentListenerToYooMoney = new(label,DateTime.Today,\"NOTIFICATION_SECRET\");\nvar resultPayment = await paymentListenerToYooMoney.Listen(\"YOUR_IP_ADDRESS_OR_DNS_NAME\",\"YOUR_PORT\");\nWriteLine(resultPayment);\n```\n## Output:\n\n```csharp\nПодключен клиент.\nHTTP Requests\n-------------\n\nPOST /\nТекущий платеж:\n        NotificationType   --\u003e card-incoming\n        OperationId        --\u003e 753525659460074104\n        DateTime           --\u003e 2020-01-12 01:22\n        Amount             --\u003e 9.70\n        WithdrawAmount     --\u003e 10.00\n        Firstname          --\u003e  Oleg\n        Lastname           --\u003e  Olegov\n        Fathersname        --\u003e  Olegovich\n        Email              --\u003e  Oleg@gmail.com\n        Phone              --\u003e  +79957773555\n        City               --\u003e  Saint Petersburg\n        Street             --\u003e  Begovaya street\n        Building           --\u003e  11\n        Suite              --\u003e  1\n        Flat               --\u003e  43\n        Zip                --\u003e  197374\n        Sender             --\u003e  4100167987654\n        Unaccepted         --\u003e false\n        Codepro            --\u003e false\n        Currency           --\u003e 643\n        Label              --\u003e 560bb09d-5986-38e9-abf8-cl59f21c0bh5\n\nУспешно!\nСервер завершил работу\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilldiealone%2Fyoomoney-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilldiealone%2Fyoomoney-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilldiealone%2Fyoomoney-api/lists"}