# Operate and Reconcile
source: https://developer.mastercard.com/mastercard-gateway/documentation/use-cases/operate-and-reconcile/index.md

## Retrieve payment and order status {#retrieve-payment-and-order-status}

This use case shows how support teams can retrieve payment and order information from the Mastercard Gateway. By retrieving order or transaction details, support agents can view the current payment status, transaction history, response codes, and timestamps associated with a payment.

This information can help resolve customer inquiries related to authorized, captured, refunded, voided, or declined transactions.

### Prerequisites {#prerequisites}

* An order reference or transaction reference is available.
* The transaction exists within the Mastercard Gateway.
* The merchant has permission to retrieve transaction details.

### Sequence diagram {#sequence-diagram}

Diagram retrieve-payment-and-order-status

### Workflow {#workflow}

1. The support agent requests payment status information from the merchant system.
2. The merchant server retrieves the order or transaction details from the Mastercard Gateway.
3. The Mastercard Gateway returns the transaction status, timestamps, response codes, and payment history to the merchant server.
4. The merchant server displays the payment history and status timeline to the support agent.

### Endpoint {#endpoint}

|     API     | Format | HTTP Method |                                                                                         Operation                                                                                          |
|-------------|--------|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Transaction | NVP    | POST        | [Retrieve Order](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/nvp/version/100/operation/Transaction%3a%20%20Retrieve%20Order.html?locale=en_US)                   |
|             | REST   | GET         | [Retrieve Order](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/100/operation/Transaction:%20%20Retrieve%20Order.html?locale=en_US)               |
|             | NVP    | POST        | [Retrieve Transaction](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/nvp/version/100/operation/Transaction:%20%20Retrieve%20Transaction.html?locale=en_US)         |
|             | REST   | GET         | [Retrieve Transaction](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/100/operation/Transaction%3a%20%20Retrieve%20Transaction.html?locale=en_US) |

### Error resolution {#error-resolution}

For details on error resolution, explore our [Code and Formats](https://developer.mastercard.com/mastercard-gateway/documentation/code-and-formats/index.md) section.

## Batch, reconcile, and report {#batch-reconcile-and-report}

This use case shows how finance and operations teams can process large volumes of captures, refunds, and other transaction operations in bulk. After processing, the merchant can retrieve the batch results and reconcile gateway processing outcomes and settlement information against internal finance and ERP systems.

This approach helps streamline payment operations, improve reporting, and identify exceptions that require manual review.

### Prerequisites {#prerequisites-1}

* Eligible transactions exist.
* A batch file has been generated and validated.
* Order and transaction references are available.
* The merchant has permission to perform batch operations.

### Sequence diagram {#sequence-diagram-1}

Diagram batch-reconcile-report

### Workflow {#workflow-1}

1. The finance system submits a batch file containing capture, refund, or other transaction operations to the merchant server.
2. The merchant server submits the batch operations to the Mastercard Gateway.
3. The Mastercard Gateway processes each transaction in the batch through the acquirer.
4. The acquirer returns the processing results for each transaction to the Mastercard Gateway.
5. The Mastercard Gateway returns the batch outcome report to the merchant server.
6. The merchant server sends the reconciliation results and any processing exceptions to the finance system.
7. The finance system matches settlement results against orders and transaction records to identify discrepancies and complete reconciliation.

### Endpoint {#endpoint-1}

|     API     | Format | HTTP Method |                                                                           Operation                                                                           |
|-------------|--------|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Batch       | NVP    | POST        | [Close Batch](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/nvp/version/100/operation/Batch:%20Close%20Batch.html?locale=en_US)       |
|             | REST   | GET         | [Close Batch](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/100/operation/Batch:%20Close%20Batch.html?locale=en_US) |
| Transaction | NVP    | POST        | [Refund](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/nvp/version/100/operation/Transaction:%20%20Refund.html?locale=en_US)          |
|             | REST   | PUT         | [Refund](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/100/operation/Transaction%3a%20%20Refund.html?locale=en_US)  |
|             | NVP    | POST        | [Capture](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/nvp/version/100/operation/Transaction%3a%20%20Capture.html?locale=en_US)      |
|             | REST   | PUT         | [Capture](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/100/operation/Transaction:%20%20Capture.html?locale=en_US)  |

### Error resolution {#error-resolution-1}

For details on error resolution, explore our [Code and Formats](https://developer.mastercard.com/mastercard-gateway/documentation/code-and-formats/index.md) section.
