Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between order number, transaction id and invoice no

I'm implementing my first payment gateway, and while my situation might be simple in that I could make all three the same, but I'd like to know some situations where they should be different.

So again, What is the difference between order number, transaction id and invoice no. and any other forms of transaction related information?

Do all of them have to be unique?

Lastly, what do I show to the client once the transaction is complete?

Note: I'm a merchant, but situation pertaining to any other domain (e.g. bank, credit card, payment gateway, or anything) is also acceptible.

like image 322
Junior Superman Avatar asked Dec 31 '14 05:12

Junior Superman


People also ask

Is transaction ID and invoice number same?

Please note that the transaction/receipt number is not the same as your serial number, invoice number, PO number, or details on your credit card statement. These details cannot be accepted as proof of ownership and purchase.

What is the difference between transaction ID and order number?

A transaction ID is not a purchase order number. A purchase order number is a number that is usually internal to the business that is making the sale. A transaction ID is automatically assigned by the credit card or payment processor responsible for managing the transaction.

What is the difference between transaction and order?

Order and TransactionAn order is a record of a request for goods or services inititated by a customer. An order may encompass one or more transactions. Each transaction is a record of an action that is taken on an order. For example, an order may have an initial transaction to authorize the credit card.


2 Answers

We integrate with many different card authorisation APIs from various banks, at a high level there is no standard for the API interface that would be made available to you when a merchant account is acquired.

In my experience:

order number (or equivalent) is a value provided by the merchant that gets passed in the transaction request to the bank, who then associate it in their records with the transaction.

This allows the identification of the transaction on the banks system (for reporting/reconciliation etc.) using a merchant defined value.

In general this is expected to be unique.

transaction id (or equivalent) is the value that is returned by the bank to identify a transaction on their system. This will be unique.

invoice no This is nothing to do with the process of authorisation so would pertain to an additional feature provided by the bank and would be implementation specific (for example a way of grouping multiple products together).

Lastly, what do I show to the client once the transaction is complete?

You would store all information relating to the transaction in a database and from that set of records generate your own transaction id; this is what you would show the user.

like image 152
Alex K. Avatar answered Sep 20 '22 23:09

Alex K.


Before we get into semantics, let's discuss the different IDs we encounter.

On our system, we generate a record for the invoice. This record, along with its linked tables, includes the customer, items, date, prices, taxess, totals, and payments. Our database generates a unique ID for the row. This ID is used to join the tables.

Each payment we process has an ID from the payment processor (unless the payment is put on our customer's internal account)

Before we even create the first record, we generate a unique logical id for the transaction.

So here is what we name them, and how we use them.

  • Order ID or Record Number: The ID the database generates. Usually an incremented integer. Used for linking the tables. Also used as a short, succinct, user-friendly ID
  • Invoice ID: The unique logical ID we create for the invoice. We use a GUID. This is what we send along with our payment transaction.
  • Transaction ID or Payment ID: The ID returned from the payment processor. Various formats are used.

You can skip the Invoice ID and only use the Order ID. We like having a logical ID to throw around before we even store a record in the database though.

like image 26
Steven Spungin Avatar answered Sep 21 '22 23:09

Steven Spungin