Create invoices

Create an instance of the PPHInvoice class to create an invoice. Set a currency type, add one or more items, and set the tax or other required information:

PPHInvoice *invoice = [[PPHInvoice alloc] initWithCurrency:@"USD"];
[invoice addItemWithId:@"Item"
  quantity:[NSDecimalNumber one]
  unitPrice:[NSDecimalNumber one]

You can also create an invoice by calling the PPHTransactionManager class beginPayment method. This call creates an invoice and makes the SDK begin watching the card reader for card swipes simultaneously. Your app doesn’t need to save a transaction invoice before it begins watching for card swipes, it can save the invoice in parallel with receiving swipe data. It must save the invoice, though, before it attempts to pay the invoice.

For information about the possible contents of an invoice, such as item quantity, unit price, and so on, see the description of the invoice object in the REST API reference.

Note: Meet these requirements to set item prices and tax rates:

  • Store tax rates as string values, not floating point values.
  • Use the following rule for tax rounding: round to the nearest penny (to two digits after the decimal point) at the item level.

Add details about each invoice item on the receipt, if possible.