Transactions

Beta

View and filter all charges created via the API Billing system. Transactions are visible in both the Dashboard and via the API.

Dashboard View

Go to API Billing → Transactions to see all charges. You can filter by:

  • Flow - Filter by specific billing flow
  • Status - Filter by transaction status (pending / succeeded / failed)
  • Date range - Filter by creation date
  • Customer Ref - Search by your internal customer ID

Click a row to see full details including:

  • Amount and currency
  • Metadata (if provided)
  • Timestamps (created_at, etc.)
  • Flow information
  • Organization context

API Endpoint

GET
/v1/billing/transactions

Authorization: Bearer <MESHPAY_API_KEY>

Query Parameters

FieldTypeRequiredDescriptionExample
flow_idstring | nullOptionalFilter by billing flow IDflow_123
customer_refstring | nullOptionalFilter by customer referenceuser_123
statusstring | nullOptionalFilter by status (pending, succeeded, failed)succeeded
start_datestring (ISO 8601) | nullOptionalFilter transactions created on or after this date2025-11-01T00:00:00Z
end_datestring (ISO 8601) | nullOptionalFilter transactions created on or before this date2025-11-30T23:59:59Z
limitnumber | nullOptionalMaximum number of results (default: 50, max: 100)50
offsetnumber | nullOptionalNumber of results to skip (for pagination)0

Code Examples

import requests
import os
from datetime import datetime, timedelta
url = "https://api.orvion.sh/v1/billing/transactions"
headers = {
"Authorization": f"Bearer {os.environ['MESHPAY_API_KEY']}"
}
# Filter by flow and customer
params = {
"flow_id": "flow_123",
"customer_ref": "user_123"
}
response = requests.get(url, headers=headers, params=params)
data = response.json()
for txn in data.get("data", []):
print(f"Transaction {txn['id']}: {txn['amount']} {txn['currency']} - {txn['status']}")
# Filter by date range
end_date = datetime.now()
start_date = end_date - timedelta(days=30)
params = {
"start_date": start_date.isoformat() + "Z",
"end_date": end_date.isoformat() + "Z",
"status": "succeeded"
}
response = requests.get(url, headers=headers, params=params)
data = response.json()
print(f"Found {len(data.get('data', []))} transactions")

Response

Returns a paginated list of transactions:

{
  "data": [
    {
      "id": "txn_abc",
      "flow_id": "flow_123",
      "organization_id": "org_456",
      "amount": 100,
      "currency": "EUR",
      "status": "succeeded",
      "customer_ref": "user_123",
      "reference": "image-job-987",
      "metadata": {
        "job_id": "987",
        "tier": "pro"
      },
      "created_via": "api",
      "created_at": "2025-11-27T12:05:00Z"
    }
  ],
  "pagination": {
    "total": 1,
    "limit": 50,
    "offset": 0,
    "has_more": false
  }
}

Response Fields

  • data - Array of transaction objects
  • pagination - Pagination metadata
    • total - Total number of matching transactions
    • limit - Maximum results per page
    • offset - Current offset
    • has_more - Whether more results are available

Transaction Object Fields

  • id - Unique transaction identifier
  • flow_id - Billing flow ID
  • organization_id - Organization that owns this transaction
  • amount - Charged amount
  • currency - Currency code
  • status - Transaction status
  • customer_ref - Customer reference (if provided)
  • reference - Reference string (if provided)
  • metadata - Metadata object (if provided)
  • created_via - Source (api or dashboard_test)
  • created_at - Creation timestamp

Transaction Statuses

  • pending - Transaction is being processed
  • succeeded - Charge was successful
  • failed - Charge failed (check error details if available)

Pagination

Use limit and offset parameters for pagination:

# First page (default)
GET /v1/billing/transactions?limit=50&offset=0

# Second page
GET /v1/billing/transactions?limit=50&offset=50

# Third page
GET /v1/billing/transactions?limit=50&offset=100

Check the has_more field in the response to determine if more results are available.

Error Scenarios

400 Bad Request

  • Invalid date format for start_date or end_date
  • Invalid limit or offset values
  • Invalid status value

401 Unauthorized

  • Missing or invalid API key

403 Forbidden

  • API key does not have permission to view transactions

Use Cases

View All Charges for a Customer

GET /v1/billing/transactions?customer_ref=user_123

View Recent Successful Charges

GET /v1/billing/transactions?status=succeeded&start_date=2025-11-01T00:00:00Z

View Charges for a Specific Flow

GET /v1/billing/transactions?flow_id=flow_123

View Test Charges

Filter by created_via=dashboard_test (if supported) or check the created_via field in the response.

Related Documentation