How to Determine Transaction Status and Implement Refunds with Cybersource API in Node.js?

41 Views Asked by At

I am currently working on implementing a refund feature for Apple Pay and Google Pay transactions using Cybersource in Node.js. I am using the "cybersource-rest-client" package version "^0.0.51" for this purpose.

My goal is to determine the status of a transaction – whether it has been settled/batched or is still open – and then initiate the appropriate refund process based on this status.

During my exploration of the Cybersource API documentation, I have reviewed the following resources:

  1. Payment Reversal Process - Authorization Reversal
  2. Cybersource Knowledgebase Article

I noticed a "status" column in the documentation but am uncertain about how to effectively use it to determine the transaction status using the "cybersource-rest-client" package in Node.js. Can someone provide guidance on how to retrieve the status of a transaction and which specific endpoint to call for open transactions versus settled/batched transactions?

Any insights, examples, or Node.js code snippets leveraging the "cybersource-rest-client" package would be greatly appreciated. Thank you for your assistance.

0

There are 0 best solutions below