Refunds 
========

#### Refund a Payment Initiation payment 

Refunds enable you to refund your end users. You can issue refunds for any [Payment Initiation](https://plaid.com/docs/payment-initiation/index.html.md) payments that have settled in your virtual account.

*   The original payment must be in a settled state to be refunded.
    
*   To refund partially, specify the amount as part of the request.
    
*   If the amount is not specified, the refund amount will be equal to all of the remaining payment amount that has not been refunded yet.
    
*   If the remaining payment amount is less than one unit of currency (e.g. 1 GBP or 1 EUR), the refund will fail.
    

#### Execute a Refund 

Make sure your virtual account is set up before following these steps. For more information on setting up an account, see [Managing virtual accounts](https://plaid.com/docs/payment-initiation/virtual-accounts/managing-virtual-accounts/index.html.md) .

1.  Follow the [Payment Confirmation](https://plaid.com/docs/payment-initiation/virtual-accounts/payment-confirmation/index.html.md#confirming-funds-have-settled) flow to pay into your virtual account.
    
2.  Call [/wallet/get](https://plaid.com/docs/api/products/virtual-accounts/index.html.md#walletget) to check your virtual account balance for sufficient funds.
    
    *   If you have insufficient funds, [fund your virtual account](https://plaid.com/docs/payment-initiation/virtual-accounts/managing-virtual-accounts/index.html.md#fund-your-virtual-account) before proceeding. After funding your virtual account, you can check the updated balance by calling [/wallet/get](https://plaid.com/docs/api/products/virtual-accounts/index.html.md#walletget) .
3.  Issue a refund by calling [/payment\_initiation/payment/reverse](https://plaid.com/docs/api/products/payment-initiation/index.html.md#payment_initiationpaymentreverse) , providing the `payment_id` from the payment made in Step 1, and optionally an `amount` for partial refunds. Store the `refund_id` and `status` from the response.
    
    *   If you have [configured transaction webhooks](https://dashboard.plaid.com/developers/webhooks) , you will receive a status update that the Refund transitioned from `INITIATED` to `EXECUTED`.
        
    *   Alternatively, if not using webhooks, you can confirm the transaction has been executed by calling [/wallet/transaction/get](https://plaid.com/docs/api/products/virtual-accounts/index.html.md#wallettransactionget) with the `transaction_id`.
        
    *   You can also confirm that the original payment was refunded by calling [/payment\_initiation/payment/get](https://plaid.com/docs/api/products/payment-initiation/index.html.md#payment_initiationpaymentget) with the `payment_id` to see the `refund_id` as part of the payment's details.
        
4.  If you have previously executed any partial refunds for the payment, you can still issue subsequent refunds if this payment has sufficient remaining amount.
    
    *   To check if the payment has sufficient remaining amount, call [/payment\_initiation/payment/get](https://plaid.com/docs/api/products/payment-initiation/index.html.md#payment_initiationpaymentget) and fetch the `amount_refunded` field, which represents the amount that has been refunded already. Subtract this from the payment amount to calculate the amount still available to refund.

A successful refund will transition to the `EXECUTED` status. If a refund is in a `FAILED` status, you may try again, with a new `idempotency_key`, until you have a refund in an `EXECUTED` status for the payment. Refunds should transition to `EXECUTED` or `FAILED` automatically. If this does not occur,

#### Testing Refunds 

You can begin testing Refunds in Sandbox by following the steps listed in the [Add Virtual Accounts to your App](https://plaid.com/docs/payment-initiation/virtual-accounts/add-to-app/index.html.md) guide. For Production access you will first need to [submit a product access request support ticket](https://dashboard.plaid.com/support/new/product-and-development/product-troubleshooting/request-product-access) .