A Microsoft .NET Standard library for interfacing with the Procuret API.
- .NET API Compatibility
- Installation
- Documentation
- Support
Procuret .NET targets .NET Standard 2.0, which means it is compatible with .NET Framework 4.6.1+ and .NET Core 2.0+. If you require comptatiblity with an earlier .NET release, please contact us.
Procuret .NET is available as a Nuget package.
dotnet add package ProcuretAPI
See Microsoft's documentation for more information about installing Nuget packages in Visual Studios on Windows and macOS.
If you require assistance installing Procuret .NET in your development environment, please contact us.
Procuret .NET offers a library of classes that map to services provided by the Procuret API.
Sessions are the means of authenticating requests to the Procuret API. All requests to Procuret API, save for those creating Sessions themselves, require a Session.
In Procuret .NET, the Session
class will handle all authentication for you.
For example, it will compute the SHA256 signature that must be included
in your HTTP headers.
String
apiKeyulong
sessionId
Session session = Session(
apiKey: "your_api_key",
sessionId: 441121225 // Your Session ID
)
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.
To create a new InstalmentLink
, call InstalmentLink.Create()
. .Create()
operates asynchronously, so use the await
keyword to initalise the link
into a variable.
String
PublicId - unique ID of thisInstalmentLink
EntityHeadline
Supplier - the Supplier to which the link appliesDecimal
InvoiceAmount - the amount the link attempts to transactString
InvoiceIdentifier - the identifier of the invoiceString
InviteeEmail - the email address associated with the link
Int64
supplierId - Your unique Supplier IDString
customerEmail - The email of the customer to whom a Procuret payment invitation email should be sent.String
invoiceIdentifier - Your invoice identifier. E.g."INV-001"
Decimal
invoiceValue - The amount payable by the customerCommunicationOption
communication - Instance ofCommunicationOption
enumerationSession
session - TheSession
to use when authenticating your request
var link = await InstalmentLink.Create(
supplierId: 589121125121,
customerEmail: "[email protected]",
invoiceIdentifier: "INV-001",
invoiceValue: Convert.ToDecimal("422.22"),
communciation: CommunicationOption.NotifyCustomer,
session: session // See Session create example above
)
A ProspectivePayment
represents the amount of money that a customer may
pay, per payment period, should they use the Procuret Instalment Product to pay
for their purchase.
In other words, you can use ProspectivePayment
to give customers a preview
of the cost of using Procuret. Retrieve a ProspectivePayment
for any
number of periods. At this time, Procuret .NET only supports monthly payments.
Decimal
RecurringPayment - The amount the customer will pay per periodString
SupplierId - The ID of the Supplier to which thise price appliesInt16
PaymentCount - The number of payments the customer would makePeriod
Period - The length of the payment period (always.MONTH
)Cycle
Cycle - The cycle of the payment (always.ADVANCE
)
Use .Retrieve() to look up the price a customer would pay per period using the Procuret Instalment Product.
Session
session - An instance ofSession
authenticating your requestString
supplierId - Your Supplier IDDecimal
principle - The total value of the purchase, including GSTInt16
paymentCount - The number of payments the customer would make
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());
Session
session - An instance ofSession
authenticating your requestString
supplierId - Your Supplier IDDecimal
principle - The total value of the purchase, including GST
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());
}
A type containing basic data about a legal person.
String
EntityId - A unique Procuret identifier for the legal person
String
LegalEntityName - The name of the legal person, e.g. "ACME Ltd"
An enumeration of instructions you can send Procuret in some contexts, to tell it how you wish for it to contact (or not contact) the a customer.
.EMAIL_CUSTOMER
- Procuret will contact the customer by email.DO_NOT_CONTACT_CUSTOMER
- Procuret will not try to contact the customer
Please contact us anytime at [email protected] with any questions. To chat with us less formally, please feel free to tweet @hugh_jeremy.
For more general information about Procuret, please visit procuret.com.