Reply
Highlighted
Member
Posts: 7
Registered: ‎12-26-2018
Accepted Solution

How refund api's works?

[ Edited ]

Suppose I have 100 customers and 60th customer will facing a problem from  my services and He want to refund all the money he paid for the service then which json data merchant will send that it will refund the money to the 60th customer. The below json Now I'm sending but I don't know how it will identify that the customer is 60th:-

 

{
   "createTransactionRequest": {
      "merchantAuthentication": {
         "name": "4d1n246bZH3",
         "transactionKey": "5U4j557r75FKNLdF"
      },
      "transactionRequest": {
         "transactionType": "refundTransaction",
         "amount": "15000.00",
         "payment": {
            "creditCard": {
            "cardNumber": "4111111111111111",
            "expirationDate": "2020-12"
          }
        }
      }
   }
}


Accepted Solutions
Highlighted
Solution
Accepted by topic author puneetjindal30
‎01-01-2019 10:10 PM
Posts: 2,765
Topics: 57
Kudos: 247
Blog Posts: 67
Registered: ‎12-05-2011

Re: How refund api's works?

Hello @puneetjindal30

 

Each successful transaction will include a unique Transaction ID which you should store in your system with each order.  If a refund is necessary, find the Transaction ID for that order and use it for a refund instead of the card number.

 

Richard

 

 

View solution in original post

Highlighted
Solution
Accepted by topic author puneetjindal30
‎01-01-2019 10:06 PM
Authorize.Net Expert
Posts: 75
Registered: ‎07-27-2016

Re: How refund api's works?

Hi @puneetjindal30,

 

The refund can be done in two ways, one against the transaction which was done and for that you need to send the transaction id as mentioned by @RichardH. This is the standard way of doing a refund.

 

But sometimes it might happen that due to some reason cannot find the transaction ot the customer cc has changed, and the merchant just need to refund against the customer's current card and for that the merchant just need the card number and thats the request sample you are looking at. Also to note, this may or may not be enabled for the merchant depending on the configuration.

 

Hope this Helps!

Kaushik

View solution in original post


All Replies
Highlighted
Solution
Accepted by topic author puneetjindal30
‎01-01-2019 10:10 PM
Posts: 2,765
Topics: 57
Kudos: 247
Blog Posts: 67
Registered: ‎12-05-2011

Re: How refund api's works?

Hello @puneetjindal30

 

Each successful transaction will include a unique Transaction ID which you should store in your system with each order.  If a refund is necessary, find the Transaction ID for that order and use it for a refund instead of the card number.

 

Richard

 

 

Highlighted
Member
Posts: 7
Registered: ‎12-26-2018

Re: How refund api's works?

Hello @RichardH

But it also give me success response while I'm not mentioning the transaction id. Then How I will guess or sure that which customer will get refunds?


Puneet 

Highlighted
Solution
Accepted by topic author puneetjindal30
‎01-01-2019 10:06 PM
Authorize.Net Expert
Posts: 75
Registered: ‎07-27-2016

Re: How refund api's works?

Hi @puneetjindal30,

 

The refund can be done in two ways, one against the transaction which was done and for that you need to send the transaction id as mentioned by @RichardH. This is the standard way of doing a refund.

 

But sometimes it might happen that due to some reason cannot find the transaction ot the customer cc has changed, and the merchant just need to refund against the customer's current card and for that the merchant just need the card number and thats the request sample you are looking at. Also to note, this may or may not be enabled for the merchant depending on the configuration.

 

Hope this Helps!

Kaushik

Highlighted
Member
Posts: 7
Registered: ‎12-26-2018

Re: How refund api's works?

Hi @kikmak42 

 

 

Thanks for replying me, I have an doubt is that the card number is of the customer if the merchant doesn't have transaction id? second doubt is there is only two ways you told nothing else?

 

Puneet

Highlighted
Authorize.Net Expert
Posts: 75
Registered: ‎07-27-2016

Re: How refund api's works?

Hi @puneetjindal30

 

Yes the card number is of the customer.

 

Two ways I meant one with TransactionId and one without.

 

Also a small note, refund(with transId) can be done for transactions which are settled state only, it cannot be done if the transaction is in Authorized or Captured state. So, for unsettled transaction you will need to do a Void.

 

Happy Coding!

Kaushik