Introduction

The refund API module enables the application to retrieve and refund a transaction. The ability to refund a transaction is needed if the customer has placed a transaction in error, cannot proceed with a transaction or wished to discontinue for other reasons. In each use case, the application can use refund API module to execute a refund and return the funds back to the customer.




API Sequence

The Refund API module comprises of three synchronous endpoints. The general process for refunding a transaction is as follows:

  1. Retrieve a transaction by transactionId | GET: refund/v2/transactions/{transactionId}
    The application can use transactionId as a path parameter to retrieve the transaction for refund

    OR

    Retrieve a transaction by referenceNumber | GET: refund/v2/transactions/?referenceNumber={referenceNumber}
    The application can use the reference number as a query parameter to retrieve the transaction for refund.

  2. Commit a transaction for refund | PUT: refund/v2/transactions/{transactionId}/commit
    The application must use a HTTP PUT method to execute the refund.

Typically the application will develop a "Refund" feature within a wider transaction history UI experience. Once the transaction is retrieved, we recommend a transaction summary be displayed in the UI of the application. This helps the customer to validate the transaction details and the amount to be refunded before the refund is executed.





API Sequence Diagram





Endpoints

NameMETHODURLDescription
Retrieve a TransactionGET/refund/v2/transactions/{transactionID}Look up a transaction for refund using transactionID as a path parameter
Retrieve a TransactionGET/refund/v2/transactions/?referenceNumber={referenceNumber}Look up a transaction for refund using reference number as a query parameter
Refund a TransactionPOST/refund/v2/transactions/{transactionID}/commitThe Commit API executes the transactionId for refund and completes the return of funds.



Example User Journey


1 - Retreive a transaction

Look up and retrieve the transaction to be refunded by reference number or transaction ID.

2 - Refund summary

MoneyGram returns a summary of the transaction to be refunded. Transactions must be in an “Available” status and can only be refunded to the sender.

3 - Refund complete

MoneyGram completes the refund and provides a reference number for the refunded transaction.

1 - Retreive a transfer

The cashier retrieves the transaction to be refunded by reference number or transaction ID.

2 - Refund summary

MoneyGram returns a summary of the transaction to be refunded. Transactions must be in an “Available” status and can only be refunded to the sender.

3 - Refund complete

MoneyGram completes the refund and provides a reference number for the refunded transaction.