---
title: "Generate a payment URL"
method: POST
path: "/invoices/{lago_id}/payment_url"
tags: ["invoices"]
---

# Generate a payment URL

`POST /invoices/{lago_id}/payment_url`

This endpoint generates a checkout link for a specific invoice.

## Path parameters

- `lago_id` string, uuid, required

## Response `200`

Payment URL has been generated

- InvoicePaymentUrl — .
  - `invoice_payment_details` object
    - `lago_customer_id` string — 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
    - `lago_invoice_id` string — Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system
    - `external_customer_id` string — The customer external unique identifier (provided by your own application)
    - `payment_provider` string — The Payment Provider name linked to the Customer.
    - `payment_url` string — The generated Payment URL for the Invoice.

## Other responses

- `401` — Unauthorized error
- `404` — Not Found 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.dev/getlago/apis/lago-api-documentation/revisions/6e969ef3bb45?raw)
