The Bidco SDK provides the mechanism to allow a users to pay for their selected goods and services.

Before a payment can be made, an invoice must exist:

  • See Baskets for how to create a PaymentInvoice.

Authorizing an Invoice

Depending on thresholds set by the merchant, an invoice may require authorization from the end user before payment can be made. The user provides authorization by entering their passcode.

PaymentManager paymentManager = ManagerFactory.GetInstance().PaymentManager;
if (invoice.IsAuthorizationRequired) {
	// prompt user for their passcode
	await paymentManager.AuthorizeAsync(invoice, passcodeText);
	// invoice has been invoiced
}

Paying for an Invoice

The invoice has been authorized and payment can now be made.

To check if CVV is required for the payment:

invoice.PaymentInstrument.IsCvvRequired;

A Payment object is returned after successful payment which contains:

  • Bidco Transaction ID: This ID is used to retrieve transaction information.
  • Merchant Payment ID The merchant's payment reference.
  • Triggered Coupons: Returns a set of coupons that the user can redeem on future purchases.
  • Payment Date: The payment date.

Paying using the CVV

  1. Create PaymentDetails using the CVV:
PaymentDetails paymentDetails = new PaymentDetails("123");
  1. Use the PaymentManager to pay for the invoice:
Payment payment = await paymentManager.PayAsync(invoice, paymentDetails);
// payment contains information such as the Bidco payment ID, Merchant payment ID, invoice and a possible list of triggered coupons.
List<Coupons> triggeredCoupons = payment.TriggeredCoupons;
//display coupons to user.

A synchronous version of this method is available but should not be used in the main thread to avoid performance issues.


Paying for an Invoice Without CVV

  1. Use the PaymentManager to pay for the invoice:
Payment payment = await paymentManager.PayAsync(invoice);
// payment contains information such as the Bidco payment ID, Merchant payment ID, invoice and a possible list of triggered coupons.
List<Coupons> triggeredCoupons = payment.TriggeredCoupons;
//display coupons to user.