WebToPay API library with examples for .NET.
Switch branches/tags
Nothing to show
Clone or download
mariusbalcytis Merge pull request #1 from vbartusevicius/master
Renamed mokejimai.lt to paysera.com
Latest commit 6d1ebb1 Jan 20, 2016
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin missing mokejimai.lt >> paysera.com replacements Jan 19, 2016
example missing mokejimai.lt >> paysera.com replacements Jan 19, 2016
src missing mokejimai.lt >> paysera.com replacements Jan 19, 2016
README.md email typo Jan 19, 2016


#WebToPay Lib DotNet

##What is WebToPay Lib DotNet? WebToPay Lib DotNet is a library that will allow you to make payment requests to the WebToPay website.



  • .NET Framework 3.5

##Directory structure The project directory is divided into three parts

  • bin/ - a compiled library DLL file
  • example/ - a ready to use example
  • src/ - the source of the library


  • Use git clone https://github.com/evp/webtopay-lib-dotnet.git to obtain the newest version of the library.
  • Copy the EVP.WebToPay.ClientAPI.dll located in the bin directory to your project folder.
  • Add a reference to the API DLL + Add a using EVP.WebToPay.ClientAPI statement anywhere you wish to use the library.

You have successfully installed the WebToPay Lib DotNet library!

##Code samples Before making a request you are to create an instance of the Client class.

int projectId = 0;
string signPassword = "32_character_sign_password";
Client client = new Client(projectId, signPassword);

Be sure to replace projectId and signPassword placeholder values with the actual data.

After creating the client object you can now create a new Micro/Macro request

public MacroRequest NewMacroRequest();
public MicroAnswer NewMicroAnswer();

After creating a new request, it is important that you specify the request parameters

string siteUrl = Request.Url.GetLeftPart(UriPartial.Authority);

request.OrderId = "ORDER0001";
request.Amount = 1000;
request.Currency = "LTL";
request.Country = "LT";
request.AcceptUrl = siteUrl + "/Accept.aspx";
request.CancelUrl = siteUrl + "/Cancel.aspx";
request.CallbackUrl = siteUrl + "/MacroCallback.aspx";

You can additionally set the request.Test = true; if you wish to test the request.

Once the request has been built, you may build the request URL and redirect your client

string redirectUrl = client.BuildRequestUrl(request);

##Contacts If you have any further questions feel free to contact us:

"EVP International", UAB
Mėnulio g. 7
LT-04326 Vilnius
Email: support@paysera.com
Tel. +370 (5) 2 03 27 19
Faksas +370 (5) 2 63 91 79