v1

latestOpenAPI 3.1.0AGPLv32026-07-26168262527.5 KB
payments

Retrieve a payment

This endpoint retrieves a specific payment by its ID.

get/payments/{lago_id}

Response

Payment details

lago_idstring uuid required

The unique identifier of the payment, created by Lago.

lago_customer_idstring uuid required

Unique identifier of the customer, created by Lago.

external_customer_idstring required

The customer external unique identifier (provided by your own application)

invoice_idsstring[] required

List of invoice IDs associated with the payment.

invoice_numbersstring[]

List of invoice numbers associated with the payment.

lago_payable_idstring uuid required

The unique identifier of the paid resource, created by Lago.

payable_type'Invoice' | 'PaymentRequest' required

The type of the paid resource, associated with the lago_payable_id.

amount_centsinteger required

The amount of the payment in cents.

amount_currency'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'ISK' | 'JMD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KRW' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'STD' | 'SZL' | 'THB' | 'TJS' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' required
statusstring required

The status of the payment within the payment provider. This can be very different from a payment provider to another.

payment_status'succeeded' | 'failed' | 'pending' | 'processing' required

The normalized payment status by Lago.

type'manual' | 'provider' required

The type of payment.

referencestring required

Reference for the payment.

payment_provider_codestring required

Code of the payment provider

payment_provider_type'adyen' | 'cashfree' | 'gocardless' | 'stripe' | 'flutterwave' | 'moneyhash' required

The type of payment provider

external_payment_idstring nullable required

DEPRECATED: use provider_payment_id

provider_payment_idstring nullable required

Unique identifier of the payment within the payment provider (if applicable).

provider_customer_idstring required

Unique identifier of the customer within the payment provider

payment_method_idstring uuid nullable

The unique identifier of the payment method used for this payment.

next_actionobject required

The next action to be taken by the customer to complete the payment. Should usually be empty, except when receiving the payment.requires_action webhook.

created_atstring date-time required

Timestamp when the payment was created in Lago's database, not on the payment provider.

Example response

{
  "lago_id": "4cf085a7-c196-4f07-a543-97c50ec6e8b2",
  "lago_customer_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
  "external_customer_id": "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba",
  "invoice_ids": [
    "486b147a-02a1-4ccf-8603-f3541fc25e7a"
  ],
  "invoice_numbers": [
    "HOO-202D-005-001"
  ],
  "lago_payable_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
  "payable_type": "Invoice",
  "amount_cents": 1099,
  "amount_currency": "USD",
  "status": "Completed",
  "payment_status": "succeeded",
  "type": "manual",
  "reference": "ref1",
  "payment_provider_code": "stripe_prod",
  "payment_provider_type": "stripe",
  "provider_payment_id": "pi_5eb0285741bc6ba",
  "provider_customer_id": "cus_5eb0285bcf941bc6ba",
  "payment_method_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
  "next_action": {
    "type": "redirect_to_url",
    "redirect_to_url": {
      "url": "https://hooks.stripe.com/3d_secure_2/hosted?merchant=acct_AAA&payment_intent=pi_BBB&payment_intent_client_secret=pi_BBB&publishable_key=pk_test_CCC",
      "return_url": "https://app.example.com"
    }
  },
  "created_at": "2025-01-21T00:10:29Z"
}