---
schema_version: "1"
id: 6b7a8d1bc385bdea0da161521dca99a297f0ab9dbef7b27fc889f5e89bb418f7
title: setGatewayMessage(gatewayMessage)
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_commercepayments_PostAuthorizationResponse_setGatewayMessage.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_commercepayments_PostAuthorizationResponse_setGatewayMessage.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: fde12129329f14d69ad7135f1510c6d01fd6009a876f8ba35b1873138095d0d7
description: Sets error messages that the gateway returned for the tokenization request. Maximum length of 255 characters.
---
# setGatewayMessage(gatewayMessage)

Sets error messages that the gateway returned for the tokenization request. Maximum length of 255 characters.

## Signature

public void setGatewayMessage(String gatewayMessage)

## Parameters

- **gatewayMessage**:
    
    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.")

## Return Value

Type: void