v1

latestOpenAPI 3.1.0AGPLv32026-07-26168262527.5 KB
payment_requests

List all payment requests

This endpoint is used to list all existing payment requests.

get/payment_requests

Query parameters

pageinteger
Example:1

Page number.

per_pageinteger
Example:20

Number of records per page.

currencystring
Example:EUR

Filter the results by currency, expressed as an ISO 4217 code.

external_customer_idstring
Example:5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba

Unique identifier assigned to the customer in your application.

payment_status'pending' | 'failed' | 'succeeded'
Example:pending

Filter by payment status. Possible values are pending, failed or succeeded.

billing_entity_codes[]string[]

Filter payment requests by billing entity codes.

[
  "billing_entity_code_1",
  "billing_entity_code_2"
]

Response

PaymentRequests

Example response

{
  "payment_requests": [
    {
      "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
      "email": "dinesh@piedpiper.test",
      "amount_cents": 100,
      "amount_currency": "USD",
      "payment_status": "succeeded",
      "created_at": "2022-04-29T08:59:51Z",
      "customer": {
        "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
        "sequential_id": 1,
        "slug": "LAG-1234-001",
        "external_id": "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba",
        "billing_entity_code": "acme_corp",
        "address_line1": "5230 Penfield Ave",
        "applicable_timezone": "America/Los_Angeles",
        "city": "Woodland Hills",
        "country": "US",
        "currency": "USD",
        "email": "dinesh@piedpiper.test",
        "legal_name": "Coleman-Blair",
        "legal_number": "49-008-2965",
        "logo_url": "http://hooli.com/logo.png",
        "name": "Gavin Belson",
        "firstname": "Gavin",
        "lastname": "Belson",
        "account_type": "customer",
        "phone": "1-171-883-3711 x245",
        "state": "CA",
        "tax_identification_number": "EU123456789",
        "timezone": "America/Los_Angeles",
        "url": "http://hooli.com",
        "zipcode": "91364",
        "net_payment_term": 30,
        "created_at": "2022-04-29T08:59:51Z",
        "updated_at": "2022-04-29T08:59:51Z",
        "finalize_zero_amount_invoice": "inherit",
        "billing_configuration": {
          "invoice_grace_period": 3,
          "subscription_invoice_issuing_date_anchor": "next_period_start",
          "subscription_invoice_issuing_date_adjustment": "keep_anchor",
          "payment_provider": "stripe",
          "payment_provider_code": "stripe-eu-1",
          "provider_customer_id": "cus_12345",
          "sync": true,
          "sync_with_provider": true,
          "document_locale": "fr",
          "provider_payment_methods": [
            "card",
            "sepa_debit",
            "us_bank_account",
            "bacs_debit",
            "link",
            "boleto",
            "crypto",
            "customer_balance"
          ]
        },
        "shipping_address": {
          "address_line1": "5230 Penfield Ave",
          "city": "Woodland Hills",
          "country": "US",
          "state": "CA",
          "zipcode": "91364"
        },
        "metadata": [
          {
            "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
            "key": "Purchase Order",
            "value": "123456789",
            "display_in_invoice": true,
            "created_at": "2022-04-29T08:59:51Z"
          }
        ]
      },
      "invoices": [
        {
          "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
          "billing_entity_code": "acme_corp",
          "sequential_id": 2,
          "number": "LAG-1234-001-002",
          "issuing_date": "2022-04-30",
          "payment_dispute_lost_at": "2022-09-14T16:35:31Z",
          "payment_due_date": "2022-04-30",
          "payment_overdue": true,
          "net_payment_term": 30,
          "invoice_type": "subscription",
          "status": "finalized",
          "payment_status": "succeeded",
          "currency": "USD",
          "fees_amount_cents": 100,
          "coupons_amount_cents": 10,
          "credit_notes_amount_cents": 10,
          "sub_total_excluding_taxes_amount_cents": 100,
          "taxes_amount_cents": 20,
          "sub_total_including_taxes_amount_cents": 120,
          "total_amount_cents": 100,
          "version_number": 3,
          "file_url": "https://getlago.com/invoice/file",
          "created_at": "2022-04-29T08:59:51Z",
          "updated_at": "2022-04-29T08:59:51Z"
        }
      ]
    }
  ],
  "meta": {
    "current_page": 2,
    "next_page": 3,
    "prev_page": 1,
    "total_pages": 4,
    "total_count": 70
  }
}