# GET /invoices/transactions/{{invoice_id}} — List All Transactions By Invoice Id

> Product: **Pabbly Subscription Billing** (v1)
> Base URL: `https://payments.pabbly.com/api/v1`
> Auth: Basic via `Authorization` header
> Canonical: `/subscription-billing/invoice/list-all-transactions-by-invoice-id`

This API is used to retrieve a list of all the available transactions by invoice id.

**Path parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| invoice_id | string | Yes |  |

**Query parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| limit | string | No | Integer, default=10, min=1, max=100 The number of resources to be returned. |
| page | string | No | By default first page will be listed. For navigating through pages, use the page parameter. |

**Response (200)** — List All Transactions By Invoice Id:

```json
{
    "status": "success",
    "message": [
        {
            "subscription_id": "625eb5ea381ff268cf3ab836",
            "plan_id": "622839b7afb3423000003b03",
            "product_id": "61a21b098c4b5732e5a3437d",
            "type_formated": "Payment",
            "status_formatted": "Success",
            "reference_id": "INV-2895",
            "transaction": {
                "id": "pi_3KqGtrSIZ63mHgAe0QCYmb84",
                "object": "payment_intent",
                "amount": 11000,
                "amount_capturable": 0,
                "amount_details": {
                    "tip": {
                        "amount": null
                    }
                },
                "amount_received": 11000,
                "application": null,
                "application_fee_amount": null,
                "automatic_payment_methods": null,
                "canceled_at": null,
                "cancellation_reason": null,
                "capture_method": "automatic",
                "charges": {
                    "object": "list",
                    "data": [
                        {
                            "id": "ch_3KqGtrSIZ63mHgAe0HNC6ycR",
                            "object": "charge",
                            "amount": 11000,
                            "amount_captured": 11000,
                            "amount_refunded": 0,
                            "application": null,
                            "application_fee": null,
                            "application_fee_amount": null,
                            "balance_transaction": "txn_3KqGtrSIZ63mHgAe0In8mRik",
                            "billing_details": {
                                "address": {
                                    "city": null,
                                    "country": "IN",
                                    "line1": null,
                                    "line2": null,
                                    "postal_code": null,
                                    "state": null
                                },
                                "email": null,
                                "name": null,
                                "phone": null
                            },
                            "calculated_statement_descriptor": "MALSON",
                            "captured": true,
                            "created": 1650374139,
                            "currency": "usd",
                            "customer": "cus_LXLbLfDt5JKjow",
                            "description": "Charge for Pabbly -  - Testing - Test",
                            "destination": null,
                            "dispute": null,
                            "disputed": false,
                            "failure_balance_transaction": null,
                            "failure_code": null,
                            "failure_message": null,
                            "fraud_details": {},
                            "invoice": null,
                            "livemode": false,
                            "metadata": {
                                "subscription_id": "625eb5ea381ff268cf3ab836",
                                "method_id": "625eb5ea381ff268cf3ab839",
                                "invoice_id": "625eb5ea381ff268cf3ab837"
                            },
                            "on_behalf_of": null,
                            "order": null,
                            "outcome": {
                                "network_status": "approved_by_network",
                                "reason": null,
                                "risk_level": "normal",
                                "risk_score": 24,
                                "seller_message": "Payment complete.",
                                "type": "authorized"
                            },
                            "paid": true,
                            "payment_intent": "pi_3KqGtrSIZ63mHgAe0QCYmb84",
                            "payment_method": "pm_1KqGu6SIZ63mHgAeHmNwXXSN",
                            "payment_method_details": {
                                "card": {
                                    "brand": "visa",
                                    "checks": {
                                        "address_line1_check": null,
                                        "address_postal_code_check": null,
                                        "cvc_check": "pass"
                                    },
                                    "country": "US",
                                    "exp_month": 12,
                                    "exp_year": 2034,
                                    "fingerprint": "H88VFvnfEZrW9UY2",
                                    "funding": "credit",
                                    "installments": null,
                                    "last4": "1111",
                                    "mandate": null,
                                    "network": "visa",
                                    "three_d_secure": null,
                                    "wallet": null
                                },
                                "type": "card"
                            },
                            "receipt_email": null,
                            "receipt_number": null,
                            "receipt_url": "https://pay.stripe.com/receipts/acct_1JFCQkSIZ63mHgAe/ch_3KqGtrSIZ63mHgAe0HNC6ycR/rcpt_LXLbvhizIrczyudlzdoHmNJ4KvZsClB",
                            "refunded": false,
                            "refunds": {
                                "object": "list",
                                "data": [],
                                "has_more": false,
                                "total_count": 0,
                                "url": "/v1/charges/ch_3KqGtrSIZ63mHgAe0HNC6ycR/refunds"
                            },
                            "review": null,
                            "shipping": {
                                "address": {
                                    "city": "city",
                                    "country": "AT",
                                    "line1": "street",
                                    "line2": null,
                                    "postal_code": "1234",
                                    "state": "6"
                                },
                                "carrier": null,
                                "name": "test ing",
                                "phone": null,
                                "tracking_number": null
                            },
                            "source": null,
                            "source_transfer": null,
                            "statement_descriptor": null,
                            "statement_descriptor_suffix": null,
                            "status": "succeeded",
                            "transfer_data": null,
                            "transfer_group": null
                        }
                    ],
                    "has_more": false,
                    "total_count": 1,
                    "url": "/v1/charges?payment_intent=pi_3KqGtrSIZ63mHgAe0QCYmb84"
                },
                "client_secret": "pi_3KqGtrSIZ63mHgAe0QCYmb84_secret_BkqmUjOCJ0darG9ZrTkigYXVY",
                "confirmation_method": "automatic",
                "created": 1650374123,
                "currency": "usd",
                "customer": "cus_LXLbLfDt5JKjow",
                "description": "Charge for Pabbly -  - Testing - Test",
                "invoice": null,
                "last_payment_error": null,
                "livemode": false,
                "metadata": {
                    "subscription_id": "625eb5ea381ff268cf3ab836",
                    "method_id": "625eb5ea381ff268cf3ab839",
                    "invoice_id": "625eb5ea381ff268cf3ab837"
                },
                "next_action": null,
                "on_behalf_of": null,
                "payment_method": "pm_1KqGu6SIZ63mHgAeHmNwXXSN",
                "payment_method_options": {
                    "card": {
                        "installments": null,
                        "mandate_options": null,
                        "network": null,
                        "request_three_d_secure": "automatic"
                    }
                },
                "payment_method_types": [
                    "card"
                ],
                "processing": null,
                "receipt_email": null,
                "review": null,
                "setup_future_usage": "off_session",
                "shipping": {
                    "address": {
                        "city": "city",
                        "country": "AT",
                        "line1": "street",
                        "line2": null,
                        "postal_code": "1234",
                        "state": "6"
                    },
                    "carrier": null,
                    "name": "test ing",
                    "phone": null,
                    "tracking_number": null
                },
                "statement_descriptor": null,
                "statement_descriptor_suffix": null,
                "status": "succeeded",
                "transfer_data": null,
                "transfer_group": null
            },
            "gateway_type": "stripe",
            "createdAt": "2022-04-19T13:15:23.515Z",
            "updatedAt": "2022-04-19T13:15:43.211Z",
            "id": "625eb5eb381ff268cf3ab83a",
            "customer_id": "625eb5ea381ff268cf3ab834",
            "invoice_id": "625eb5ea381ff268cf3ab837",
            "type": "payment",
            "status": "success",
            "amount": 110,
            "description": "Payment success"
        }
    ]
}
```

