Transaction Information

August 21, 2026 · View on GitHub

The transaction information.

Structure

TransactionInformation

Fields

NameTypeTagsDescriptionGetterSetter
PaypalAccountIdStringOptionalThe ID of the PayPal account of the counterparty.

Constraints: Minimum Length: 1, Maximum Length: 24, Pattern: ^[a-zA-Z0-9]*$
String getPaypalAccountId()setPaypalAccountId(String paypalAccountId)
TransactionIdStringOptional, Read-onlyThe PayPal-generated transaction ID.

Constraints: Minimum Length: 1, Maximum Length: 24, Pattern: ^[a-zA-Z0-9]*$
String getTransactionId()setTransactionId(String transactionId)
PaypalReferenceIdStringOptionalThe PayPal-generated base ID. PayPal exclusive. Cannot be altered. Defined as a related, pre-existing transaction or event.

Constraints: Minimum Length: 1, Maximum Length: 24, Pattern: ^[a-zA-Z0-9]*$
String getPaypalReferenceId()setPaypalReferenceId(String paypalReferenceId)
PaypalReferenceIdTypePaypalReferenceIdTypeOptionalThe PayPal reference ID type.

Constraints: Minimum Length: 3, Maximum Length: 3, Pattern: ^[a-zA-Z0-9]*$
PaypalReferenceIdType getPaypalReferenceIdType()setPaypalReferenceIdType(PaypalReferenceIdType paypalReferenceIdType)
TransactionEventCodeStringOptionalA five-digit transaction event code that classifies the transaction type based on money movement and debit or credit. For example, T0001. See Transaction event codes.

Constraints: Minimum Length: 1, Maximum Length: 5, Pattern: ^[a-zA-Z0-9]*$
String getTransactionEventCode()setTransactionEventCode(String transactionEventCode)
TransactionInitiationDateStringOptionalThe date and time, in Internet date and time format. Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.

Constraints: Minimum Length: 20, Maximum Length: 64, Pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$
String getTransactionInitiationDate()setTransactionInitiationDate(String transactionInitiationDate)
TransactionUpdatedDateStringOptionalThe date and time, in Internet date and time format. Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.

Constraints: Minimum Length: 20, Maximum Length: 64, Pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$
String getTransactionUpdatedDate()setTransactionUpdatedDate(String transactionUpdatedDate)
TransactionAmountMoneyOptionalThe currency and amount for a financial transaction, such as a balance or payment due.Money getTransactionAmount()setTransactionAmount(Money transactionAmount)
FeeAmountMoneyOptionalThe currency and amount for a financial transaction, such as a balance or payment due.Money getFeeAmount()setFeeAmount(Money feeAmount)
DiscountAmountMoneyOptionalThe currency and amount for a financial transaction, such as a balance or payment due.Money getDiscountAmount()setDiscountAmount(Money discountAmount)
InsuranceAmountMoneyOptionalThe currency and amount for a financial transaction, such as a balance or payment due.Money getInsuranceAmount()setInsuranceAmount(Money insuranceAmount)
SalesTaxAmountMoneyOptionalThe currency and amount for a financial transaction, such as a balance or payment due.Money getSalesTaxAmount()setSalesTaxAmount(Money salesTaxAmount)
ShippingAmountMoneyOptionalThe currency and amount for a financial transaction, such as a balance or payment due.Money getShippingAmount()setShippingAmount(Money shippingAmount)
ShippingDiscountAmountMoneyOptionalThe currency and amount for a financial transaction, such as a balance or payment due.Money getShippingDiscountAmount()setShippingDiscountAmount(Money shippingDiscountAmount)
ShippingTaxAmountMoneyOptionalThe currency and amount for a financial transaction, such as a balance or payment due.Money getShippingTaxAmount()setShippingTaxAmount(Money shippingTaxAmount)
OtherAmountMoneyOptionalThe currency and amount for a financial transaction, such as a balance or payment due.Money getOtherAmount()setOtherAmount(Money otherAmount)
TipAmountMoneyOptionalThe currency and amount for a financial transaction, such as a balance or payment due.Money getTipAmount()setTipAmount(Money tipAmount)
TransactionStatusStringOptionalA code that indicates the transaction status. Value is: Status code Description D PayPal or merchant rules denied the transaction. P The transaction is pending. The transaction was created but waits for another payment process to complete, such as an ACH transaction, before the status changes to S. S The transaction successfully completed without a denial and after any pending statuses. V A successful transaction was fully reversed and funds were refunded to the original sender.

Constraints: Minimum Length: 1, Maximum Length: 1, Pattern: ^[a-zA-Z0-9]*$
String getTransactionStatus()setTransactionStatus(String transactionStatus)
TransactionSubjectStringOptionalThe subject of payment. The payer passes this value to the payee. The payer controls this data through the interface through which he or she sends the data.

