# Status Retrieval
source: https://developer.mastercard.com/account-to-account-commerce-for-dsp/documentation/use-cases/status-retrieval/index.md

## Overview {#overview}

The status retrieval use case allows the debtor service provider to obtain the status of a refund transaction.   

This service also enables the debtor service provider to respond to the latest payment status to the creditor service provider.

## Payment Status Retrieval {#payment-status-retrieval}

The payment status retrieval service allows the debtor service provider to provide the status of an active payment request. The creditor service provider uses this service in scenarios where they might have lost connectivity to Mastercard or timed out.
Diagram pymt-status-retrieval

The following are the execution steps:  

1. The creditor wishes to inquire about the status of a payment request and sends the request to the creditor service provider.   
2. The creditor service provider requests the status of a payment request to Mastercard.   
3. Mastercard acknowledges.   
4. Mastercard checks the payment request status internally.   
5. If the payment request is in a terminal state (approved or declined), Mastercard will initiate payment confirmation advice to the creditor service provider.   
6. The creditor service provider acknowledges.   
7. For any other status, Mastercard forwards the request to the debtor service provider by calling the `/payment-requests/{payment_request_lifecycle_id}/status-retrievals` endpoint.   
8. The debtor service provider acknowledges.   
9. Debtor Service provider sends the Payment Confirmation by calling the `/payment-requests/{payment_request_lifecycle_id}/payment-confirmation-advices` endpoint.   
10. Mastercard acknowledges.   
11. Mastercard will initiate payment confirmation advice to the creditor service provider.   
12. The creditor service provider acknowledges and responds.   
13. The creditor service provider responds to the creditor to reflect in their website/app.   

## Refund Status Retrieval {#refund-status-retrieval}

The refund status retrieval service allows the debtor service provider to obtain the status of a refund payment request from the creditor service provider. The debtor service provider uses this service when they have provided refund account details to the creditor service provider and are awaiting refund payment.  


Diagram refund-status-retrieval

The following are the execution steps:  

1. The debtor service provider requests the refund status retrieval by calling the `/payment-requests/{payment_request_lifecycle_id}/refunds/{refund_request_lifecycle_id}/status-retrievals` endpoint.   
2. Mastercard acknowledges.   
3. Mastercard checks the refund status internally.   
4. If the payment request is in the terminal state (approved or declined), Mastercard will initiate refund confirmation advice to the debtor service provider by calling the (POST /payment-requests/{payment_request_lifecycle_id}/refunds/{refund_request_lifecycle_id}/payment-confirmations) endpoint.   
5. The debtor service provider acknowledges.   
6. For any other status, Mastercard forwards the request to the creditor service provider.   
7. The creditor service provider acknowledges.   
8. Creditor service provider sends the Refund Confirmation.   
9. Mastercard acknowledges.   
10. Mastercard will initiate Refund Confirmation advice to the debtot service provider by calling the ` /payment-requests/{payment_request_lifecycle_id}/refunds/{refund_request_lifecycle_id}/payment-confirmations ` endpoint.   
11. The debtor service provider acknowledges.   

### Additional Information {#additional-information}

1. Look at the [API Reference](https://developer.mastercard.com/account-to-account-commerce-for-dsp/documentation/api-reference/index.md) for information on how to implement this use case.
2. Look at the [Codes and Formats](https://developer.mastercard.com/account-to-account-commerce-for-dsp/documentation/code-and-formats/index.md) for acknowledgement responses.
