Products are the things which are available in the store for users to buy. Most Products are Normal Products, but if you want to sell Advertisements or Hosting Plans, these are also types of Products.
For more information about how to create Products, see Products & Purchases.
Invoices, or Orders as they are called on the front-end, are the things that say a particular user is buying particular things. They can be created in 3 ways:
- When a user clicks "Checkout" in the Store, an Invoice is created.
- If a member has any Purchases which have renewal terms, an Invoice is created automatically when the renewal payment is due.
- An administrator can create Invoices manually in the AdminCP.
An Invoice is made up of items which will usually be Products but could also include paid files from the Downloads application, donations, or anything else a user can pay for. Any shipping costs, adjustments for coupons, etc. will also be shown on the Invoice.
Invoices will always have one of the following statuses:
- Paid - the user has paid the invoice (using Transactions) or the invoice has manually been marked as paid by an administrator.
- Pending - the user has not yet paid the invoice.
- Expired - the user did not pay for the invoice within the time period set by the "Invoices must be paid within" setting (AdminCP > Commerce > Invoices > Invoice Settings) and so the invoice is expired and they cannot submit payment. An administrator could resend the Invoice in the AdminCP to put it back to Pending.
- Canceled - either the user, or an administrator, manually canceled the invoice. Payment may have never been submitted, or may have been refunded.
A Transaction is how a user pays for an Invoice. For example, when a user submits their card details, that creates a Transaction. An Invoice may have more than one transaction, for example, if their card is declined and then they use a different card, the Invoice will have two Transactions associated with it: one failed, and one approved.
Transactions are usually associated with a Payment Method which processed (or attempted to process) the payment (for example PayPal, Stripe or Authorize.Net). However, if the user chooses to use credit on their account to pay, this will also show as a Transaction with Account Credit if specified as the method.
In addition to Transactions created by the user checking out, they can also be created automatically. If a user has Purchase with renewal terms and also has a credit card on file, a PayPal Billing Agreement, or account credit when the renewal term is due, a Transaction to take that payment will be generated automatically when the Invoice is generated.
Transactions will always have one of the following statuses:
- Approved - the payment was received successfully.
- Held for approval - usually means that the payment was received successfully, but was halted by a Fraud Rule. An administrator will need to manually approve or void/refund*. This status is sometimes also used if there was an error in the Payment Method and the system is not sure whether the payment was received or not - an administrator will need to confirm and either approve or refund the Transaction.
- Under review - the Transaction was previously Held for approval and an administrator has marked it for review. An administrator will need to manually approve or void/refund*.
- Failed - the payment was unsuccessful (for example, their card was declined for insufficient funds) or was voided by an administrator.
- Refunded - the payment has been refunded by an administrator.
- Partially Refunded - the payment was successful, however the user has been given a partial refund, so it's status is partially Approved and partially Refunded.
- Waiting - the user has indicated they will pay via a manual method (for example, post a check or send a bank wire). The administrator should mark this as approved once they receive payment, or cancel it if payment is not received.
- Pending - it is unusual to see this status, but indicates that the user submitted payment and the payment method has not yet confirmed or denied receiving it. It will automatically change to one of the above statuses or be deleted automatically.
* Sometimes you will see a "Void" option for a Transaction and other times, "Refund". When a user makes a payment, most Payment Methods will first authorize the transaction (meaning they are holding the funds), but not capture it until it has passed the Fraud Rules check. This is to avoid unnecessary refund fees for you. In this state, you will see the "Void" option, which will cancel the payment completely, while the "Approve" option will capture and complete the payment. If the transaction has already been captured (some Payment Methods don't support separate authorize and capture, and some have a limit on how long a Transaction can be in this state for) you will see a "Refund" option.
If an Invoice contains physical Products which need to be shipped, then once the Invoice is paid, Shipments are generated. These contain the items and quantities to be shipped, the Shipping Rate to ship them by, and the shipping address. Sometimes more than one may be generated, for example, if the user is purchasing two different Products with different Shipping Rates.
Shipments will always have one of the following statuses:
- Shipped - the shipment has been sent.
- Pending - the shipment is waiting to be shipped. Once it has been sent, an Administrator should mark is as Shipped.
- Canceled - the shipment has been canceled, it is possible that payment was refunded (and therefore the Invoice was no longer marked Paid) before the shipment was sent, or it has been manually marked Canceled by an administrator.
Once an Invoice has been marked as Paid, the details of any Products, and certain other items (for example, Files in the Downloads application) are stored as a Purchase. A Purchase may have an expiry date and renewal term, which will cause renewal Invoices to be generated automatically.