Repository navigation
Releases: Procuret/procuret-dotnet
Release list
Procuret .NET `0.0.6`
Procuret .NET 0.0.6 makes the following changes:
- Replaces
Stringsupplier IDs withlongto better align with Procuret API expectations - Adds the
Currencytype, supplied toInstalmentLink.Createto define the default currency for the payment link - Updates to .NET 8
- [No public interface effect] Replaces XML serialisation with JSON
0.0.6 is not backward compatible with earlier Procuret .NET versions. To update to 0.0.6, you will need to...
- Replace any
Stringsupplier ID values withlongequivalents - Add the
denominationparameter to any invocations ofInstalmentLink.Create
Here is an example invocation of InstalmentLink.Create, demonstrating passing a long supplierId and denomination:
var link = await InstalmentLink.Create(
supplierId: 589121125121,
customerEmail: "someone@somewhere.com",
invoiceIdentifier: "INV-001",
invoiceValue: Convert.ToDecimal("422.22"),
communciation: CommunicationOption.NotifyCustomer,
session: session,
denomination: Currency.Aud
)Installation
You can install Procuret .NET 0.0.6 via Nuget.
Support
For help, please write to us at support@procuret.com
Procuret .NET 0.0.5
0.0.5's primary new feature is ProspectivePayment.RetrieveMany(). You can use .RetrieveMany()
to retrieve an array of recurring payments available to your customers, for a given transaction
value.
For example, a value of $2,000 might return options to pay for 6 months at $349.70 / months,
and 12 months at $184.01 per month.
ProspectivePayment.RetrieveMany() takes the following arguments:
Sessionsession - An instance ofSessionauthenticating your requestStringsupplierId - Your Supplier IDDecimalprinciple - The total value of the purchase, including GST
Here's an example of how to use it:
var payments = await ProspectivePayment.RetrieveMany(
session: session, // See Session example elswhere
supplierId: "589121125121",
principle: Convert.ToDecimal("4200") // Includes GST
);
foreach (ProspectivePayment payment in payments)
{
Console.WriteLine(payment.RecurringPayment.ToString());
}You will also find a new InstalmentLink.RetrieveMany() method. In its current state,
it is not terribly useful. However, it can be used to retrieve lists of InstalmentLink
that you have created.
Procuret .NET 0.0.4
0.0.4 brings the new ProspectivePayment struct. ProspectivePayment allows you to preview the amount that a customer would pay, if they were to use Procuret for a purchase for a given value. You can receive a ProspectivePayment for any number of payment periods (e.g. 12 months, 3 months) that you wish to preview for the customer. We recommend requesting ProspectivePayment values for periods that we discuss with you, so that they match what is presented to customers in the payment portal.
Request a ProspectivePayment like so:
var payment = await ProspectivePayment.Retrieve(
session: session // See Session example elsewhere
supplierId: "589121125121",
principle: Convert.ToDecimal("4200"), // Includes GST
paymentCount: 12 // Implies 12 monthly payments
)
Console.WriteLine(payment.RecurringPayment.ToString())Procuret .NET 0.0.3
Changelog:
- .NET Standard target bumped to 2.0
- Added
EntityHeadlinestruct InstalmentLink.Create()now returns Task (wasTask<String>)
0.0.3 bumps the .NET Standard target version to 2.0 (.NET Framework 4.6.1+, .NET Core 2.0+). We are conscious of maintaining compatibility with a wide range of .NET code bases, but wish to take advantage of some 2.0 serialisation APIs. If you require compatibility with an earlier .NET version, please contact us.
0.0.2
Welcome to Procuret .NET. This initial release provides the InstalmentLink struct. InstalmentLink facilitates the creation of customised links to the Procuret Instalment Product (PIP). PIP allows a customer Business to pay for a purchase over time, while you the Supplier are paid upfront.
When you create an InstalmentLink, you can ask Procuret to send an email to the customer Business on your behalf.
Methods
static async Task<String>.create(...)
Parameters
Int64supplierId - Your unique Supplier IDStringcustomerEmail - The email of the customer to whom a Procuret
payment invitation email should be sent.StringinvoiceIdentifier - Your invoice identifier. E.g."INV-001"DecimalinvoiceValue - The amount payable by the customerCommunicationOptioncommunication - Instance ofCommunicationOption
enumerationSessionsession - TheSessionto use when authenticating your request
Example Usage
await InstalmentLink.create(
supplierId: 589121125121,
customerEmail: "someone@somewhere.com",
invoiceIdentifier: "INV-001",
invoiceValue: Convert.ToDecimal("422.22"),
communciation: CommunicationOption.NotifyCustomer,
session: session // See Session create example above
)At present, InstalmentLink does not return anything useful. The String
returned at task completion contains the raw JSON response from Procuret API.
You can expect a more useful return value in future versions of Procuret .NET.

