---
schema_version: "1"
id: 72018bd5c73684e2bc4e47d81b8a097fa0e80a616597c967339eee7b70b7d983
title: PaymentGatewayLog
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_paymentgatewaylog.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_paymentgatewaylog.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 687a9b03cd790c4316e6e22c90f06a8e913a088bf2ba9feb62165d61dd2bb9b3
description: Stores information exchanged between the Salesforce payments platform and external payment gateways. Gateway logs can also record payloads from external payment entities. This object is available in API version 48.0 and later.
---
# PaymentGatewayLog

Stores information exchanged between the Salesforce payments platform and external payment gateways. Gateway logs can also record payloads from external payment entities. This object is available in API version 48.0 and later.

Deleting or archiving a payment gateway log doesn’t impact financial data on other payment entities.

## Supported Calls

create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), undelete(), update(), upsert()

## Special Access Rules

To access Salesforce Payments objects with the API, your org must have one or more of these licenses: Salesforce Payments, Salesforce Order Management, B2B Commerce, or D2C Commerce. Salesforce Payments objects are available only in Lightning Experience.

## Fields

| Field | Details |
| --- | --- |
| CurrencyIsoCode | 
Type

picklist

Properties

Defaulted on create, Filter, Group, Restricted picklist, Sort

Description

Available only for organizations with the multicurrency feature enabled. Contains the ISO code for any currency allowed by the organization.



 |
| GatewayAuthCode | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Authorization approval code from the gateway.



 |
| GatewayAVSCode | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Code sent by gateways that use an address verification system.



 |
| GatewayDate | 

Type

dateTime

Properties

Create, Filter, Nillable, Sort, Update

Description

The date and time that of the gateway communication that leads to the creation of this gateway log.



 |
| GatewayMessage | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Information or error messages sent from the gateway.



 |
| GatewayRefNumber | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Unique transaction ID created by the payment gateway.



 |
| GatewayResultCode | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Gateway-specific result code. Must be mapped to a Salesforce-specific result code.



 |
| GatewayResultCodeDescription | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Description of the gateway’s result code. This field is useful for providing more information around why the gateway returned a certain result code.



 |
| InteractionStatus | 

Type

picklist

Properties

Create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

Describes the result of communication between the payments platform and a payment gateway.

Possible values are:

- Failed
- Initiated
- NoOp
- Success
- Timeout





 |
| InteractionType | 

Type

picklist

Properties

Create, Filter, Group, Nillable, Restricted picklist, Sort

Description

Describes the type of interaction with the gateway. This field is required for logs created in Salesforce.

Possible values are:

- Authorization
- AuthorizationReversal
- Avs
- Capture
- CheckGiftCardBalance
- PostAuth
- ReferencedRefund
- Sale
- Tokenize
- Void





 |
| IsNotification | 

Type

picklist

Properties

Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

For asynchronous transactions, shows whether the gateway log belongs to the notification (yes) or the initial transaction (no).

Possible values are:

- No
- Yes





 |
| LastReferencedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The timestamp for when the current user last viewed a record related to this record.



 |
| LastViewedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The timestamp for when the current user last viewed this record. If this value is null, this record might only have been referenced (LastReferencedDate) and not viewed.



 |
| PaymentGatewayId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The Payments Platform payment gateway record used for communication with the external payment gateway.

This field is a relationship field.

Relationship Name

PaymentGateway

Relationship Type

Lookup

Refers To

PaymentGateway



 |
| PaymentGatewayLogNumber | 

Type

string

Properties

Autonumber, Defaulted on create, Filter, idLookup, Sort

Description

System-generated unique ID for this payment gateway log record.



 |
| ReferencedEntityId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Foreign key with DomainSet of PaymentAuth and Payment.

This field is a polymorphic relationship field.

Relationship Name

ReferencedEntity

Relationship Type

Lookup

Refers To

CardPaymentMethod, Payment, PaymentAuthAdjustment, PaymentAuthorization, Refund



 |
| Request | 

Type

textarea

Properties

Create, Nillable, Update

Description

Raw payload. No sensitive attributes are stored.



 |
| Response | 

Type

textarea

Properties

Create, Nillable, Update

Description

Raw payload.



 |
| RetryCategory | 

Type

picklist

Properties

Create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

The retry category returned by the payment gateway for the failed payment. This field is available in API version 66.0 and later.

Possible values are:

- CardLimit— Insufficient funds, exceeded spending limits, or other restrictions on the card.
- GatewayConnection— Connectivity or communication errors between systems, including upstream gateway errors.
- PaymentInformation— Missing or incorrect data such as incorrect card numbers, addresses, or currencies.
- PaymentProcessing— Payment account is invalid, closed, restricted, or the transaction was declined for reasons other than insufficient funds.
- Security— Security violations or issues such as fraud, risk, authentication, verification, and authorization.
- Unknown— Payment gateway error code isn't recognized or isn't mapped to a specific category.





 |
| SfRefNumber | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

If an IdempotencyKey was passed in the API request, its value is stored here in text format.



 |
| SfResultCode | 

Type

picklist

Properties

Create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

Salesforce-specific result code that can map to one or more gateway result codes. We recommend configuring the payment gateway adapter layer to map gateway result codes to the appropriate Salesforce result code.

Possible values are:

- Decline: The gateway call failed. If the transaction is attempted again, it can still work. For example, the customer has insufficient funds or briefly lost their connection.
- Indeterminate: The gateway didn’t respond to the call. This response usually happens when Salesforce times out while waiting for a response from the gateway.
- PermanentFail: The gateway call failed and can’t work. Gateway calls fail permanently for one of two reasons:
    - Hard Decline: The customer’s payment account has been closed or terminated.
    - Fraud: The gateway recognized the payment or payment method as known fraud.
- RequiresReview: The customer bank requires more information before completing the payment.
- Success: The gateway call succeeded.
- SystemError: Salesforce ended the payment request before receiving a response. For example, Salesforce lost credentials or access to its server. Salesforce ends payment calls if it doesn’t receive a response from the gateway within two minutes.
- ValidationError: Customer payment data was incorrect, such as a misspelling in the credit card address or an incorrect CVV.





 |