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

# Get Invoice Details

> Retrieve detailed information about a specific invoice, including all payment attempts, full payment method details, and processor responses.

## What is Get Invoice Details?

The **Get Invoice Details** endpoint returns complete information about a specific invoice, including:

* All payment attempts (every try, not just the latest)
* Full payment method information
* Invoice line items
* Processor responses and transaction IDs
* Customer information (if linked)

**When to use it:**

* Customer support: Looking up a specific invoice
* Debugging: Understanding why a payment failed
* Reconciliation: Getting all transaction details
* Reporting: Detailed invoice information for accounting
* After getting invoice list: Get details for specific invoices

> **Tip**: Use [Get Invoices](/docs/core-concepts/invoice/get-invoices-api) to get a list, then use this endpoint to get details for specific invoices.

## API Endpoint

```
GET {{Api Root}}/api/Invoices/{invoiceId}
```

Replace:

* `{{Api Root}}` with `api.revolv3.com` (production) or `api-sandbox.revolv3.com` (sandbox)
* `{invoiceId}` with the actual invoice ID (e.g., `302756`)

### Example Request

```bash theme={null}
GET {{Api Root}}/api/Invoices/302756
```

## Understanding Invoice Attempts

An **invoice attempt** is each time Revolv3 tries to process the payment. An invoice can have multiple attempts if:

* The first attempt failed and Revolv3 retried
* The payment was recycled (for subscriptions)

**To find the latest attempt**: Check the `invoiceAttemptDate` in the `invoiceAttempts` array—the most recent date is the latest attempt.

## Sample Response

<CodeGroup>
  ```json theme={null}
  {
    "InvoiceId": 302756,
    "ParentInvoiceId": null,
    "CustomerId": null,
    "MerchantInvoiceRefId": "ABC309500654810",
    "PaymentMethod": {
      "PaymentMethodId": 6469,
      "BillingAddressId": 7551,
      "BillingFirstName": "Joe",
      "BillingLastName": "Smith",
      "MerchantPaymentMethodRefId": null,
      "BillingAddress": {
        "AddressId": 7551,
        "AddressLine1": "381 Forest Ave. Suite C",
        "AddressLine2": null,
        "City": "Laguna Beach",
        "State": "CA",
        "PostalCode": "92651",
        "PhoneNumber": null,
        "Email": null,
        "Country": "US"
      },
      "PaymentMethodAchDetails": null,
      "PaymentMethodCreditCardDetails": {
        "BinNumber": "444433",
        "PaymentLast4Digit": "1111",
        "PaymentExpirationDate": "0330"
      }
    },
    "InvoiceStatus": "Paid",
    "Subtotal": 1.03,
    "Tax": 0.0,
    "Total": 1.03,
    "BillingDate": "9/17/2024",
    "MerchantLegalName": "Revolv3",
    "MerchantCustomerRefId": null,
    "CustomerFirstName": null,
    "CustomerLastName": null,
    "SubscriptionId": null,
    "InstallmentId": null,
    "EligibilityFailReason": null,
    "MerchantSubscriptionRefId": null,
    "NetworkTransactionId": "197066166170419",
    "InvoiceLineItems": [],
    "InvoiceAttempts": [
      {
        "InvoiceAttemptId": 139859,
        "Amount": 1.03,
        "InvoiceAttemptStatus": "Success",
        "InvoiceAttemptDate": "2024-09-17T18:40:38.107",
        "PaymentProcessor": "WorldPay",
        "ProcessorTransactionId": "83995072261509527",
        "ResponseCode": "000",
        "ResponseMessage": "Approved",
        "PaymentMethod": {
          "PaymentMethodId": 6469,
          "BillingAddressId": 7551,
          "BillingAddress": {
            "AddressId": 7551,
            "AddressLine1": "381 Forest Ave. Suite C",
            "AddressLine2": null,
            "City": "Laguna Beach",
            "State": "CA",
            "PostalCode": "92651",
            "PhoneNumber": null,
            "Email": null,
            "Country": "US"
          },
          "BillingFirstName": "Joe",
          "BillingLastName": "Smith",
          "MerchantPaymentMethodRefId": null,
          "PaymentMethodAchDetails": null,
          "PaymentMethodCreditCardDetails": {
            "BinNumber": "444433",
            "PaymentLast4Digit": "1111",
            "PaymentExpirationDate": "0330"
          }
        },
        "EligibilityCheckOrderCode": null
      }
    ]
  }
  ```
</CodeGroup>

## Understanding the Response

### Invoice-Level Fields