Constraints: Minimum Length: 1, Maximum Length: 256, Pattern: ^[a-zA-Z0-9_'\-., ":;\!?]*$
String getTransactionSubject()setTransactionSubject(String transactionSubject)
TransactionNoteStringOptionalA special note that the payer passes to the payee. Might contain special customer requests, such as shipping instructions.

Constraints: Minimum Length: 1, Maximum Length: 4000, Pattern: ^[a-zA-Z0-9_'\-., ":;\!?]*$
String getTransactionNote()setTransactionNote(String transactionNote)
PaymentTrackingIdStringOptionalThe payment tracking ID, which is a unique ID that partners specify to either get information about a payment or request a refund.

Constraints: Minimum Length: 1, Maximum Length: 127, Pattern: ^[a-zA-Z0-9]*$
String getPaymentTrackingId()setPaymentTrackingId(String paymentTrackingId)
BankReferenceIdStringOptionalThe bank reference ID. The bank provides this value for an ACH transaction.

Constraints: Minimum Length: 1, Maximum Length: 127, Pattern: ^[a-zA-Z0-9]*$
String getBankReferenceId()setBankReferenceId(String bankReferenceId)
EndingBalanceMoneyOptionalThe currency and amount for a financial transaction, such as a balance or payment due.Money getEndingBalance()setEndingBalance(Money endingBalance)
AvailableBalanceMoneyOptionalThe currency and amount for a financial transaction, such as a balance or payment due.Money getAvailableBalance()setAvailableBalance(Money availableBalance)
InvoiceIdStringOptionalThe invoice ID that is sent by the merchant with the transaction. Note: If an invoice ID was sent with the capture request, the value is reported. Otherwise, the invoice ID of the authorizing transaction is reported.

Constraints: Minimum Length: 1, Maximum Length: 127, Pattern: ^[a-zA-Z0-9_'\-., ":;\!?]*$
String getInvoiceId()setInvoiceId(String invoiceId)
CustomFieldStringOptionalThe merchant-provided custom text. Note: Usually, this field includes the unique ID for payments made with MassPay type transaction.

Constraints: Minimum Length: 1, Maximum Length: 127, Pattern: ^[a-zA-Z0-9_'\-., ":;\!?]*$
String getCustomField()setCustomField(String customField)
ProtectionEligibilityStringOptionalIndicates whether the transaction is eligible for protection. Value is: 01. Eligible. 02. Not eligible 03. Partially eligible.

Constraints: Minimum Length: 1, Maximum Length: 2, Pattern: ^[a-zA-Z0-9]*$
String getProtectionEligibility()setProtectionEligibility(String protectionEligibility)
CreditTermStringOptionalThe credit term. The time span covered by the installment payments as expressed in the term length plus the length time unit code.

Constraints: Minimum Length: 1, Maximum Length: 25, Pattern: ^[a-zA-Z0-9.]*$
String getCreditTerm()setCreditTerm(String creditTerm)
CreditTransactionalFeeMoneyOptionalThe currency and amount for a financial transaction, such as a balance or payment due.Money getCreditTransactionalFee()setCreditTransactionalFee(Money creditTransactionalFee)
CreditPromotionalFeeMoneyOptionalThe currency and amount for a financial transaction, such as a balance or payment due.Money getCreditPromotionalFee()setCreditPromotionalFee(Money creditPromotionalFee)
AnnualPercentageRateStringOptionalThe percentage, as a fixed-point, signed decimal number. For example, define a 19.99% interest rate as 19.99.

Constraints: Pattern: ^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$
String getAnnualPercentageRate()setAnnualPercentageRate(String annualPercentageRate)
PaymentMethodTypeStringOptionalThe payment method that was used for a transaction. Value is PUI, installment, or mEFT. Note: Appears only for pay upon invoice (PUI), installment, and mEFT transactions. Merchants and partners in the EMEA region can use this attribute to note transactions that attract turn-over tax.

Constraints: Minimum Length: 1, Maximum Length: 20, Pattern: ^[a-zA-Z0-9-]*$
String getPaymentMethodType()setPaymentMethodType(String paymentMethodType)
InstrumentTypeStringOptionalA high-level classification of the type of financial instrument that was used to fund a payment. The pattern is not provided because the value is defined by an external party. E.g. PAYPAL, CREDIT_CARD, DEBIT_CARD, APPLE_PAY, BANK , VENMO ,Pay Upon Invoice, Pay Later or Alternative Payment Methods (APM).

Constraints: Minimum Length: 1, Maximum Length: 64
String getInstrumentType()setInstrumentType(String instrumentType)
InstrumentSubTypeStringOptionalA finer-grained classification of the financial instrument that was used to fund a payment. For example, Visa card or a Mastercard for a credit card, BANKCARD ,DISCOVER etc. The pattern is not provided because the value is defined by an external party.

Constraints: Minimum Length: 1, Maximum Length: 64
String getInstrumentSubType()setInstrumentSubType(String instrumentSubType)

Example

import com.paypal.sdk.models.PaypalReferenceIdType;
import com.paypal.sdk.models.TransactionInformation;

TransactionInformation transactionInformation = new TransactionInformation.Builder()
    .paypalAccountId("paypal_account_id0")
    .paypalReferenceId("paypal_reference_id8")
    .paypalReferenceIdType(PaypalReferenceIdType.ODR)
    .transactionEventCode("transaction_event_code2")
    .build();