**Code examples:**

_cURL_

```curl
curl https://payments.pabbly.com/api/v1/invoices/transactions/{{invoice_id}}?limit={{limit}}&page={{page}} \
  -u {{YOUR_API_KEY}}:{{YOUR_SECRET_KEY}}
```

_Ruby_

```ruby
require 'net/http'
require 'json'

uri = URI('https://payments.pabbly.com/api/v1/invoices/transactions/{{invoice_id}}?limit={{limit}}&page={{page}}')
request = Net::HTTP::Get.new(uri)
request.basic_auth '{{YOUR_API_KEY}}', '{{YOUR_SECRET_KEY}}'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(request)
end

data = JSON.parse(response.body)
```

_Python_

```python
import requests
from requests.auth import HTTPBasicAuth

response = requests.get(
    'https://payments.pabbly.com/api/v1/invoices/transactions/{{invoice_id}}?limit={{limit}}&page={{page}}',
    auth=HTTPBasicAuth('{{YOUR_API_KEY}}', '{{YOUR_SECRET_KEY}}'),
)

data = response.json()
```

_PHP_

```php
<?php
$ch = curl_init('https://payments.pabbly.com/api/v1/invoices/transactions/{{invoice_id}}?limit={{limit}}&page={{page}}');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERPWD, '{{YOUR_API_KEY}}:{{YOUR_SECRET_KEY}}');

$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
```

