---
schema_version: "1"
id: 42bf275a3e5e0590a9cd25768f7a10247ca8e5919075826438efe3e0308780f3
title: PostAuthApiPaymentMethodRequest(AlternativePaymentMethodRequest)
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_commercepayments_PostAuthApiPaymentMethodRequest_ctor_alt.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_commercepayments_PostAuthApiPaymentMethodRequest_ctor_alt.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 603026f880ea10fb2e146155c46fa2c0c0fd6ddae587e21283fd569846d984d8
description: Constructs a sample alternativePaymentMethodRequest. This constructor is intended for test usage and throws an exception if used outside of the Apex test context.
---
# PostAuthApiPaymentMethodRequest(AlternativePaymentMethodRequest)

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

## Signature

global PostAuthApiPaymentMethodRequest(commercepayments.AlternativePaymentMethodRequestPaymentMethodRequest)

## Parameters

- **alternativePaymentMethodRequest**:
    
    Type: [commercepayments.AlternativePaymentMethodRequest](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_CardPaymentMethodRequest.htm#apex_class_commercepayments_CardPaymentMethodRequest "Sends data related to a card payment method to a gateway adapter during a service call.")
    
    Contains information about the alternative payment method. Used to send information to a gateway adapter during a service call.