---
title: "Create a payment request"
method: POST
path: "/payment_requests"
tags: ["payment_requests"]
---

# Create a payment request

`POST /payment_requests`

This endpoint is used to create a payment request to collect payments of overdue invoices of a given customer

## Request body

- PaymentRequestCreateInput
  - `payment_request` object, required
    - `external_customer_id` string, required — The customer external unique identifier (provided by your own application)
    - `email` string, email, required — The customer's email address used for sending dunning notifications
    - `lago_invoice_ids` string[], required — A list of Lago IDs for the customer's overdue invoices to start the dunning process
    - `payment_method` PaymentMethodReference — Reference to a specific payment method for processing the payment.
      - `payment_method_type` 'provider' | 'manual' — The type of payment method to use.
      - `payment_method_id` string, uuid — The unique identifier of the payment method (required when using a specific provider payment method).

## Response `200`

PaymentRequest created

- PaymentRequest
  - `payment_request` PaymentRequestObject, required
    - `lago_id` string, uuid, required — Unique identifier of the payment request, created by Lago.
    - `email` string, email, required — The customer's email address used for sending dunning notifications
    - `amount_cents` integer, required — The sum of the total amounts of all the invoices included in the payment request, expressed 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
    - `payment_status` 'pending' | 'succeeded' | 'failed', required — The status of the payment associated with the payment request. It can have one of the following values: - `pending`: the payment is pending, waiting for payment processing in the payment provider or when the invoice is emitted but users have not updated the payment status through the endpoint. - `succeeded`: the payment of the payment request has been successfully processed. - `failed`: the payment of the payment request has failed or encountered an error during processing.
    - `created_at` string, date-time, required — The date and time when the payment request was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the payment request was initially created.
    - `customer` CustomerBaseObject, required
      - `lago_id` string, uuid, required — Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system
      - `sequential_id` integer, required — The unique identifier assigned to the customer within the organization's scope. This identifier is used to track and reference the customer's order of creation within the organization's system. It ensures that each customer has a distinct `sequential_id`` associated with them, allowing for easy identification and sorting based on the order of creation
      - `slug` string, required — A concise and unique identifier for the customer, formed by combining the Organization's `name`, `id`, and customer's `sequential_id`
      - `external_id` string, required — The customer external unique identifier (provided by your own application)
      - `billing_entity_code` string — The unique code of the billing entity associated with the customer.
      - `address_line1` string, nullable — The first line of the billing address
      - `address_line2` string, nullable — The second line of the billing address
      - `applicable_timezone` 'UTC' | 'Africa/Algiers' | 'Africa/Cairo' | 'Africa/Casablanca' | 'Africa/Harare' | 'Africa/Johannesburg' | 'Africa/Monrovia' | 'Africa/Nairobi' | 'America/Argentina/Buenos_Aires' | 'America/Bogota' | 'America/Caracas' | 'America/Chicago' | 'America/Chihuahua' | 'America/Denver' | 'America/Guatemala' | 'America/Guyana' | 'America/Halifax' | 'America/Indiana/Indianapolis' | 'America/Juneau' | 'America/La_Paz' | 'America/Lima' | 'America/Los_Angeles' | 'America/Mazatlan' | 'America/Mexico_City' | 'America/Monterrey' | 'America/Montevideo' | 'America/New_York' | 'America/Nuuk' | 'America/Phoenix' | 'America/Puerto_Rico' | 'America/Regina' | 'America/Santiago' | 'America/Sao_Paulo' | 'America/St_Johns' | 'America/Tijuana' | 'Asia/Almaty' | 'Asia/Baghdad' | 'Asia/Baku' | 'Asia/Bangkok' | 'Asia/Chongqing' | 'Asia/Colombo' | 'Asia/Dhaka' | 'Asia/Hong_Kong' | 'Asia/Irkutsk' | 'Asia/Jakarta' | 'Asia/Jerusalem' | 'Asia/Kabul' | 'Asia/Kamchatka' | 'Asia/Karachi' | 'Asia/Kathmandu' | 'Asia/Kolkata' | 'Asia/Krasnoyarsk' | 'Asia/Kuala_Lumpur' | 'Asia/Kuwait' | 'Asia/Magadan' | 'Asia/Muscat' | 'Asia/Novosibirsk' | 'Asia/Riyadh' | 'Asia/Seoul' | 'Asia/Shanghai' | 'Asia/Singapore' | 'Asia/Srednekolymsk' | 'Asia/Taipei' | 'Asia/Tashkent' | 'Asia/Tbilisi' | 'Asia/Tehran' | 'Asia/Tokyo' | 'Asia/Ulaanbaatar' | 'Asia/Urumqi' | 'Asia/Vladivostok' | 'Asia/Yakutsk' | 'Asia/Yangon' | 'Asia/Yekaterinburg' | 'Asia/Yerevan' | 'Atlantic/Azores' | 'Atlantic/Cape_Verde' | 'Atlantic/South_Georgia' | 'Australia/Adelaide' | 'Australia/Brisbane' | 'Australia/Darwin' | 'Australia/Hobart' | 'Australia/Melbourne' | 'Australia/Perth' | 'Australia/Sydney' | 'Europe/Amsterdam' | 'Europe/Athens' | 'Europe/Belgrade' | 'Europe/Berlin' | 'Europe/Bratislava' | 'Europe/Brussels' | 'Europe/Bucharest' | 'Europe/Budapest' | 'Europe/Copenhagen' | 'Europe/Dublin' | 'Europe/Helsinki' | 'Europe/Istanbul' | 'Europe/Kaliningrad' | 'Europe/Kyiv' | 'Europe/Lisbon' | 'Europe/Ljubljana' | 'Europe/London' | 'Europe/Madrid' | 'Europe/Minsk' | 'Europe/Moscow' | 'Europe/Paris' | 'Europe/Prague' | 'Europe/Riga' | 'Europe/Rome' | 'Europe/Samara' | 'Europe/Sarajevo' | 'Europe/Skopje' | 'Europe/Sofia' | 'Europe/Stockholm' | 'Europe/Tallinn' | 'Europe/Vienna' | 'Europe/Vilnius' | 'Europe/Volgograd' | 'Europe/Warsaw' | 'Europe/Zagreb' | 'Europe/Zurich' | 'GMT+12' | 'Pacific/Apia' | 'Pacific/Auckland' | 'Pacific/Chatham' | 'Pacific/Fakaofo' | 'Pacific/Fiji' | 'Pacific/Guadalcanal' | 'Pacific/Guam' | 'Pacific/Honolulu' | 'Pacific/Majuro' | 'Pacific/Midway' | 'Pacific/Noumea' | 'Pacific/Pago_Pago' | 'Pacific/Port_Moresby' | 'Pacific/Tongatapu', required
      - `city` string, nullable — The city of the customer's billing address
      - `country` 'null' | 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO' | 'AQ' | 'AR' | 'AS' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CC' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CU' | 'CV' | 'CW' | 'CX' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FM' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IR' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KP' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MH' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MP' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PS' | 'PT' | 'PW' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SY' | 'SZ' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'UM' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW', nullable
      - `currency` 'null' | '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' | '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', nullable
      - `email` string, email, nullable — The email of the customer
      - `legal_name` string, nullable — The legal company name of the customer
      - `legal_number` string, nullable — The legal company number of the customer
      - `logo_url` string, nullable — The logo URL of the customer
      - `name` string, nullable — The full name of the customer
      - `firstname` string, nullable — First name of the customer
      - `lastname` string, nullable — Last name of the customer
      - `account_type` 'customer' | 'partner' — The type of the account. It can have one of the following values: - `customer`: the account is a customer. - `partner`: the account is a partner.
      - `customer_type` 'company' | 'individual' | 'null', nullable — The type of the customer. It can have one of the following values: - `company`: the customer is a company. - `individual`: the customer is an individual.
      - `phone` string, nullable — The phone number of the customer
      - `state` string, nullable — The state of the customer's billing address
      - `tax_identification_number` string, nullable — The tax identification number of the customer
      - `timezone` 'null' | 'UTC' | 'Africa/Algiers' | 'Africa/Cairo' | 'Africa/Casablanca' | 'Africa/Harare' | 'Africa/Johannesburg' | 'Africa/Monrovia' | 'Africa/Nairobi' | 'America/Argentina/Buenos_Aires' | 'America/Bogota' | 'America/Caracas' | 'America/Chicago' | 'America/Chihuahua' | 'America/Denver' | 'America/Godthab' | 'America/Guatemala' | 'America/Guyana' | 'America/Halifax' | 'America/Indiana/Indianapolis' | 'America/Juneau' | 'America/La_Paz' | 'America/Lima' | 'America/Los_Angeles' | 'America/Mazatlan' | 'America/Mexico_City' | 'America/Monterrey' | 'America/Montevideo' | 'America/New_York' | 'America/Phoenix' | 'America/Puerto_Rico' | 'America/Regina' | 'America/Santiago' | 'America/Sao_Paulo' | 'America/St_Johns' | 'America/Tijuana' | 'Asia/Almaty' | 'Asia/Baghdad' | 'Asia/Baku' | 'Asia/Bangkok' | 'Asia/Chongqing' | 'Asia/Colombo' | 'Asia/Dhaka' | 'Asia/Hong_Kong' | 'Asia/Irkutsk' | 'Asia/Jakarta' | 'Asia/Jerusalem' | 'Asia/Kabul' | 'Asia/Kamchatka' | 'Asia/Karachi' | 'Asia/Kathmandu' | 'Asia/Kolkata' | 'Asia/Krasnoyarsk' | 'Asia/Kuala_Lumpur' | 'Asia/Kuwait' | 'Asia/Magadan' | 'Asia/Muscat' | 'Asia/Novosibirsk' | 'Asia/Rangoon' | 'Asia/Riyadh' | 'Asia/Seoul' | 'Asia/Shanghai' | 'Asia/Singapore' | 'Asia/Srednekolymsk' | 'Asia/Taipei' | 'Asia/Tashkent' | 'Asia/Tbilisi' | 'Asia/Tehran' | 'Asia/Tokyo' | 'Asia/Ulaanbaatar' | 'Asia/Urumqi' | 'Asia/Vladivostok' | 'Asia/Yakutsk' | 'Asia/Yekaterinburg' | 'Asia/Yerevan' | 'Atlantic/Azores' | 'Atlantic/Cape_Verde' | 'Atlantic/South_Georgia' | 'Australia/Adelaide' | 'Australia/Brisbane' | 'Australia/Darwin' | 'Australia/Hobart' | 'Australia/Melbourne' | 'Australia/Perth' | 'Australia/Sydney' | 'Europe/Amsterdam' | 'Europe/Athens' | 'Europe/Belgrade' | 'Europe/Berlin' | 'Europe/Bratislava' | 'Europe/Brussels' | 'Europe/Bucharest' | 'Europe/Budapest' | 'Europe/Copenhagen' | 'Europe/Dublin' | 'Europe/Helsinki' | 'Europe/Istanbul' | 'Europe/Kaliningrad' | 'Europe/Kiev' | 'Europe/Lisbon' | 'Europe/Ljubljana' | 'Europe/London' | 'Europe/Madrid' | 'Europe/Minsk' | 'Europe/Moscow' | 'Europe/Paris' | 'Europe/Prague' | 'Europe/Riga' | 'Europe/Rome' | 'Europe/Samara' | 'Europe/Sarajevo' | 'Europe/Skopje' | 'Europe/Sofia' | 'Europe/Stockholm' | 'Europe/Tallinn' | 'Europe/Vienna' | 'Europe/Vilnius' | 'Europe/Volgograd' | 'Europe/Warsaw' | 'Europe/Zagreb' | 'Europe/Zurich' | 'GMT+12' | 'Pacific/Apia' | 'Pacific/Auckland' | 'Pacific/Chatham' | 'Pacific/Fakaofo' | 'Pacific/Fiji' | 'Pacific/Guadalcanal' | 'Pacific/Guam' | 'Pacific/Honolulu' | 'Pacific/Majuro' | 'Pacific/Midway' | 'Pacific/Noumea' | 'Pacific/Pago_Pago' | 'Pacific/Port_Moresby' | 'Pacific/Tongatapu', nullable
      - `url` string, nullable — The custom website URL of the customer
      - `zipcode` string, nullable — The zipcode of the customer's billing address
      - `net_payment_term` integer, nullable — The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.
      - `created_at` string, date-time, required — The date of the customer creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The creation_date provides a standardized and internationally recognized timestamp for when the customer object was created
      - `updated_at` string, date-time — The date of the customer update, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The update_date provides a standardized and internationally recognized timestamp for when the customer object was updated
      - `finalize_zero_amount_invoice` 'inherit' | 'skip' | 'finalize' — Specifies how invoices with a zero total amount should be handled: - `inherit`: (Default) Follows the organization-level configuration. - `finalize`: Invoices are issued and finalized even if the total amount is zero. - `skip`: Invoices with a total amount of zero are not finalized.
      - `skip_invoice_custom_sections` boolean — Set to true to exclude all invoice custom sections from PDF generation for this customer only.
      - `billing_configuration` CustomerBillingConfiguration — Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer.
        - `invoice_grace_period` integer — The grace period, expressed in days, for the invoice. This period refers to the additional time granted to the customer beyond the invoice due date to adjust usage and line items
        - `subscription_invoice_issuing_date_anchor` 'current_period_end' | 'next_period_start' | 'null', nullable — Defines whether the issuing date follows the current billing period's end date or the next period starting date.
        - `subscription_invoice_issuing_date_adjustment` 'align_with_finalization_date' | 'keep_anchor' | 'null', nullable — The logic applied on top of the subscription_invoice_issuing_date_anchor rule. You can opt to use the invoice finalization date, that includes any configured grace period.
        - `payment_provider` 'stripe' | 'adyen' | 'gocardless' — The payment provider utilized to initiate payments for invoices issued by Lago. Accepted values: `stripe`, `adyen`, `gocardless` or null. This field is required if you intend to assign a `provider_customer_id`.
        - `payment_provider_code` string — Unique code used to identify a payment provider connection.
        - `provider_customer_id` string — The customer ID within the payment provider's system. If this field is not provided, Lago has the option to create a new customer record within the payment provider's system on behalf of the customer
        - `sync` boolean — Set this field to `true` if you want to create the customer in the payment provider synchronously with the customer creation process in Lago. This option is applicable only when the `provider_customer_id` is `null` and the customer is automatically created in the payment provider through Lago. By default, the value is set to `false`
        - `sync_with_provider` boolean — Set this field to `true` if you want to create a customer record in the payment provider's system. This option is applicable only when the `provider_customer_id` is null and the `sync_with_provider` field is set to `true`. By default, the value is set to `false`
        - `document_locale` string — The document locale, specified in the ISO 639-1 format. This field represents the language or locale used for the documents issued by Lago
        - `provider_payment_methods` string[], nullable — Specifies the available payment methods that can be used for this customer when `payment_provider` is set to `stripe`. The `provider_payment_methods` field is an array that allows multiple payment options to be defined. If this field is not explicitly set, the payment methods will be set to `card`. For now, possible values are `card`, `sepa_debit`, `us_bank_account`, `bacs_debit`, `boleto`, `link`, `crypto` and `customer_balance`. Note that when `link` is selected, `card` should also be provided in the array. When `customer_balance` is selected, no other payment can be selected.
      - `shipping_address` Address — Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer.
        - `address_line1` string, nullable — The first line of the billing address
        - `address_line2` string, nullable — The second line of the billing address
        - `city` string, nullable — The city of the customer's billing address
        - `country` 'null' | 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO' | 'AQ' | 'AR' | 'AS' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CC' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CU' | 'CV' | 'CW' | 'CX' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FM' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IR' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KP' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MH' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MP' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PS' | 'PT' | 'PW' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SY' | 'SZ' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'UM' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW', nullable
        - `state` string, nullable — The state of the customer's billing address
        - `zipcode` string, nullable — The zipcode of the customer's billing address
      - `metadata` CustomerMetadata[]
        - `lago_id` string, uuid, required — A unique identifier for the customer metadata object in the Lago application. Can be used to update a key-value pair
        - `key` string, required — The metadata object key
        - `value` string, required — The metadata object value
        - `display_in_invoice` boolean, required — Determines whether the item or information should be displayed in the invoice. If set to true, the item or information will be included and visible in the generated invoice. If set to false, the item or information will be excluded and not displayed in the invoice.
        - `created_at` string, date-time, required — The date of the metadata object creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The creation_date provides a standardized and internationally recognized timestamp for when the metadata object was created
    - `invoices` InvoiceBaseObject[], required
      - `lago_id` string, uuid, required — Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee's record within the Lago system.
      - `billing_entity_code` string, nullable, required — The unique code of the billing entity associated with the invoice
      - `sequential_id` integer — This ID helps in uniquely identifying and organizing the invoices associated with a specific customer. It provides a sequential numbering system specific to the customer, allowing for easy tracking and management of invoices within the customer's context.
      - `number` string, required — The unique number assigned to the invoice. This number serves as a distinct identifier for the invoice and helps in differentiating it from other invoices in the system.
      - `issuing_date` string, date, required — The date when the invoice was issued. It is provided in the ISO 8601 date format.
      - `payment_dispute_lost_at` string, date-time — The date when the payment dispute was lost. It is expressed in Coordinated Universal Time (UTC).
      - `payment_due_date` string, date — The payment due date for the invoice, specified in the ISO 8601 date format.
      - `payment_overdue` boolean — Specifies if the payment is considered as overdue.
      - `net_payment_term` integer — The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.
      - `invoice_type` 'subscription' | 'add_on' | 'credit' | 'one_off' | 'progressive_billing', required — The type of invoice issued. Possible values are `subscription`, `one-off`, `credit` or `progressive_billing`.
      - `status` 'draft' | 'finalized' | 'voided' | 'failed' | 'pending', required — The status of the invoice. It indicates the current state of the invoice and can have following values: - `draft`: the invoice is in the draft state, waiting for the end of the grace period to be finalized. During this period, events can still be ingested and added to the invoice. - `finalized`: the invoice has been issued and finalized. In this state, events cannot be ingested or added to the invoice anymore. - `voided`: the invoice has been issued and subsequently voided. In this state, events cannot be ingested or added to the invoice anymore. - `pending`: the invoice remains pending until the taxes are fetched from the external provider. - `failed`: during an attempt of finalization of the invoice, an error happened. This invoice will have an array of error_details, explaining, in which part of the system an error happened and how it's possible to fix it. This invoice can't be edited or updated, only retried. This action will discard current error_details and will create new ones if the finalization failed again.
      - `payment_status` 'pending' | 'succeeded' | 'failed', required — The status of the payment associated with the invoice. It can have one of the following values: - `pending`: the payment is pending, waiting for payment processing in Stripe or when the invoice is emitted but users have not updated the payment status through the endpoint. - `succeeded`: the payment of the invoice has been successfully processed. - `failed`: the payment of the invoice has failed or encountered an error during processing.
      - `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
      - `fees_amount_cents` integer, required — The total sum of fees amount in cents. It calculates the cumulative amount of all the fees associated with the invoice, providing a consolidated value.
      - `coupons_amount_cents` integer, required — The total sum of all coupons discounted on the invoice. It calculates the cumulative discount amount applied by coupons, expressed in cents.
      - `credit_notes_amount_cents` integer, required — The total sum of all credit notes discounted on the invoice. It calculates the cumulative discount amount applied by credit notes, expressed in cents.
      - `sub_total_excluding_taxes_amount_cents` integer, required — Subtotal amount, excluding taxes, expressed in cents. This field depends on the version number. Here are the definitions based on the version: - Version 1: is equal to the sum of `fees_amount_cents`, minus `coupons_amount_cents`, and minus `prepaid_credit_amount_cents`. - Version 2: is equal to the `fees_amount_cents`. - Version 3 & 4: is equal to the `fees_amount_cents`, minus `coupons_amount_cents`
      - `taxes_amount_cents` integer, required — The sum of tax amount associated with the invoice, expressed in cents.
      - `sub_total_including_taxes_amount_cents` integer, required — Subtotal amount, including taxes, expressed in cents. This field depends on the version number. Here are the definitions based on the version: - Version 1: is equal to the `total_amount_cents`. - Version 2: is equal to the sum of `fees_amount_cents` and `taxes_amount_cents`. - Version 3 & 4: is equal to the sum `sub_total_excluding_taxes_amount_cents` and `taxes_amount_cents`
      - `prepaid_credit_amount_cents` integer, required — The total sum of all prepaid credits discounted on the invoice. It calculates the cumulative discount amount applied by prepaid credits, expressed in cents.
      - `prepaid_granted_credit_amount_cents` integer, nullable — The portion of prepaid credits discounted on the invoice that originated from granted (free) credits, expressed in cents. Only populated for invoices associated with traceable wallets.
      - `prepaid_purchased_credit_amount_cents` integer, nullable — The portion of prepaid credits discounted on the invoice that originated from purchased (paid) credits, expressed in cents. Only populated for invoices associated with traceable wallets.
      - `progressive_billing_credit_amount_cents` integer, required — The usage already billed in previous invoices. Only apply to `progressive_billing` and `subscription` invoices.
      - `total_amount_cents` integer, required — The sum of the amount and taxes amount on the invoice, expressed in cents. It calculates the total financial value of the invoice, including both the original amount and any applicable taxes.
      - `version_number` integer, required
      - `self_billed` boolean — Indicates if the invoice is self-billed. Self-billing is a process where an organization creates the invoice on behalf of the partner. This field specifies whether the invoice is self-billed or not.
      - `file_url` string, uri — Contains the URL that provides direct access to the invoice PDF file. You can use this URL to download or view the PDF document of the invoice
      - `created_at` string, date-time, required — The date of the invoice creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The creation_date provides a standardized and internationally recognized timestamp for when the invoice object was created
      - `updated_at` string, date-time, required — The date of the invoice update, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The update_date provides a standardized and internationally recognized timestamp for when the invoice object was updated

## Other responses

- `400` — Bad Request error
- `401` — Unauthorized error
- `422` — Unprocessable entity error

---

[API](https://skmtc.dev/getlago/apis/lago-api-documentation.md) · [All operations](https://skmtc.dev/getlago/apis/lago-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/getlago/lago-api-documentation/revisions/6e969ef3bb45/schema)
