Sandbox Successful Transaction does not show on partal dashboard

I am ausing asp.net 3.1 and the following code to prcoess payment

square = new SquareClient.Builder()
                                     .Environment(Square.Environment.Sandbox)
                                     .AccessToken(AccessToken)
                                     .Build();
    
      CurrencyCode = "USD";
                         var bodyAmountMoney = new Money.Builder()
                            .Amount(Amount * 100)
                            .Currency(CurrencyCode)
                            .Build();
      
    
         var body = new CreatePaymentRequest.Builder(
                                    Nonce,
                                   AppID,
                                    bodyAmountMoney)
                                .Autocomplete(true)
                                .ReferenceId("123456")
                                .LocationId(LocationID)
                                .Note("Brief description")
                                .Build();
                            CreatePaymentResponse result = await square.PaymentsApi.CreatePaymentAsync(body);

I see the response is successfull.

Now when i go into developer portal and look for sandbox trsactions i don’t see any of them.
Seconlyd when i try to look of rthe reciept from response, it does not find it eather.

Where can i verify the successfull transaction on portal ? why no recipet is showing for the reciept_url ?

Hi @nsingh welcome to the forums!

Sandbox transactions show up on the sandbox dashboard, which can be found here: https://developer.squareup.com/apps (click on “Open” next to your Sandbox Test Account). Unfortunately the sandbox receipts are a known issue and currently do not load, so we appreciate the feedback.

Yes, i am looking at that location and it does not show any transactions

Not sure if this helps, but what i am finding is that i am getting back the same TransactionID(JUgoArLvuU3Lttk9sSAC9IaeYhYZY) in the success response. Whenever there is change in transaction id i do see the row, after that every susbequent createpayments returns the same transactionID

This is serious bug, Why would it return the same transactionID, what would happen if i ship the product becuase transaction is successfull only to find it was not.

I was able to fix the Code, found a reference which mentions that
.IdempotencyKey(guid)

That fixed.

But i still consider it as very serious Bug, it should throw error if all the needed parameter are not provided instead of returning the success status.

Secondly if you documents refelct things correctly this would have saved me 2-3 days of efforts

Thanks for the feedback, we’ll be sure our PMs take this into consideration. Currently, if you use the same idempotency key, it will return the same response as the first time you did it.

It is not limited to first time, i created 10-15 payments with success status but non of them showed up in the portal.

Could you clarify what you mean by not showing up in the portal? The one you provided (JUgoArLvuU3Lttk9sSAC9IaeYhYZY), I do see in your “Default Test Account” sandbox dashboard. There’s 9 total that show up (8 on September 4th, and 1 on September 3rd).

Sure, what you are seeing is the first entry that produced Trnsaction ID (JUgoArLvuU3Lttk9sSAC9IaeYhYZY). I processed almost 10-15 more transaction with success result. Later toward the end I inspected only to find that they all were returning the same TransactionID. So what I am saying is that you run the following code multiple times you see that it return the same Tranasction ID everytime with the success result. Say you ran the code 15 time you will only see one entry on the portal, where actual execution were 15 times.

It is very easy to reproduce
just the following code multiple times and see if you can find on portal that many time.

square = new SquareClient.Builder()
                                     .Environment(Square.Environment.Sandbox)
                                     .AccessToken(AccessToken)
                                     .Build();
    
      CurrencyCode = "USD";
                         var bodyAmountMoney = new Money.Builder()
                            .Amount(Amount * 100)
                            .Currency(CurrencyCode)
                            .Build();
      
    
         var body = new CreatePaymentRequest.Builder(
                                    Nonce,
                                   AppID,
                                    bodyAmountMoney)
                                .Autocomplete(true)
                                .ReferenceId("123456")
                                .LocationId(LocationID)
                                .Note("Brief description")
                                .Build();
                            CreatePaymentResponse result = await square.PaymentsApi.CreatePaymentAsync(body);

Why I say it is very serious issue, is if that code was running on my website, I would have shipped the product because I got the success response, but I would never get paid for it because there is no trace of all success that were returned.

So my suggestion is that I the required fields are missing API should not return success result.