---
schema_version: "1"
id: 77162c8aa510d8cfdaddebfaf29bdc76e4990d3fc34640288a70a1bf3cf289ca
title: PaymentMethodDetailsResponse Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_commercepayments_PaymentMethodDetailsResponse.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_PaymentMethodDetailsResponse.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: df1f6503b415a49e343c12ca00ba16ae585efc7f8ead95a86f90d3f20f267bd2
description: This class contains the details about the payment method.Sets the alternative payment method details.Sets the details about the card payment method.
---
# PaymentMethodDetailsResponse Class

This class contains the details about the payment method.

## 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

commercepayments.AlternativePaymentMethodResponse alternativePaymentMethodResponse = new commercepayments.AlternativePaymentMethodResponse();
alternativePaymentMethodResponse.setEmail('alternativePaymentMethod');
alternativePaymentMethodResponse.setEmail('foo@foo.com');
alternativePaymentMethodResponse.setGatewayToken('NMoPoIOnTZSaRaWcV7gUUXe');
alternativePaymentMethodResponse.setGatewayTokenDetails('gateway token details');
commercepayments.PaymentMethodDetailsResponse response = new commercepayments.PaymentMethodDetailsResponse();
response.setAlternativePaymentMethod(alternativePaymentMethodResponse);

- **[PaymentMethodDetailsResponse Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_PaymentMethodDetailsResponse.htm#apex_commercepayments_PaymentMethodDetailsResponse_methods)**

## PaymentMethodDetailsResponse Methods

The following are methods for PaymentMethodDetailsResponse.

- **[setAlternativePaymentMethod(alternativePaymentMethod)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_PaymentMethodDetailsResponse.htm#apex_commercepayments_PaymentMethodDetailsResponse_setAlternativePaymentMethod)**  
    Sets the alternative payment method details.
- **[setCardPaymentMethod(cardPaymentMethod)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_PaymentMethodDetailsResponse.htm#apex_commercepayments_PaymentMethodDetailsResponse_setCardPaymentMethod)**  
    Sets the details about the card payment method.

### setAlternativePaymentMethod(alternativePaymentMethod)

Sets the alternative payment method details.

#### Signature

public void setAlternativePaymentMethod(commercepayments.AlternativePaymentMethodResponse alternativePaymentMethod)

#### Parameters

- **alternativePaymentMethod**: Type: [CommercePayments.AlternativePaymentMethodResponse](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_AlternativePaymentMethodResponse.htm#apex_class_commercepayments_AlternativePaymentMethodResponse "The class contains the response details of the alternative payment method.") Details of the alternative payment method.

#### Return Value

Type: void

### setCardPaymentMethod(cardPaymentMethod)

Sets the details about the card payment method.

#### Signature

public void setCardPaymentMethod(commercepayments.CardPaymentMethodResponse cardPaymentMethod)

#### Parameters

- **cardPaymentMethod**: Type: [CommercePayments.CardPaymentMethodResponse](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_CardPaymentMethodResponse.htm#apex_class_commercepayments_CardPaymentMethodResponse "This class contains details about the card payment method.") Details about the card payment method.

#### Return Value

Type: void