v1

latestOpenAPI 3.1.0AGPLv32026-07-26168262527.5 KB
wallets

Top up a wallet

This endpoint is used to top-up an active wallet.

post/wallet_transactions

Request body

Example request

{
  "wallet_transaction": {
    "wallet_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
    "name": "Tokens for models 'high-fidelity-boost'",
    "paid_credits": "20.0",
    "granted_credits": "10.0",
    "voided_credits": "5.0",
    "invoice_custom_section": {
      "invoice_custom_section_codes": [
        "eu_bank_details"
      ]
    },
    "payment_method": {
      "payment_method_type": "provider",
      "payment_method_id": "1a901a90-1a90-1a90-1a90-1a901a901a90"
    },
    "metadata": [
      {
        "key": "example key",
        "value": "example value"
      },
      {
        "key": "another key",
        "value": "another value"
      }
    ]
  }
}

Response

Wallet transaction created

Example response

{
  "wallet_transactions": [
    {
      "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"
      }
    }
  ]
}