---
schema_version: "1"
id: 16e6a3ee9af01eb12342e05d130391f3f28aa68d372bf5e68b27c11db245c675
title: ReferencedRefundRequest
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_commercepayments_ReferencedRefundRequest.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_ReferencedRefundRequest.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: fee787eec0e34414657e693c3fe9a6755f228887b53f5512c63663030199f4ca
description: Access information about the referenced refund requests. Extends the RefundRequest class.This constructor is intended for test usage and throws an exception if used outside of the Apex test context.References a payment object.References an account.References an amount.
---
# ReferencedRefundRequest

Access information about the referenced refund requests. Extends the RefundRequest class.

## Namespace

[CommercePayments](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_commercepayments.htm "Use the CommercePayments namespace to provide a safe and customizable platform for managing customer payments and refunds.")

## Example

global commercepayments.GatewayResponse processRequest(commercepayments.PaymentGatewayContext gatewayContext) {
    commercepayments.RequestType requestType = gatewayContext.getPaymentRequestType();
    if (requestType == commercepayments.RequestType.ReferencedRefund) {
        commercepayments.\*ReferencedRefundRequest\* refundRequest = (commercepayments.\*ReferencedRefundRequest\*) gatewayContext.getPaymentRequest();
    }
}

- **[ReferencedRefundRequest Constructors](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_ReferencedRefundRequest.htm#apex_commerce_payments_ReferencedRefundRequest_constructors)**
- **[ReferencedRefundRequest Properties](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_ReferencedRefundRequest.htm#apex_commerce_payments_ReferencedRefundRequest_properties)**
- **[ReferencedRefundRequest Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_ReferencedRefundRequest.htm#apex_commerce_payments_ReferencedRefundRequest_methods)**

## ReferencedRefundRequest Constructors

The following are constructors for ReferencedRefundRequest.

- **[ReferencedRefundRequest(amount, paymentId)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_ReferencedRefundRequest.htm#apex_commerce_payments_ReferencedRefundRequest_ctor)**  
    This constructor is intended for test usage and throws an exception if used outside of the Apex test context.

### ReferencedRefundRequest(amount, paymentId)

This constructor is intended for test usage and throws an exception if used outside of the Apex test context.

#### Parameters

- **amount**:
    
    Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")
    
    The amount to be debited or captured.
- **paymentId**:
    
    Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")
    
    The payment record.

## ReferencedRefundRequest Properties

The following are properties for ReferencedRefundRequest.

- **[PaymentId](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_ReferencedRefundRequest.htm#apex_commerce_payments_ReferencedRefundRequest_PaymentId)**  
    References a payment object.
- **[accountId](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_ReferencedRefundRequest.htm#apex_commerce_payments_ReferencedRefundRequest_accountId)**  
    References an account.
- **[amount](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_ReferencedRefundRequest.htm#apex_commerce_payments_ReferencedRefundRequest_amount)**  
    References an amount.

### PaymentId

References a payment object.

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### accountId

References an account.

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### amount

References an amount.

#### Property Value

Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")

## ReferencedRefundRequest Methods

The following are methods for ReferencedRefundRequest.