CommercePayments Namespace
Use the CommercePayments namespace to provide a safe and customizable platform for managing customer payments and refunds.
To review CommercePayments use cases and walkthroughs, go to Use Cases for the CommercePayments Namespace.
The following are the classes in the CommercePayments namespace.
-
Contains the normalized response fields from payment gateways that are common to all the other gateway responses.
-
AbstractTransactionResponse Class
Abstract class for storing normalized information sent from payment gateways about a payment transaction. Holds the common response fields sent from payment gateways for authorization, sale, capture, and refund transactions.
-
Specifies the account type.
-
Specifies the type of the account holder.
-
Contains address request data that is sent to a gateway adapter during a service call.
-
AlternativePaymentMethodRequest Class
The class contains information about the alternative payment method that are required for a gateway to process the request.
-
AlternativePaymentMethodResponse Class
The class contains the response details of the alternative payment method.
-
AuditParamsRequestis used for audit parameters in a transaction request. This is an abstract request class that is extended by theBaseRequestclass. -
AuthApiPaymentMethodRequest Class
Sends information about a payment method to a gateway adapter during an authorization service call.
-
Sends information about an authorization request to a gateway adapter during a service call. This class extends the
BaseRequestclass and inherits all its methods. -
Response sent by the payment gateway adapter for an authorization service.
-
AuthorizationReversalRequest Class
Sends information about an authorization reversal request to a gateway adapter during a service call.
-
AuthorizationReversalResponse Class
Response sent by the payment gateway following a payment authorization reversal service.
-
Specifies the bank type.
-
BankPaymentMethodRequest Class
Sends data related to a bank payment method to a gateway adapter during a service call.
-
BankPaymentMethodResponse Class
This class contains information about the bank payment method response. The gateway adapter reads the gateway response and generates a
BankPaymentMethodResponse, populating the required fields to create a bank payment method. -
BaseApiPaymentMethodRequest Class
Abstract class used to send information about a payment method to a gateway adapter during a service call.
-
Abstract class for storing notification information sent from payment gateways.
-
BasePaymentMethodRequest Class
Abstract class for storing information about payment methods.
-
BaseRequestis extended by all the request classes. -
When a payment gateway sends a notification for a capture transaction, the payment gateway adapter creates the
CaptureNotificationobject to store information about the notification. -
Represents a capture request. This class extends the
BaseRequestclass and inherits all its methods. -
The payment gateway adapter sends this response for the capture request type. This class extends
AbstractResponseand inherits its methods. -
Defines whether the payment method represents a credit card or a debit card.
-
CardPaymentMethodRequest Class
Sends data related to a card payment method to a gateway adapter during a service call.
-
CardPaymentMethodResponse Class
This class contains details about the card payment method.
-
Specifies the credit card issuer.
-
Access information about custom metadata. The
PaymentGatewayAdaptercan sendCustomMetadataTypeInfoto transaction requests through the response object’sSalesforceResultCodeInfo. -
EnhancedPaymentDataInput Class
Sends enhanced payment data, including Level 2 and Level 3 fields, to the gateway adapter as part of the service call.
-
Use to respond with an error indication following errors from the
PaymentGatewayadapter, such as request-forbidden responses, custom validation errors, or expired API tokens. -
GatewayNotificationResponse Class
When the payment gateway sends a notification to the payments platform, the platform responds with a
GatewayNotificationResponseindicating whether the platform succeeded or failed at receiving the notification. -
Generic payment gateway response interface. This class extends the
CaptureResponse,AbstractTransactionResponse, andAbstractResponseclasses and inherits all their properties. It has no unique methods or parameters. -
Communicates with the payment platform regarding the gateway’s notification.
-
Contains the result of the payment platform’s attempt to record data from the gateway’s notification.
-
Shows whether the payments platform successfully received the notification from the gateway.
-
PaymentGatewayAdapter Interface
PaymentGatewayAdapterscan implement this interface in order to process requests. -
PaymentGatewayAsyncAdapter Interface
Implement the interface to allow customers to process payments asynchronously.
-
Wraps the information related to a payment request.
-
PaymentGatewayNotificationContext Class
Wraps the information related to a gateway notification.
-
PaymentGatewayNotificationRequest Class
Contains the notification request data from the gateway.
-
PaymentMethodDetailsResponse Class
This class contains the details about the payment method.
-
Sends the list of individual line items associated with the payment to the gateway adapter.
-
Specifies the ID of the payment method type.
-
PaymentMethodTokenizationRequest Class
Stores data about a request to tokenize a card payment method. The tokenization process occurs in the payment gateway. This process replaces sensitive customer data, such as a card number or CVV, with unique identification symbols. The symbols are used while the data is handled by Salesforce, the payment gateway, and the customer bank, allowing Salesforce to store the token without storing sensitive customer data.
-
PaymentMethodTokenizationResponse Class
Gateway response sent by payment gateway adapters for the payment method tokenization request. The response includes the payment method’s token ID value.
-
Makes an HTTP request to start the interaction with the payment gateway.
-
PostAuthApiPaymentMethodRequest Class
Sends information about a payment method to a gateway adapter during a postauthorization service call.
-
PostAuthorizationRequest Class
Sends information about a postauthorization request to a gateway adapter during a service call.
-
PostAuthorizationResponse Class
Response sent by the payment gateway adapter for a postauthorization service.
-
ReferencedRefundNotification Class
When a payment gateway sends a notification for a refund transaction, the payment gateway adapter creates the
ReferencedRefundNotificationobject to store information about notification. -
Access information about the referenced refund requests. Extends the
RefundRequestclass. -
ReferencedRefundResponse Class
The payment gateway adapter sends this response for the
ReferencedRefundrequest type. -
Sends data related to a refund to the payment gateway adapter.
-
Defines the type of payment transaction request made to the payment gateway.
-
Specifies the retry category.
-
Specifies the retry decision.
-
SaleApiPaymentMethodRequest Class
Sends data related to a card payment method to a gateway adapter during a sale service call.
-
When a payment gateway sends a notification for a sale payment, the payment gateway adapter creates the
SaleNotificationobject to store information about notification. -
Stores information about a sales request.
-
Response sent by payment gateway adapters for a sales service.
-
Defines the gateway call status values in Salesforce based on the call status values that the payment gateway returned.
-
Stores Salesforce result code information from payment gateway adapters.
-
Specifies the three-letter code that identifies the type of electronic payment transaction being processed within the Automated Clearing House (ACH) network.
-
When a payment gateway sends a notification for a payment method tokenization, the payment gateway adapter creates the
TokenizeNotificationobject to store information about notification.