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())