---
schema_version: "1"
id: 25040dea9dc11ded230753c285123cd706c7836f5ceaef4949b72a19a936d13d
title: BaseRequest Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_commercepayments_BaseRequest.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_BaseRequest.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7af96d158d559b5c6f109678966d052247810ed9971a3a837e0ca324e70cdfda
description: BaseRequest is extended by all the request classes.Used for testing.
---
# BaseRequest Class

BaseRequest is extended by all the request classes.

## 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.")

- **[BaseRequest Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_BaseRequest.htm#apex_System_BaseRequest_methods)**

## BaseRequest Methods

The following are methods for BaseRequest.

- **[BaseRequest(AdditionalData, IdempotencyKey)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_BaseRequest.htm#apex_System_BaseRequest_BaseRequest)**  
    Used for testing.

### BaseRequest(AdditionalData, IdempotencyKey)

Used for testing.

#### Signature

global Void BaseRequest(String AdditionalData, Map<String, String\> IdempotencyKey)

#### Parameters

- **AdditionalData**: 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.") Contains additional data that may be required for a payment request. The additionalData object consists of key-value pairs. You can retrieve the additionalData object from the request object: Map<String, String> additionalData=request.additionalData
- **IdempotencyKey**: Type: Map<String, String> Unique value that's generated by a client and sent to the server in the request. The server stores the value and uses the it to keep track of the request status.

#### Return Value

Type: Void