---
schema_version: "1"
id: 4b993ce59dafd4a66f88e347a58c406121f59b6d11f86d3e688fc21ce04bfc91
title: PaymentTransaction Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_RichMessaging_PaymentTransaction.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_RichMessaging_PaymentTransaction.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 85475e8fb561aa9f321c2ba56213751d93f354cb56119d7709b0b2e59bbe2e42
description: Represents a payment transaction.The unique identifier of the transaction.The type of the transaction.The status of the transaction.The amount of the transaction.The reference identifier from the payment gateway.The date and time when the transaction occurred.The list of refunds associated with the transaction.
---
# PaymentTransaction Class

Represents a payment transaction.

## Namespace

[RichMessaging](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_RichMessaging.htm "Provides objects and methods for handling content in enhanced Messaging channels.")

- **[PaymentTransaction Properties](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_RichMessaging_PaymentTransaction.htm#apex_RichMessaging_PaymentTransaction_properties)**

## PaymentTransaction Properties

The following are properties for PaymentTransaction.

- **[transactionId](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_RichMessaging_PaymentTransaction.htm#apex_RichMessaging_PaymentTransaction_transactionId)**  
    The unique identifier of the transaction.
- **[transactionType](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_RichMessaging_PaymentTransaction.htm#apex_RichMessaging_PaymentTransaction_transactionType)**  
    The type of the transaction.
- **[status](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_RichMessaging_PaymentTransaction.htm#apex_RichMessaging_PaymentTransaction_status)**  
    The status of the transaction.
- **[amount](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_RichMessaging_PaymentTransaction.htm#apex_RichMessaging_PaymentTransaction_amount)**  
    The amount of the transaction.
- **[gatewayReference](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_RichMessaging_PaymentTransaction.htm#apex_RichMessaging_PaymentTransaction_gatewayReference)**  
    The reference identifier from the payment gateway.
- **[timestamp](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_RichMessaging_PaymentTransaction.htm#apex_RichMessaging_PaymentTransaction_timestamp)**  
    The date and time when the transaction occurred.
- **[refunds](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_RichMessaging_PaymentTransaction.htm#apex_RichMessaging_PaymentTransaction_refunds)**  
    The list of refunds associated with the transaction.

### transactionId

The unique identifier of the transaction.

#### Signature

public String transactionId {get; set;}

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

### transactionType

The type of the transaction.

#### Signature

public RichMessaging.PaymentTransactionType transactionType {get; set;}

#### Property Value

Type: [RichMessaging.PaymentTransactionType](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_enum_RichMessaging_PaymentTransactionType.htm "Represents the type of payment transaction.")

### status

The status of the transaction.

#### Signature

public RichMessaging.PaymentTransactionStatus status {get; set;}

#### Property Value

Type: [RichMessaging.PaymentTransactionStatus](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_enum_RichMessaging_PaymentTransactionStatus.htm "Represents the status of a payment transaction.")

### amount

The amount of the transaction.

#### Signature

public RichMessaging.CurrencyAmount amount {get; set;}

#### Property Value

Type: [RichMessaging.CurrencyAmount](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_RichMessaging_CurrencyAmount.htm#apex_class_RichMessaging_CurrencyAmount "Represents a monetary amount in a specific currency.")

### gatewayReference

The reference identifier from the payment gateway.

#### Signature

public String gatewayReference {get; set;}

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

### timestamp

The date and time when the transaction occurred.

#### Signature

public Datetime timestamp {get; set;}

#### Property Value

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

### refunds

The list of refunds associated with the transaction.

#### Signature

public List<RichMessaging.Refund> refunds {get; set;}

#### Property Value

Type: List<[RichMessaging.Refund](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_RichMessaging_Refund.htm#apex_class_RichMessaging_Refund "Represents a refund for a payment transaction.")\>