---
schema_version: "1"
id: 9f5ac32f8209a4cb4489724a74a11c98d49e24602626e40de0610ae6f57ff310
title: PostAuthorizationResponse Methods
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_commercepayments_PostAuthorizationResponse_methods.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_commercepayments_PostAuthorizationResponse_methods.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: b86ad7f96ae18db583ba1239866c27fccc384f1815795569efe4399fca34bc90
description: Lists the methods for the PostAuthorizationResponse.
---
# PostAuthorizationResponse Methods

Lists the methods for the PostAuthorizationResponse.

The following are methods for PostAuthorizationResponse.

- **[setAlternativePaymentMethodResponse(AlternativePaymentMethodResponsealternativePaymentMethod)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_commercepayments_PostAuthorizationResponse_setAltPaymentMethodResponse.htm)**  
    Sets details from the gateway about the authorized alternative payment method.
- **[setAmount(amount)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_commercepayments_PostAuthorizationResponse_setAmount.htm)**  
    Sets the amount for payment authorization. Can be positive, negative, or zero.
- **[setAsync(async)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_commercepayments_PostAuthorizationResponse_setAsync.htm)**  
    Sets whether the payment capture or authorization is asynchronous (True) or synchronous (False). If True, then the payment or payment authorization record created has a status of Pending.
- **[setAuthorizationExpirationDate(authExpDate)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_commercepay_PostAuthResp_setAuthExpirationDate.htm)**  
    Sets the expiration date of the authorization request.
- **[setGatewayAuthCode(gatewayAuthCode)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_commercepayments_PostAuthorizationResponse_setGatewayAuthCode.htm)**  
    Sets the authorization code that the gateway returned. Maximum length of 64 characters.
- **[setGatewayAvsCode(gatewayAvsCode)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_commercepayments_PostAuthorizationResponse_setGatewayAvsCode.htm)**  
    Sets the AVS (address verification system) result code information that the gateway returned. Maximum length of 64 characters.
- **[setGatewayDate(gatewayDate)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_commercepayments_PostAuthorizationResponse_setGatewayDate.htm)**  
    Sets the date that the authorization occurred. Some gateways don’t send this value.
- **[setGatewayMessage(gatewayMessage)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_commercepayments_PostAuthorizationResponse_setGatewayMessage.htm)**  
    Sets error messages that the gateway returned for the tokenization request. Maximum length of 255 characters.
- **[setGatewayReferenceDetails(gatewayReferenceDetails)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_commercepayments_PostAuthorizationResponse_setGatewayReferenceDetails.htm)**  
    Sets any additional reference details that the gateway returned.
- **[setGatewayReferenceNumber(gatewayReferenceNumber)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_commercepayments_PostAuthorizationResponse_setGatewayReferenceNumber.htm)**  
    Sets the reference number that the gateway returned.
- **[setGatewayResultCode(gatewayResultCode)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_commercepayments_PostAuthorizationResponse_setGatewayResultCode.htm)**  
    Sets a gateway-specific result code. The code may be mapped to a Salesforce-specific result code. Maximum length of 64 characters.
- **[setGatewayResultCodeDescription(gatewayResultCodeDescription)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_commercepay_PostAuthResp_setGatewayResultCodeDesc.htm)**  
    Sets a description of the gateway-specific result code that a payment gateway returned. Maximum length of 1000 characters.
- **[setPaymentMethodDetails(paymentMethodDetails)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_commercepayments_PostAuthorizationResponse_setPaymentMethodDetails.htm)**  
    Sets details about the payment method.
- **[setPaymentMethodTokenizationResponse(paymentMethodTokenizationResponse)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_commercepayments_PostAuthorizationResponse_setPaymentMethodResponse.htm)**  
    Sets information from the gateway about the tokenized payment method.
- **[setSalesforceResultCodeInfo(salesforceResultCodeInfo)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_commercepayments_PostAuthorizationResponse_setSalesforceResultCodeInfo.htm)**  
    Sets the Salesforce-specific result code information. Payment gateways have many response codes for payment calls. Salesforce uses the result code information to map payment gateway codes to a predefined set of standard Salesforce result codes.