_Java_

```java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.Base64;

String credentials = Base64.getEncoder().encodeToString("{{YOUR_API_KEY}}:{{YOUR_SECRET_KEY}}".getBytes());

HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder()
    .uri(URI.create("https://payments.pabbly.com/api/v1/invoices/transactions/{{invoice_id}}?limit={{limit}}&page={{page}}"))
    .header("Authorization", "Basic " + credentials)
    .GET();

HttpRequest request = builder.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

_Node.js_

```node
const credentials = Buffer.from('{{YOUR_API_KEY}}:{{YOUR_SECRET_KEY}}').toString('base64');

const response = await fetch('https://payments.pabbly.com/api/v1/invoices/transactions/{{invoice_id}}?limit={{limit}}&page={{page}}', {
  method: 'GET',
  headers: {
    'Authorization': `Basic ${credentials}`,
  },
});

const data = await response.json();
```

_Go_

```go
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("GET", "https://payments.pabbly.com/api/v1/invoices/transactions/{{invoice_id}}?limit={{limit}}&page={{page}}", nil)
    req.SetBasicAuth("{{YOUR_API_KEY}}", "{{YOUR_SECRET_KEY}}")

    res, _ := http.DefaultClient.Do(req)
    defer res.Body.Close()
    body, _ := io.ReadAll(res.Body)
    fmt.Println(string(body))
}
```

_.NET_

```dotnet
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;

var credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes("{{YOUR_API_KEY}}:{{YOUR_SECRET_KEY}}"));

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://payments.pabbly.com/api/v1/invoices/transactions/{{invoice_id}}?limit={{limit}}&page={{page}}");
request.Headers.TryAddWithoutValidation("Authorization", $"Basic {credentials}");

var response = await client.SendAsync(request);
var data = await response.Content.ReadAsStringAsync();
Console.WriteLine(data);
```

---

**Other endpoints in Invoice:**

- [GET /invoice/{{invoice_id}} — Get Single Invoice](/subscription-billing/invoice/get-single-invoice)
- [GET /invoices/{{customer_id}} — List All Invoices By Customer Id](/subscription-billing/invoice/list-all-invoices-by-customer-id)
- [GET /invoices — List All Invoices](/subscription-billing/invoice/list-all-invoices)
- [POST /invoice/recordpayment/{{invoice_id}} — Record Payment Invoice](/subscription-billing/invoice/record-payment-invoice)
- [POST /invoice/failedpayment/{{invoice_id}} — Record Failed Payment Invoice](/subscription-billing/invoice/record-failed-payment-invoice)
- [DELETE /invoices/{{invoice_id}} — Delete Invoice](/subscription-billing/invoice/delete-invoice)
- [POST /invoices/create-metered/{{subscription_id}} — Create Metered Invoice](/subscription-billing/invoice/create-metered-invoice)

