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

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

## Signature

global PostAuthApiPaymentMethodRequest(commercepayments.CardPaymentMethodRequest cardPaymentMethodRequest)

## Parameters

- **cardPaymentMethodRequest**:
    
    Type: [commercepayments.CardPaymentMethodRequest](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 card payment method. Used to send information to a gateway adapter during a service call.