Difference between order number, transaction id and invoice no
Asked Answered
S

2

7

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.

Staysail answered 31/12, 2014 at 5:5 Comment(0)
B
3

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.

Blackburn answered 31/12, 2014 at 14:52 Comment(1)
In my case I'm supposed to provide all the 3 details to payment gateway (this provides API and we don't deal with banks and credit card network directly), and this returns Root transaction reference no(provided by the bank), authorization code (provided by bank), EPG Transaction reference no (by payment gateway itself). So I guess that in this case order number, transaction id and invoice no are just extra information and all 3 can be the same. Any thoughts?Staysail
R
1

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.

Rabinowitz answered 3/2, 2019 at 18:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.