---
schema_version: "1"
id: 3e24f98341c3250274c84cd2891f1cc65691bb49324097c9973c5ca3ae72a2cb
title: NotificationSaveResult Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_commercepayments_NotificationSaveResult.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_NotificationSaveResult.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: f5f88a1c62fed4d2385494a18169b54a4ccb807489544dd8eba1cae97d53ca12
description: Contains the result of the payment platform’s attempt to record data from the gateway’s notification.Gets the error message, if any, from the payment platform regarding its attempt to save the notification sent from the payment gateway.Gets the status code from the payment platform’s attempt to save the notification sent from the payment gateway.Gets the status of whether the payment platform successfully saved the notification sent from the payment gateway.
---
# NotificationSaveResult Class

Contains the result of the payment platform’s attempt to record data from the gateway’s notification.

## 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.")

## Usage

This class is used with asynchronous payments. It is the return type of the NotificiationClient.record operation and contains the result of the payment platform’s attempt to save notification details.

The constructor of this class takes no arguments. For example:

CommercePayments.NotificationSaveResult nsr = new CommercePayments.NotificationSaveResult();

## Example

commercepayments.NotificationSaveResult saveResult = commercepayments.NotificationClient.record(notification);

- **[NotificationSaveResult Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_NotificationSaveResult.htm#apex_commercepayments_NotificationSaveResult_methods)**

## NotificationSaveResult Methods

The following are methods for NotificationSaveResult.

- **[getErrorMessage()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_NotificationSaveResult.htm#apex_commercepayments_NotificationSaveResult_getErrorMessage)**  
    Gets the error message, if any, from the payment platform regarding its attempt to save the notification sent from the payment gateway.
- **[getStatusCode()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_NotificationSaveResult.htm#apex_commercepayments_NotificationSaveResult_getStatusCode)**  
    Gets the status code from the payment platform’s attempt to save the notification sent from the payment gateway.
- **[isSuccess()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_NotificationSaveResult.htm#apex_commercepayments_NotificationSaveResult_isSuccess)**  
    Gets the status of whether the payment platform successfully saved the notification sent from the payment gateway.

### getErrorMessage()

Gets the error message, if any, from the payment platform regarding its attempt to save the notification sent from the payment gateway.

#### Signature

global String getErrorMessage()

#### Return Value

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.")

### getStatusCode()

Gets the status code from the payment platform’s attempt to save the notification sent from the payment gateway.

#### Signature

global Integer getStatusCode()

#### Return Value

Type: [Integer](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_integer.htm#apex_methods_system_integer "Contains methods for the Integer primitive data type.")

### isSuccess()

Gets the status of whether the payment platform successfully saved the notification sent from the payment gateway.

#### Signature

global Boolean isSuccess()

#### Return Value

Type: [Boolean](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_boolean.htm#apex_methods_system_boolean "Contains methods for the Boolean primitive data type.")