List all consumptions for a wallet transaction
curl --request GET \
--url https://api.getlago.com/api/v1/wallet_transactions/{lago_id}/consumptions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getlago.com/api/v1/wallet_transactions/{lago_id}/consumptions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getlago.com/api/v1/wallet_transactions/{lago_id}/consumptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getlago.com/api/v1/wallet_transactions/{lago_id}/consumptions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.getlago.com/api/v1/wallet_transactions/{lago_id}/consumptions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.getlago.com/api/v1/wallet_transactions/{lago_id}/consumptions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getlago.com/api/v1/wallet_transactions/{lago_id}/consumptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"wallet_transaction_consumptions": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"amount_cents": 5000,
"credit_amount": "5.0",
"created_at": "2022-04-29T08:59:51Z",
"wallet_transaction": {
"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",
"invoice_requires_successful_payment": false,
"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'",
"payment_method": {
"payment_method_type": "provider",
"payment_method_id": "1a901a90-1a90-1a90-1a90-1a901a901a90"
},
"applied_invoice_custom_sections": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"created_at": "2023-07-06T14:35:58Z",
"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"
},
"invoice_custom_section_id": "1a901a90-1a90-1a90-1a90-1a901a901a90"
}
]
}
}
],
"meta": {
"current_page": 2,
"total_pages": 4,
"total_count": 70,
"next_page": 3,
"prev_page": 1
}
}{
"status": 401,
"error": "Unauthorized"
}{
"status": 403,
"error": "Forbidden",
"code": "feature_unavailable"
}{
"status": 404,
"error": "Not Found",
"code": "object_not_found"
}{
"status": 422,
"error": "Unprocessable entity",
"code": "validation_errors",
"error_details": {}
}Wallet transactions
List all consumptions for a wallet transaction
This endpoint is used to list all consumption records for an inbound wallet transaction. It shows how the credits from this inbound transaction were consumed by outbound transactions. Only available for traceable wallets.
GET
/
wallet_transactions
/
{lago_id}
/
consumptions
List all consumptions for a wallet transaction
curl --request GET \
--url https://api.getlago.com/api/v1/wallet_transactions/{lago_id}/consumptions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getlago.com/api/v1/wallet_transactions/{lago_id}/consumptions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getlago.com/api/v1/wallet_transactions/{lago_id}/consumptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getlago.com/api/v1/wallet_transactions/{lago_id}/consumptions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.getlago.com/api/v1/wallet_transactions/{lago_id}/consumptions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.getlago.com/api/v1/wallet_transactions/{lago_id}/consumptions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getlago.com/api/v1/wallet_transactions/{lago_id}/consumptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"wallet_transaction_consumptions": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"amount_cents": 5000,
"credit_amount": "5.0",
"created_at": "2022-04-29T08:59:51Z",
"wallet_transaction": {
"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",
"invoice_requires_successful_payment": false,
"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'",
"payment_method": {
"payment_method_type": "provider",
"payment_method_id": "1a901a90-1a90-1a90-1a90-1a901a901a90"
},
"applied_invoice_custom_sections": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"created_at": "2023-07-06T14:35:58Z",
"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"
},
"invoice_custom_section_id": "1a901a90-1a90-1a90-1a90-1a901a901a90"
}
]
}
}
],
"meta": {
"current_page": 2,
"total_pages": 4,
"total_count": 70,
"next_page": 3,
"prev_page": 1
}
}{
"status": 401,
"error": "Unauthorized"
}{
"status": 403,
"error": "Forbidden",
"code": "feature_unavailable"
}{
"status": 404,
"error": "Not Found",
"code": "object_not_found"
}{
"status": 422,
"error": "Unprocessable entity",
"code": "validation_errors",
"error_details": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier assigned to the wallet transaction within the Lago application. Must be an inbound wallet transaction.
Example:
"1a901a90-1a90-1a90-1a90-1a901a901a90"
Query Parameters
Page number.
Example:
1
Number of records per page.
Example:
20
⌘I