There is no difference between serial number, transaction ID and invoice

I am implementing my first payment gateway, and while my situation may be simple in that I could make all three the same, I would like to know some situations where they should be different.

So, what is the difference between sequence number, transaction ID and invoice. and any other forms of transaction related information?

Do they all have to be unique?

Finally, what will I show the customer after completing the transaction?

Note. I'm a merchant, but a situation related to any other domain (like bank, credit card, payment gateway, or whatever) is also acceptable.

+4


source to share


2 answers


We integrate with many different authorization APIs for cards from different banks, at a high level there is no standard for the API that will be available to you when the merchant account is received.

In my experience:

the order number (or equivalent) is the value provided by the merchant, which is passed in the transaction request to the bank, which then associates it in their records with the transaction.

This allows a transaction to be identified in the banking system (for reporting / reconciliation, etc.) using a specific merchant value.

In general, this will be unique.



Transaction ID (or equivalent) is the value that the bank returns to identify the transaction in its system. It will be unique.

invoice . This is unrelated to the authorization process, so it belongs to an additional function provided by the bank and will be implementation-specific (for example, how to group multiple products together).

Finally, what will I show the customer after completing the transaction?

You will store all the information associated with the transaction in a database and from this set of records create your own transaction ID; this is what you show the user.

+2


source


Before we get to the semantics, let's discuss the various identifiers that we come across.

In our system, we generate an account record. This record, along with related tables, includes information about customer, items, date, prices, taxes, totals, and payments. Our database generates a unique identifier for the string. This identifier is used to join tables.

Each payment we process has an ID from the payment processor (unless the payment is credited to our internal customer account)

Before we create the first record, we will create a unique Boolean ID for the transaction.



This is how we call them and how we use them.

  • Order ID or Record Number: The ID that the database generates. Usually an increased integer. Used to link tables. Also used as a short, concise and convenient identifier
  • Account ID: A unique logical identifier that we create for the account. We are using a GUID. This is what we ship along with our payment transaction.
  • Transaction ID or Payment ID: The ID returned by the payment processor. Various formats are used.

You can skip the account ID and only use the order ID. We like to have a boolean id to cast before we even save the record to the database.

0


source







All Articles