Get all wallet transactions
Route
GET
/api/v1/wallets/:id/wallet_transactions?per_page=2&page=1
Usage
- Curl
- Python
- Ruby
- Node.js
- Go
- C#
LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"
curl --location --request GET "$LAGO_URL/api/v1/wallets/:id/wallet_transactions?per_page=2&page=1" \
--header "Authorization: Bearer $API_KEY"
from lago_python_client import Client
client = Client(api_key='__YOUR_API_KEY__')
client.wallet_transactions().find_all({'per_page': 2, 'page': 1})
require 'lago-ruby-client'
client = Lago::Api::Client.new({api_key: '__YOUR_API_KEY__'})
client.wallet_transactions.get_all({ per_page: 2, page: 3 })
let client = new Client('__API_KEY__')
await client.findAllWalletTransactions({per_page: 2, page: 3});
import "fmt"
import "github.com/getlago/lago-go-client"
func main() {
lagoClient := lago.New().
SetApiKey("__YOUR_API_KEY__")
walletTransactionListInput := &lago.WalletTransactionListInput{
PerPage: 1,
Page: 1,
WalletId: 12345,
}
walletTransactionResult, err := lagoClient.WalletTransaction().GetList(walletTransactionListInput)
if err != nil {
// Error is *lago.Error
panic(err)
}
// walletTransactionResult is *lago.WalletTransactionResult
fmt.Println(walletTransactionResult)
}
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class FindAllWalletsExample
{
public static void Main()
{
Configuration.Default.BasePath = "https://api.getlago.com/api/v1";
// Configure HTTP bearer authorization: bearerAuth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new WalletsApi(Configuration.Default);
var externalCustomerId = "12345"; // string | External customer ID
var page = 2; // int? | Number of page (optional)
var perPage = 20; // int? | Number of records per page (optional)
try
{
// Find wallets
Wallets result = apiInstance.FindAllWallets(externalCustomerId, page, perPage);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WalletsApi.FindAllWallets: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Arguments
Attributes | Type | Description |
---|---|---|
per_page | String Optional | Number of records per page. |
page | String Optional | Page number |
status | String Optional | can be either pending or settled |
transaction_type | String Optional | can be either inbound or outbound |
Responses
- HTTP 200
- HTTP 401
- HTTP 404
Wallet transactions were successfully found
Returns a list of wallet-transaction objects.
{
"status": 401,
"error": "Unauthorized"
}
Access to the API endpoint is unhautorized.
Possible reasons are:
- The
Authorization
header is missing - The
Authorization
header does not contain the API key - The Api key is invalid or expired
{
"status": 404,
"error": "Not Found",
"code": "wallet_not_found"
}
The wallet
was not found by the id.