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

# Payment intent object

Here is a  table describing the structure of the `PaymentIntent` class and its related objects:

#### PaymentIntent

| **Field Name**             | **Data Type**                | **Description**                                                                                                 |
| -------------------------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------- |
| `paymentIntentId`          | `long`                       | Unique ID of the payment intent.                                                                                |
| `callbackUrl`              | `String`                     | URL to send callback responses.                                                                                 |
| `returnUrl`                | `String`                     | URL to redirect users after completing the payment.                                                             |
| `uniqueId`                 | `String`                     | Unique identifier for the payment session.                                                                      |
| `paymentLinkUniqueId`      | `String`                     | Unique ID for payment link.                                                                                     |
| `uuid`                     | `String`                     | Universally unique identifier (UUID).                                                                           |
| `test`                     | `boolean`                    | Specifies if the payment is in test mode.                                                                       |
| `commissionPaidByCustomer` | `boolean`                    | Indicates if the commission is paid by the customer.                                                            |
| `creationDate`             | `Timestamp`                  | Timestamp of when the payment intent was created.                                                               |
| `lastUpdateDate`           | `Timestamp`                  | Timestamp of the last update made to the payment intent.                                                        |
| `expireDate`               | `Timestamp`                  | Timestamp when the payment intent expires.                                                                      |
| `totalAmount`              | `Long`                       | Total payment amount in cents.                                                                                  |
| `currency`                 | `Currency (Enum)`            | The currency of the payment (USD or ETB).                                                                       |
| `checkoutBeneficiaries`    | `List<CheckoutSplitPayment>` | List of split payment beneficiaries.  See [`CheckoutSplitPayment`](#checkoutsplitpayment) object below.         |
| `productItems`             | `List<ProductItems>`         | List of product items associated with the payment intent.  See [`ProductItems`](#productitems) object below.    |
| `transaction`              | `Transaction`                | Transaction associated with the payment intent. See [`Transaction`](#transaction) object below.                 |
| `merchantCustomer`         | `MerchantCustomer`           | The merchant's customer details. See [`MerchantCustomer`](#merchantcustomer) object below.                      |
| `paymentMethodTypes`       | `Set<String>`                | Set of payment methods used in the checkout session. eg: `TELE_BIRR_USSD`, `ETS_SWITCH`, `CBE` or `M_PESA` etc. |

### Related Objects

#### CheckoutSplitPayment

| **Field Name**  | **Data Type**      | **Description**                             |
| --------------- | ------------------ | ------------------------------------------- |
| `id`            | `long`             | Unique ID for the split payment.            |
| `accountNumber` | `String`           | Account number for the split payment.       |
| `amount`        | `Long`             | Amount for the split payment.               |
| `splitType`     | `SplitType (Enum)` | The type of split `PERCENTAGE` and `NUMBER` |

#### ProductItems

| **Field Name**   | **Data Type**        | **Description**                                                                    |
| ---------------- | -------------------- | ---------------------------------------------------------------------------------- |
| `id`             | `long`               | Unique ID for the product item.                                                    |
| `name`           | `String`             | Name of the product item.                                                          |
| `image`          | `String`             | URL or reference to the product image.                                             |
| `quantity`       | `int`                | Quantity of the product purchased.                                                 |
| `description`    | `String`             | Description of the product item.                                                   |
| `productId`      | `String`             | Unique product identifier.                                                         |
| `price`          | `Long`               | Price of the product in cents.                                                     |
| `type`           | `ProductType (Enum)` | The type/category of the product. `SERVICE`,`DIGITAL_PRODUCT` & `PHYSICAL_PRODUCT` |
| `paymentIntent`  | `CheckoutSession`    | Reference to the payment intent session.                                           |
| `creationDate`   | `Timestamp`          | Creation date of the product item record.                                          |
| `lastUpdateDate` | `Timestamp`          | Last update date of the product item record.                                       |

#### Transaction

| **Field Name**          | **Data Type**           | **Description**                                                                                               |
| ----------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------- |
| `id`                    | `long`                  | Unique ID for the transaction.                                                                                |
| `message`               | `String`                | Message or note for the transaction.                                                                          |
| `debitAccount`          | `String`                | The debit account for the transaction.                                                                        |
| `phoneNumber`           | `String`                | Phone number related to the transaction.                                                                      |
| `trac2`                 | `String`                | Trace information related to the transaction.                                                                 |
| `test`                  | `boolean`               | Indicates if the transaction is in test mode.                                                                 |
| `referenceId`           | `String`                | Reference ID for the transaction.                                                                             |
| **`transactionStatus`** | **`TransactionStatus`** | **Status of the transaction. `PROCESSING`, `FAILED`, `SUCCESS`, `EXPIRED`**                                   |
| `paymentType`           | `PaymentMethodType`     | Payment method type for the transaction.                                                                      |
| `merchantNet`           | `long`                  | Merchant's net amount.                                                                                        |
| `adminNet`              | `long`                  | Admin's net amount.                                                                                           |
| `totalAmount`           | `long`                  | Total amount of the transaction in cents.                                                                     |
| `pspTxId`               | `String`                | Transaction ID from the payment service provider.                                                             |
| `virtualAccountId`      | `Long`                  | ID of the virtual account used in the transaction.                                                            |
| `virtualCardId`         | `Long`                  | ID of the virtual card used in the transaction.                                                               |
| `creationDate`          | `Timestamp`             | Creation date of the transaction record.                                                                      |
| `lastUpdateDate`        | `Timestamp`             | Last update date of the transaction record.                                                                   |
| `merchantCustomer`      | `MerchantCustomer`      | The merchant's customer related to the transaction. See [`MerchantCustomer`](#MerchantCustomer) object below. |

#### MerchantCustomer

| **Field Name** | **Data Type** | **Description**                        |
| -------------- | ------------- | -------------------------------------- |
| `id`           | `Long`        | Unique ID for the merchant customer.   |
| `name`         | `String`      | Name of the merchant customer.         |
| `email`        | `String`      | Email of the merchant customer.        |
| `phone`        | `String`      | Phone number of the merchant customer. |
