cancel
Showing results for 
Search instead for 
Did you mean: 

How refund api's works?

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"
          }
        }
      }
   }
}

2 ACCEPTED SOLUTIONS

Accepted Solutions

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

RichardH
Administrator Administrator
Administrator

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

6 REPLIES 6

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

 

 

RichardH
Administrator Administrator
Administrator

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 

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

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

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

I have a question regarding refunding transactions where credit card is now expired. The original transaction was successful, now when trying to refund it seems I am unable. Is that expected? 

ESalaj
Member