v1

latestOpenAPI 3.1.0AGPLv32026-07-26168262527.5 KB
wallets

Retrieve a wallet transaction

This endpoint is used to retrieve a specific wallet transactions.

get/wallet_transactions/{lago_id}

Response

Wallet transaction

lago_idstring uuid required

Unique identifier assigned to the wallet transaction within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet transaction's record within the Lago system.

lago_wallet_idstring uuid required

Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system.

lago_invoice_idstring uuid nullable required

Unique identifier assigned to the invoice associated with this wallet transaction. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.

lago_credit_note_idstring uuid nullable required

Unique identifier of the credit note associated with this wallet transaction. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.

lago_voided_invoice_idstring uuid nullable required

Unique identifier of the invoice that was voided and triggered the creation of this inbound wallet transaction. Only present for inbound transactions on traceable wallets that were created as a result of an invoice void.

status'pending' | 'settled' | 'failed' required

The status of the wallet transaction. Possible values are pending, settled or failed.

source'manual' | 'interval' | 'threshold' required

The source field represents the origin or trigger of the wallet transaction. Possible values are manual, interval, threshold

transaction_status'purchased' | 'granted' | 'voided' | 'invoiced' required

The transaction status of the wallet transaction. Possible values are purchased (with pending or settled status), granted (without invoice_id), voided or invoiced.

transaction_type'inbound' | 'outbound' required

The type of transaction. Possible values are inbound (increasing the balance) or outbound (decreasing the balance).

amountstring required

The amount of credits based on the rate and the currency.

credit_amountstring required

The number of credits used in the wallet transaction.

invoice_requires_successful_paymentboolean required

A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.

remaining_amount_centsinteger nullable required

The remaining unconsumed amount of an inbound wallet transaction, expressed in cents. Only present for inbound transactions on traceable wallets. Tracks how much of the original credited amount has not yet been consumed by outbound transactions.

remaining_credit_amountstring nullable required

The remaining unconsumed amount of an inbound wallet transaction, expressed in credits. Only present for inbound transactions on traceable wallets.

priorityinteger required

The priority of the wallet transaction, used to determine the order in which inbound transactions are consumed. Lower values are consumed first.

settled_atstring date-time nullable required

The date when wallet transaction is settled, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).

failed_atstring date-time nullable required

The date when the wallet transaction failed, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).

created_atstring date-time required

The date of the wallet transaction creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).

namestring nullable required

The name of the wallet transaction. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either Prepaid credits - {{wallet_name}} if the wallet name is set, or Prepaid credits.

Example response

{
  "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
  "lago_wallet_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
  "lago_invoice_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
  "lago_credit_note_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
  "lago_voided_invoice_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
  "status": "settled",
  "source": "manual",
  "transaction_status": "purchased",
  "transaction_type": "inbound",
  "amount": "10.0",
  "credit_amount": "100.0",
  "metadata": [
    {
      "key": "example key",
      "value": "example value"
    },
    {
      "key": "another key",
      "value": "another value"
    }
  ],
  "remaining_amount_cents": 5000,
  "remaining_credit_amount": "5.0",
  "priority": 50,
  "settled_at": "2022-04-29T08:59:51Z",
  "failed_at": "2022-04-29T08:59:51Z",
  "created_at": "2022-04-29T08:59:51Z",
  "name": "Tokens for models 'high-fidelity-boost'",
  "applied_invoice_custom_sections": [
    {
      "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
      "created_at": "2023-07-06T14:35:58Z",
      "invoice_custom_section_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
      "invoice_custom_section": {
        "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
        "name": "EU Bank Details",
        "code": "eu_bank_details",
        "description": "This section contains the bank details for EU customers.",
        "details": "Bank Name: Lago Bank, IBAN: FR7630004000031234567890143",
        "display_name": "Bank Details:",
        "applied_to_organization": true,
        "organization_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
        "created_at": "2023-07-06T14:35:58Z"
      }
    }
  ],
  "payment_method": {
    "payment_method_type": "provider",
    "payment_method_id": "1a901a90-1a90-1a90-1a90-1a901a901a90"
  }
}