See the docs.
Define a Scanpay client:
var apikey = "1089:bx2a4DATi8ad87Nm4uaxg5nggYA8J/Hv99CON977YiEdvYa6DmMwdoRPoYWyBJSi";
var client = new Scanpay.Client(apikey);
Create a payment link to which you can redirect customers.
var data = new Scanpay.NewURLReq
{
orderid = "999",
items = new Scanpay.Item[]
{
new Scanpay.Item
{
name = "Ultra Bike 7000",
price = "1337.01 DKK",
quantity = 2,
},
}
};
var url = client.newURL(data);
Console.WriteLine("Payment URL is " + url);
Get an array with a number of changes since the supplied sequence number:
var oldSeq = 3
var seqRes = client.seq(oldSeq, opts);
foreach(var change in seqRes.changes)
{
// Update your database with change...
}
Console.WriteLine("New seq number is " + seqRes.seq);
Verify the ping signature and extract the seq number.
var ping = client.handlePing(body, request.Headers["X-Signature"]);
Console.WriteLine("Ping seq=" + ping.seq + ", shopid=" + ping.shopid);;