{"id":37049831,"url":"https://github.com/roodfluweel/paynl-csharp-sdk","last_synced_at":"2026-01-14T05:47:09.996Z","repository":{"id":38206428,"uuid":"115413556","full_name":"roodfluweel/paynl-csharp-sdk","owner":"roodfluweel","description":"Pay.nl C# SDK","archived":false,"fork":true,"pushed_at":"2025-10-27T09:55:26.000Z","size":3780,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-27T11:38:06.411Z","etag":null,"topics":["credit-card","hacktoberfest","payment-gateway","payment-integration","payment-methods","payment-module","payment-processing","sdk"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"paynl/csharp-sdk","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/roodfluweel.png","metadata":{"files":{"readme":"readme.md","changelog":null,"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":"2017-12-26T10:46:39.000Z","updated_at":"2025-10-27T09:37:46.000Z","dependencies_parsed_at":"2023-01-23T10:43:50.066Z","dependency_job_id":null,"html_url":"https://github.com/roodfluweel/paynl-csharp-sdk","commit_stats":null,"previous_names":["roodfluweel/csharp-sdk"],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/roodfluweel/paynl-csharp-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roodfluweel%2Fpaynl-csharp-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roodfluweel%2Fpaynl-csharp-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roodfluweel%2Fpaynl-csharp-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roodfluweel%2Fpaynl-csharp-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roodfluweel","download_url":"https://codeload.github.com/roodfluweel/paynl-csharp-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roodfluweel%2Fpaynl-csharp-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28411402,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["credit-card","hacktoberfest","payment-gateway","payment-integration","payment-methods","payment-module","payment-processing","sdk"],"created_at":"2026-01-14T05:47:09.401Z","updated_at":"2026-01-14T05:47:09.989Z","avatar_url":"https://github.com/roodfluweel.png","language":"C#","readme":"[![NuGet release](https://img.shields.io/nuget/v/RoodFluweel.PAYNLSDK.svg)](https://www.nuget.org/packages/RoodFluweel.PAYNLSDK/)\n[![.NET](https://github.com/roodfluweel/csharp-sdk/actions/workflows/dotnet.yml/badge.svg)](https://github.com/roodfluweel/csharp-sdk/actions/workflows/dotnet.yml)\n\n# Pay.nl C# SDK\n\nWith this SDK you will be able to start transactions and retrieve transactions with\ntheir status for the Pay.nl payment service provider.\n\n## Installation\n\nYou can use this package as a nuget package: \n\nFrom nuget:\n```shell\nInstall-Package RoodFluweel.PAYNLSDK\n```\n\n## Configuration\n\nSetting the configuration:\n\n```c#\nvar payNlConfig = new PAYNLSDK.API.PayNlConfiguration(\"SL-1234-1234\", \"e4test6b70code9adreplacef0fee5e0ab\");\nvar client = new PAYNLSDK.Net.Client(payNlConfig);\n```\n\n## Usage of the GetService\n\nGetting a list of available payment methods, use the Getservice.\n\n```c#\nvar response = PAYNLSDK.Transaction.GetService(paymentMethodId);\n//paymentMethodId: is optional\n//The ID of the payment method. Only the payment options linked to the provided payment method ID will be returned if an ID is provided.\n//If omitted, all available payment options are returned. Use the following IDs to filter the options:\n//1. SMS.\n//2. Pay fixed price.\n//3. Pay per call.\n//4. Pay per transaction\n//5. Pay per minute.\n```\n\n## Starting a transaction\n\n```c#\n\nPAYNLSDK.API.Transaction.Start.Request request = PAYNLSDK.Transaction.CreateTransactionRequest(\"127.0.0.1\", \"http://example.org/visitor-return-after-payment\");\nrequest.Amount = 7184; // Amount in cents\n\nrequest.PaymentOptionId = 10; // Payment profile/option\n// request.PaymentOptionSubId = 5081; // Set bank id for iDEAL (example)\n\n\n// Optional values\noptions.store(\"paymentMethod\", 10);\noptions.store(\"description\", \"demo payment\");\noptions.store(\"language\",\"EN\");\n\n// Transaction data\nrequest.Transaction = new PAYNLSDK.Objects.TransactionData();\nrequest.Transaction.Currency = \"EUR\";\nrequest.Transaction.CostsVat = null;\nrequest.Transaction.OrderExchangeUrl = \"https://example.org/exchange.php\";\nrequest.Transaction.Description = \"TEST PAYMENT\";\nrequest.Transaction.ExpireDate = DateTime.Now.AddDays(14);\n\n// Optional Stats data\nrequest.StatsData = new PAYNLSDK.Objects.StatsDetails();\nrequest.StatsData.Info = \"your information\";\nrequest.StatsData.Tool = \"C#.NET\";\nrequest.StatsData.Extra1 = \"X\";\nrequest.StatsData.Extra2 = \"Y\";\nrequest.StatsData.Extra3 = \"Z\";\n\n// Initialize Salesdata\nrequest.SalesData = new PAYNLSDK.Objects.SalesData();\nrequest.SalesData.InvoiceDate = DateTime.Now;\nrequest.SalesData.DeliveryDate = DateTime.Now;\nrequest.SalesData.OrderData = new System.Collections.Generic.List\u003cPAYNLSDK.Objects.OrderData\u003e();\n\n// Add products\nrequest.SalesData.OrderData.Add(new PAYNLSDK.Objects.OrderData(\"SKU-8489\", \"Testproduct 1\", 2995, \"H\", 1));\nrequest.SalesData.OrderData.Add(new PAYNLSDK.Objects.OrderData(\"SKU-8421\", \"Testproduct 2\", 995, \"H\", 1));\nrequest.SalesData.OrderData.Add(new PAYNLSDK.Objects.OrderData(\"SKU-2359\", \"Testproduct 3\", 2499, \"H\", 1));\n\n// Add shipping\nrequest.SalesData.OrderData.Add(new PAYNLSDK.Objects.OrderData(\"SHIPPINGCOST\", \"Shipping of products\", 695, \"H\", 1, \"SHIPPING\"));\n\n// enduser\nrequest.Enduser = new PAYNLSDK.Objects.EndUser();\nrequest.Enduser.Language = \"NL\";\nrequest.Enduser.Initials = \"J.\";\nrequest.Enduser.Lastname = \"Buyer\";\nrequest.Enduser.Gender = PAYNLSDK.Enums.Gender.Male;\nrequest.Enduser.BirthDate = new DateTime(1991, 1, 23, 0, 0, 0, DateTimeKind.Local);\nrequest.Enduser.PhoneNumber = \"0612345678\";\nrequest.Enduser.EmailAddress = \"email@domain.com\";\nrequest.Enduser.BankAccount = \"\";\nrequest.Enduser.IBAN = \"NL08INGB0000000555\";\nrequest.Enduser.BIC = \"\";\n\n// enduser address\nrequest.Enduser.Address = new PAYNLSDK.Objects.Address();\nrequest.Enduser.Address.StreetName = \"Streetname\";\nrequest.Enduser.Address.StreetNumber = \"8\";\nrequest.Enduser.Address.ZipCode = \"1234AB\";\nrequest.Enduser.Address.City = \"City\";\nrequest.Enduser.Address.CountryCode = \"NL\";\n\n// invoice address\nrequest.Enduser.InvoiceAddress = new PAYNLSDK.Objects.Address();\nrequest.Enduser.InvoiceAddress.Initials = \"J.\";\nrequest.Enduser.InvoiceAddress.LastName = \"Jansen\";\nrequest.Enduser.InvoiceAddress.Gender = PAYLSDK.Enums.Gender.Male;\nrequest.Enduser.InvoiceAddress.StreetName = \"InvoiceStreetname\";\nrequest.Enduser.InvoiceAddress.StreetNumber = \"10\";\nrequest.Enduser.InvoiceAddress.ZipCode = \"1234BC\";\nrequest.Enduser.InvoiceAddress.City = \"City\";\nrequest.Enduser.InvoiceAddress.CountryCode = \"NL\";\n\n// Do the call\nvar transaction = new PAYNLSDK.Transaction(client).Start(request);\n\n// do whatever you need to do\nvar transactionId = transaction.Transaction.TransactionId;\nvar redirectToUrl = transaction.Transaction.PaymentURL;\n```\n\nTo determine if a transaction has been paid, you can use:\n```c#\nvar transactionInfo = new PAYNLSDK.Transaction(client).Info(transactionId);\nvar paid = transactionInfo.PaymentDetails.State == PaymentStatus.PAID;\n\n// or use the extentionmethods by adding \"using PAYNLSDK.API.Transaction.Info;\" at the top of your file\n\nif (transactionInfo.IsPaid() || transactionInfo.IsPending())\n{\n    // redirect user to thank you page\n}\nelse\n{\n    // it has not been paid yet, so redirect user back to checkout\n}\n```\n\n### Exchange scripts\n\nWhen implementing the exchange script (where you should process the order in your backend):\n```c#\nvar info = PAYNLSDK.Transaction.Info(response.transactionId);\nPAYNLSDK.Enums.PaymentStatus result = info.PaymentDetails.State;\n\nif (PAYNLSDK.Transaction.IsPaid(result))\n{\n    // process the payment\n}\nelse \n{\n if(PAYNLSDK.Transaction.IsCancelled(result)){\n    // payment canceled, restock items\n }\n}\n\nresponse.Write(\"TRUE| \");\n// Optionally you can send a message after TRUE|, you can view these messages in the logs.\n// https://admin.pay.nl/logs/payment_state\nresponse.Write(\"Paid\");\n```\n\n## Alliance\n\nThe following Alliance methods are available:\n\n- getMerchant\n- addMerchant\n- addInvoice\n\n## Statistics\n\nThe following statistics methods are available:\n\n- statistics/GetManagement\n\n## Contributing\n\nFeel free to do pull requests and create issues when you please. \n\n## License\n\nThis project is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froodfluweel%2Fpaynl-csharp-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froodfluweel%2Fpaynl-csharp-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froodfluweel%2Fpaynl-csharp-sdk/lists"}