| Field                  | Description                                                        |
| ---------------------- | ------------------------------------------------------------------ |
| `invoiceId`            | Revolv3's unique identifier for this invoice                       |
| `parentInvoiceId`      | If this is a refund, links to the original invoice                 |
| `customerId`           | Customer ID if linked to a customer record                         |
| `merchantInvoiceRefId` | Your internal invoice/order reference ID                           |
| `invoiceStatus`        | Current invoice status (`Paid`, `Pending`, `Noncollectable`, etc.) |
| `subtotal`             | Invoice amount before tax                                          |
| `tax`                  | Tax amount                                                         |
| `total`                | Total invoice amount                                               |
| `billingDate`          | Date the invoice was billed                                        |
| `networkTransactionId` | Transaction ID from the card network (important for disputes)      |
| `subscriptionId`       | Subscription ID if this invoice is from a subscription             |
| `installmentId`        | Installment ID if this is part of an installment plan              |

### Invoice Attempts Array

The `invoiceAttempts` array contains all payment attempts for this invoice. Each attempt includes:

| Field                    | Description                                                  |
| ------------------------ | ------------------------------------------------------------ |
| `invoiceAttemptId`       | Unique ID for this specific attempt                          |
| `amount`                 | Amount attempted in this try                                 |
| `invoiceAttemptStatus`   | Result: `Success`, `Fail`, `Pending`, etc.                   |
| `invoiceAttemptDate`     | When this attempt was made (use this to find the latest)     |
| `paymentProcessor`       | Which processor handled this attempt (WorldPay, Adyen, etc.) |
| `processorTransactionId` | Transaction ID from the processor                            |
| `responseCode`           | Processor's response code (e.g., "000" = approved)           |
| `responseMessage`        | Processor's response message (e.g., "Approved", "Declined")  |
| `paymentMethod`          | Payment method used for this attempt                         |

### Finding the Latest Attempt

To find the most recent payment attempt:

1. Look at the `invoiceAttempts` array
2. Find the attempt with the latest `invoiceAttemptDate`
3. Check its `invoiceAttemptStatus` to see if it succeeded or failed

**Example**: If you have 3 attempts with dates:

* 2024-09-17T18:40:38 (Success) ← Latest
* 2024-09-17T18:40:35 (Fail)
* 2024-09-17T18:40:30 (Fail)

The latest attempt succeeded.

## Real-World Use Cases

### Use Case 1: Customer Support

**Scenario**: Customer says "I was charged twice"

**Solution**:

1. Look up invoice by `merchantInvoiceRefId` (their order number)
2. Check `invoiceAttempts` array
3. See if there are multiple successful attempts
4. If yes, one might be a duplicate—process a refund

### Use Case 2: Debugging Failed Payment

**Scenario**: Payment failed, need to know why

**Solution**:

1. Get invoice details
2. Look at the latest attempt in `invoiceAttempts`
3. Check `invoiceAttemptStatus` (probably "Fail")
4. Check `responseMessage` for the reason (e.g., "Insufficient Funds")
5. Use this information to help the customer

### Use Case 3: Reconciliation

**Scenario**: Matching Revolv3 invoices with bank deposits

**Solution**:

1. Get invoice details
2. Use `networkTransactionId` to match with bank statements
3. Use `processorTransactionId` for processor-specific reconciliation
4. Verify amounts match (`total` field)

### Use Case 4: Subscription Payment History

**Scenario**: Customer wants to see all their subscription payments

**Solution**:

1. Get invoices filtered by `subscriptionId`
2. For each invoice, get details to show full payment history
3. Display all attempts so customer can see retries

## Best Practices

1. **Store invoice IDs**: When you create an invoice, save the `invoiceId` for later lookups
2. **Check latest attempt**: Always look at the most recent attempt for current status
3. **Store transaction IDs**: Save `networkTransactionId` and `processorTransactionId` for reconciliation
4. **Handle multiple attempts**: Your code should handle invoices with multiple attempts
5. **Use for debugging**: This endpoint is great for troubleshooting payment issues

## Common Questions

**Q: How do I know which attempt is the latest?** A: Sort the `invoiceAttempts` array by `invoiceAttemptDate` (most recent first). The first one is the latest.

**Q: Can an invoice have multiple successful attempts?** A: Typically no—once an invoice is paid, further attempts usually don't happen.

**Q: What if there are no attempts?** A: The invoice might be pending or the payment hasn't been processed yet. Check the `invoiceStatus`.

**Q: How do I get processor-specific details?** A: Check the `processorTransactionId` and `responseCode`/`responseMessage` in the attempt. For raw processor responses, see [Processor Raw Response](/docs/core-concepts/invoice/processor-raw-response).

## Next Steps

* [**Get Invoices API**](/docs/core-concepts/invoice/get-invoices-api) — Get a list of invoices
* [**Invoice Status**](/docs/core-concepts/invoice/invoice-status) — Understand invoice statuses
* [**Processor Raw Response**](/docs/core-concepts/invoice/processor-raw-response) — Get full processor response details

***
