---
schema_version: "1"
id: ff39855ec7c1f10d16753ce6b0710c25d032034d115de80622c1446a351dad44
title: NotificationClient Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_commercepayments_NotificationClient.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_NotificationClient.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: d511e5d1bba8ea7ae168dea67fb7aefa2d837a86c6d35d82c18743ddbe649070
description: Communicates with the payment platform regarding the gateway’s notification.Stores the results of a notification request.
---
# NotificationClient Class

Communicates with the payment platform regarding 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

Specify the CommercePayments namespace when creating an instance of this class. The constructor of this class takes no arguments. For example:

CommercePayments.NotificationClient ntc = new CommercePayments.NotificationClient();

This class is used in asynchronous payment gateway adapters. The notification client contains API for communicating with the payments platform regarding the gateway’s notification. When the gateway sends a notification, the gateway adapter invokes the record method in NotificationClient to request that the platform updates notification details.

## Example

The NotificationSaveResult class creates a saveResult object to store the result of the save request made to the payment gateway.

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

- **[NotificationClient Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_NotificationClient.htm#apex_commercepayments_NotificationClient_methods)**

## NotificationClient Methods

The following are methods for NotificationClient.

- **[record(notification)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_NotificationClient.htm#apex_commercepayments_NotificationClient_record)**  
    Stores the results of a notification request.

### record(notification)

Stores the results of a notification request.

#### Signature

global static commercepayments.NotificationSaveResult record(commercepayments.BaseNotification notification)

#### Parameters

- **notification**:
    
    [Type: BaseNotification](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_BaseNotification.htm#apex_class_commercepayments_BaseNotification "Abstract class for storing notification information sent from payment gateways.")

#### Return Value

Type: [NotificationSaveResult](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_NotificationSaveResult.htm#apex_class_commercepayments_NotificationSaveResult "Contains the result of the payment platform’s attempt to record data from the gateway’s notification.")