{"id":19888923,"url":"https://github.com/paypal/payouts-dotnet-sdk","last_synced_at":"2025-10-03T23:25:31.850Z","repository":{"id":41163124,"uuid":"238889190","full_name":"paypal/Payouts-DotNet-SDK","owner":"paypal","description":"DotNet SDK for Payouts RESTful APIs","archived":false,"fork":false,"pushed_at":"2022-07-05T14:14:03.000Z","size":240,"stargazers_count":20,"open_issues_count":4,"forks_count":21,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-04-13T19:27:14.483Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paypal.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-07T09:44:02.000Z","updated_at":"2023-08-03T02:00:46.000Z","dependencies_parsed_at":"2022-09-09T08:22:51.917Z","dependency_job_id":null,"html_url":"https://github.com/paypal/Payouts-DotNet-SDK","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paypal%2FPayouts-DotNet-SDK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paypal%2FPayouts-DotNet-SDK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paypal%2FPayouts-DotNet-SDK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paypal%2FPayouts-DotNet-SDK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paypal","download_url":"https://codeload.github.com/paypal/Payouts-DotNet-SDK/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224324456,"owners_count":17292521,"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","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":[],"created_at":"2024-11-12T18:08:39.568Z","updated_at":"2025-09-16T03:52:56.369Z","avatar_url":"https://github.com/paypal.png","language":"C#","funding_links":["https://developer.paypal.com/docs/api/payments.payouts-batch/v1/","https://developer.paypal.com/docs/payouts/","https://developer.paypal.com/docs/payouts/reference/setup-sdk","https://developer.paypal.com/docs/payouts/reference/setup-sdk/","https://developer.paypal.com/developer/applications"],"categories":[],"sub_categories":[],"readme":"# PayPal Payouts DotNet SDK v2\n\n![Home Image](homepage.jpg)\n\n__Welcome to PayPal Payouts__. This repository contains PayPal's DotNet SDK for Payouts and samples for [v1/payments/payouts](https://developer.paypal.com/docs/api/payments.payouts-batch/v1/) APIs.\n\nThis is a part of the next major PayPal SDK. It includes a simplified interface to only provide simple model objects and blueprints for HTTP calls. This repo currently contains functionality for PayPal Payouts APIs which includes [Payouts](https://developer.paypal.com/docs/api/payments.payouts-batch/v1/).\n\nPlease refer to the [PayPal Payouts Integration Guide](https://developer.paypal.com/docs/payouts/) for more information. Also refer to [Setup your SDK](https://developer.paypal.com/docs/payouts/reference/setup-sdk) for additional information about setting up the SDK's. \n\n\n## Prerequisites\n\n.NET 4.6.1 or later\n\nAn environment which supports TLS 1.2 (see the TLS-update site for more information)\n\nPayPalHttp 1.0.1\n\n## Usage\n### Binaries\n\nIt is not necessary to fork this repository for using the PayPal SDK. Please take a look at [PayPal Payouts Server SDK](https://developer.paypal.com/docs/payouts/reference/setup-sdk/#install-the-sdk) for configuring and working with SDK without forking this code.\n\nFor contributing to this repository or using the samples you can fork this repository.\n\n### Setting up credentials\n\nGet client ID and client secret by going to https://developer.paypal.com/developer/applications and generating a REST API app. Get \u003cb\u003eClient ID\u003c/b\u003e and \u003cb\u003eSecret\u003c/b\u003e from there.\n\n``` .NET\nusing System;\nusing PayoutsSdk.Core;\nusing PayoutsSdk.Payouts;\nusing PayPalHttp;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\npublic class CreatePayout\n{\n    static String clientId = \"PAYPAL-CLIENT-ID\";\n    static String secret = \"PAYPAL-CLIENT-SECRET\";\n\n    public static HttpClient client()\n    {\n    // Creating a sandbox environment\n    PayPalEnvironment environment = new SandboxEnvironment(clientId, secret);\n\n    // Creating a client for the environment\n    PayPalHttpClient client = new PayPalHttpClient(environment);\n    return client;\n    }\n}\n```\n\n## Examples\n### Creating a Payout\nThis will create a Payout and print batch id for the created Payouts\n\n```.NET\nvar body = new CreatePayoutRequest(){\n SenderBatchHeader = new SenderBatchHeader(){\n  EmailMessage = \"Congrats on recieving 1$\",\n  EmailSubject = \"You recieved a payout!!\"\n },\n Items = new List\u003cPayoutItem\u003e(){\n   new PayoutItem()\n   {\n     RecipientType=\"EMAIL\",\n     Amount=new Currency(){\n     CurrencyCode=\"USD\",\n     Value=\"1\",\n   },\n Receiver=\"payouts-simulator23@paypal.com\",\n    }\n    }\n};\n PayoutsPostRequest request = new PayoutsPostRequest();\n  request.RequestBody(body);\n  var response = await PayPalClient.client().Execute(request);\n  var result = response.Result\u003cCreatePayoutResponse\u003e();            \n  Console.WriteLine(\"Status: {0}\", result.BatchHeader.BatchStatus);\n  Console.WriteLine(\"Batch Id: {0}\", result.BatchHeader.PayoutBatchId);\n  Console.WriteLine(\"Links:\");\n  foreach (LinkDescription link in result.Links)\n   {\n   Console.WriteLine(\"\\t{0}: {1}\\tCall Type: {2}\", link.Rel, link.Href, link.Method);\n   }\n\n```\n\n### Retrieve a Payouts Batch\nThis will retrieve a payouts batch\n``` .NET\n  PayoutsGetRequest request = new PayoutsGetRequest(batchId);\n  var getResponse = await PayPalClient.client().Execute(request);\n  var result = getResponse.Result\u003cPayoutBatch\u003e();\n  Console.WriteLine(\"Status: {0}\", result.BatchHeader.BatchStatus);\n  Console.WriteLine(\"Item: {0}\", result.Items[0].PayoutItemId);\n  Console.WriteLine(\"Batch Id: {0}\", result.BatchHeader.PayoutBatchId);\n  Console.WriteLine(\"Links:\");\n  foreach (LinkDescription link in result.Links)\n  {\n    Console.WriteLine(\"\\t{0}: {1}\\tCall Type: {2}\", link.Rel, link.Href, link.Method);\n  }\n\n\n```\n## Running tests\n\nTo run integration tests using your client id and secret, clone this repository and run the following command:\n\n```sh\n$ PAYPAL_CLIENT_ID=YOUR_SANDBOX_CLIENT_ID PAYPAL_CLIENT_SECRET=YOUR_SANDBOX_CLIENT_SECRET dotnet test -v normal\n```\n\nYou may use the client id and secret above for demonstration purposes.\n\n\n## Samples\n\nYou can start off by trying out [/Payouts-DotNet-SDK/tree/master/Samples](https://github.com/paypal/Payouts-DotNet-SDK/tree/master/Samples).\n\nNote: Update the `PayPalClient.cs` with your sandbox client credentials or pass your client credentials as environment variable while executing the samples.\n\n## License\nCode released under [SDK LICENSE](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaypal%2Fpayouts-dotnet-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaypal%2Fpayouts-dotnet-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaypal%2Fpayouts-dotnet-sdk/lists"}