> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slm.m1amdocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# The Transaction Object

The `Transaction` object encapsulates information about a financial transaction processed through Subscribe. In addition to standard transaction content, such as customer information (`Account`), payment information (`PaymentMethod`), line items (`TransactionItem`), and amount, this object contains a rich set of attributes that support Subscribe services.

A `Transaction` object might represent a financial transaction conducted through Subscribe for one-time billing or recurring billing, or for a transaction occurring outside of Subscribe but reported to Vindicia for chargeback dispute through ChargeGuard. Note however that it is the `Refund` object, not the `Transaction` object, that encapsulates information on refunds to your customers.

Subscribe processes `Transaction` objects with your payment processor and updates their status during the process. The `Transaction` object includes an array of `TransactionStatus` subobjects that form a log of statuses through the Transaction processing sequence.

When migrating a Transaction to Subscribe, be certain to include the latest or final status information within the `Transaction` object (such as the reason code returned by your payment processor). The status cycle of a `Transaction` object and the reason codes will vary, depending on the payment method and your processor.

**Note:** Use of the forward slash character (/) in identifiers is not allowed. See [Merchant Identifiers](Merchant_Identifiers) for more information.

A `Transaction` object might also represent a potential, rather than a completed, financial transaction. For example, you can score a Transaction and screen it for fraud risk before moving funds through your payment processor. (For more information on risk screening, see Common ChargeGuard Programming Tasks in the Subscribe Programming Guide.) If the scoring result reflects a high fraud probability, you might decide to abandon the Transaction, in which case the corresponding `Transaction` object remains in Subscribe in the `New` status, which means it was never processed.

When Vindicia downloads chargebacks from your payment processor for ChargeGuard, it matches them to your transactions in its database. If you have conducted one of those transactions outside of Vindicia but have not yet migrated it, Subscribe creates a stub `Transaction` object in its database with the `Transaction` information in the chargeback that was downloaded. After you’ve reported that transaction to Subscribe, the object is populated with the remaining information.

The following table lists cases in which a Transaction object should be used.

**Note:** The "Transaction Types" listed in this table are not formal types, but simply general classifications.

| Transaction Type | Description | Initiated By | Transaction API Call |
| - | - | - | - |
| Migrated | Transactions generated by a billing system other than Subscribe, which have been migrated into Subscribe by either the `AutoBill.migrate` or `Transaction.migrate` calls. Once imported, these Transactions will behave as if they were Recurring/Real-time Transactions generated within Subscribe. | You, the merchant | `AutoBill.migrate` `Transaction.migrate` |
| Real-time (one-time) | A one-time purchase by a customer. Subscribe authorizes this transaction with your payment processor in real time in response to your call. Depending on the call, the transaction may be captured with the payment processor later in batch mode. A captured transaction means that monies will be exchanged. This type of transaction goes through status changes until it is eventually captured. | You, the merchant | `Transaction.auth()` `Transaction.capture()` `Transaction.authCapture()` |
| Recurring billing | Periodic transactions generated by Subscribe for an instance of an `AutoBill` object. These are recurring transactions for a customer’s subscription, with the frequency, amount, and other content determined by the `Product` and `BillingPlan` objects in the `AutoBill` object. To create an `AutoBill` instance for a customer’s subscription, either make an API call, or create the instance on the Subscribe Portal. Subscribe captures these transactions in batch mode. The status of the entitlements offered by the corresponding `AutoBill` object depends on whether the transaction is captured successfully. | Subscribe | None. An active `AutoBill` object must exist. |
| Reported | A transaction conducted outside of Subscribe, and reported to Vindicia for chargeback dispute. Subscribe does not process this transaction with a payment processor, nor does the transaction go through changes in status. | You, the merchant | `Transaction.report()` `Transaction.score()` |
| Stub | A transaction with minimal data. If you are a ChargeGuard customer, Vindicia downloads your chargebacks from your payment processor and matches them to their corresponding Transactions in the Vindicia database to capture all information available for chargeback disputes. If the original transaction is not in the database (was conducted outside of Subscribe but not yet migrated), Subscribe creates a stub `Transaction` object that contains the minimal data obtained from the chargeback, and stores the object in the database. Once you have migrated the transaction, Subscribe will enter the missing details. | Indirectly by you, the merchant | None. |
| Validation | A transaction to validate a payment method. When you make an API call or perform a task on the Subscribe Portal to validate a payment method, Subscribe generates a Transaction that uses that payment method for an amount of one currency unit (US\$1 if the payment method specifies USD as the currency), and authorizes it with your payment processor. If the Transaction is authorized, the payment method is considered valid, and the transaction status becomes `AuthorizedForValidation`; if not, the status is `Cancelled`. Not all payment methods may be validated this way. (See [The PaymentMethod Object](The_PaymentMethod_Object) for details.) Because Subscribe only `authorizes` such a transaction with your processor but never `captures` it, the customer is not charged for the transaction. | Subscribe | None. |
| When creating and processing a `Transaction` object through Subscribe, reporting it to Vindicia for ChargeGuard, or scoring it for risk screening, be sure to include all related information. The more detail you provide, the more effective Vindicia will be in disputing chargebacks on your behalf should they occur. | | | |

* **[Transaction Data Members](../topics/Transaction_Data_Members)**

* **[Transaction Subobjects](../topics/Transaction_Subobjects)**

* **[Transaction Methods](../topics/Transaction_Methods)**


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.