Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7500939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:21:55+00:00 2026-05-29T20:21:55+00:00

I always assumed that txn_id sent with IPN message is unique. PayPal guidelines seem

  • 0

I always assumed that txn_id sent with IPN message is unique. PayPal guidelines seem to support this idea – https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_admin_IPNIntro

Avoid duplicate IPN messages. Check that you have not already processed the transaction identified by the transaction ID returned in the IPN message. You may need to store transaction IDs returned by IPN messages in a file or database so that you can check for duplicates. If the transaction ID sent by PayPal is a duplicate, you should not process it again.

However I found that PayPal’s eCheck payment IPN is sent twice with the same transaction ID. Once during initial payment with payment_status as “Pending” and again after couple days when eCheck is actually processes with payment_status as “Completed”.

I want to store both transactions, but still would like to avoid storing duplicates. There is another field in IPN called ipn_track_id and it’s different for both transactions, but I can’t find documentation for it, except this vague description:

Internal; only for use by MTS and DTS

Anyone else is using ipn_track_id to uniquely identify IPN messages?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T20:21:57+00:00Added an answer on May 29, 2026 at 8:21 pm

    ipn_track_id shouldn’t be used; mainly because this is for internal use only as stated, and because it’s unique for every IPN message.
    The txn_id is unique for each transaction, not each IPN message.

    What this means is; one transaction can have multiple IPN messages. eCheck, for example, where it will go in a ‘Pending’ state by default, and ‘Complete’ once the eCheck has cleared.
    But you may also see reversals, canceled reversals, cases opened and refunds against the same txn_id.

    Pseudo code:

    If not empty txn_id and txn_type = web_accept and payment_status = Completed  
        // New payment received; completed. May have been a transaction which was pending earlier.
        Update database set payment_status = Completed and txn_id = $_POST['txn_id']  
    
    If not empty txn_id and txn_type = web_accept and payment_status = Pending  
        // New payment received; completed  
        Update database set payment_status = Pending and payment_reason = $_POST['pending_reason'] and txn_id = $_POST['txn_id']
    

    You can find a lot more IPN variables listed on https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_IPNandPDTVariables#id08CTB0S055Z

    Basically; PayPal will generate a unique seller transaction ID. This tranaction ID may go through various stages before it’s ‘Completed’, so you’ll need to be able to handle these exceptions.

    As for PayPal’s note in the documentation: PayPal may resend individual IPN mesages if it encounters errors during delivery. For example, it’s required for your script to return a proper HTTP/1.1 200 OK HTTP status response whenever PayPal POST’s the IPN data to it.
    If you don’t return a HTTP/1.1 200 OK response, PayPal will reattempt sending the same data up to 16 times per indiviudal IPN message.

    Note: A seller’s transaction ID is different from a buyer’s transction ID, since they’re two different actions (one debit, one credit).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Why do IDE's complain about leaking this in constructor? I've always assumed that it's
In pre-.NET world I always assumed that int is faster than byte since this
For some reason I have always assumed that most of the time a variable
I had always assumed that AJAX-driven content was invisible to search engines. (i.e. content
I read somewhere (and have observed) that starting threads is slow. I always assumed
I always assumed that if I was using Select(x=> ...) in the context of
I had always assumed that the first entry in sys.path by default was the
I've always assumed that - in the absence of constructor parameters - the parentheses
I had always assumed that the Python interpreter did no optimizations without a -O
OK when working with table creation, is it always assumed that creating a table

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.