> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getlago.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a payment

> This endpoint is used to create a manual payment



## OpenAPI

````yaml POST /payments
openapi: 3.1.0
info:
  title: Lago API documentation
  description: >-
    Lago API allows your application to push customer information and metrics
    (events) from your application to the billing application.
  version: 1.46.0
  license:
    name: AGPLv3
    url: https://github.com/getlago/lago-openapi/blob/main/LICENSE
  contact:
    email: tech@getlago.com
servers:
  - url: https://api.getlago.com/api/v1
    description: US Lago cluster
  - url: https://api.eu.getlago.com/api/v1
    description: EU Lago cluster
security:
  - bearerAuth: []
tags:
  - name: activity_logs
    description: Everything about Activity logs
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/audit-logs/activity-logs-object
  - name: analytics
    description: Everything about Analytics
  - name: api_logs
    description: Everything about API logs
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/audit-logs/api-logs-object
  - name: billable_metrics
    description: Everything about Billable metric collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/billable-metrics/object
  - name: features
    description: Everything about Feature collection
    externalDocs:
      description: Find out more
      url: >-
        https://getlago.com/docs/api-reference/entitlements/features/feature-object
  - name: entitlements
    description: Everything about Entitlement collection
    externalDocs:
      description: Find out more
      url: >-
        https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object
  - name: billing_entities
    description: Everything about Billing Entities
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/billing-entities/object
  - name: customers
    description: Everything about Customer collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/customers/object
  - name: plans
    description: Everything about Plan collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/plans/object
  - name: subscriptions
    description: Everything about Subscription collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/subscriptions/subscription-object
  - name: events
    description: Everything about Event collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/events/event-object
  - name: organizations
    description: Everything about Organization collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/organizations/organization-object
  - name: taxes
    description: Everything about Tax collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/taxes/tax-object
  - name: coupons
    description: Everything about Coupon collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/coupons/coupon-object
  - name: add_ons
    description: Everything about Add-on collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/add-ons/add-on-object
  - name: fees
    description: Everything about Fees
    externalDocs:
      description: Find out more
      url: >-
        https://getlago.com/docs/api-reference/invoices/invoice-object#fee-object
  - name: invoices
    description: Everything about Invoice collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/invoices/invoice-object
  - name: wallets
    description: Everything about Wallet collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/wallets/wallet-object
  - name: credit_notes
    description: Everything about Credit notes collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/credit-notes/credit-note-object
  - name: webhooks
    description: Everything about Webhooks
    externalDocs:
      description: Find out more
      url: >-
        https://getlago.com/docs/api-reference/webhooks/format---signature#1-retrieve-the-public-key
  - name: webhook_endpoints
    description: Everything about Webhook Endpoints
    externalDocs:
      description: Find out more
      url: >-
        https://getlago.com/docs/api-reference/webhook-endpoints/webhook-endpoint-object
  - name: payment_receipts
    description: Everything about Payment receipts
    externalDocs:
      description: Find out more
      url: >-
        https://getlago.com/docs/api-reference/payment-receipts/payment-receipt-object
  - name: payment_requests
    description: Everything about PaymentRequests
    externalDocs:
      description: Find out more
      url: >-
        https://getlago.com/docs/api-reference/payment-requests/payment-request-object
  - name: payments
    description: Everything about Payments
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/payments/payment-object
  - name: payment_methods
    description: Everything about Payment Methods
    externalDocs:
      description: Find out more
      url: >-
        https://getlago.com/docs/api-reference/payment-methods/payment-method-object
externalDocs:
  description: Lago Github
  url: https://github.com/getlago
paths:
  /payments:
    post:
      tags:
        - payments
      summary: Create a payment
      description: This endpoint is used to create a manual payment
      operationId: createPayment
      requestBody:
        description: Payment payload
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentCreateInput'
        required: true
      responses:
        '200':
          description: Payment created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payment'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
components:
  schemas:
    PaymentCreateInput:
      type: object
      required:
        - payment
      properties:
        payment:
          type: object
          required:
            - invoice_id
            - amount_cents
            - reference
          properties:
            invoice_id:
              type: string
              example: 486b147a-02a1-4ccf-8603-f3541fc25e7a
              description: Unique identifier assigned to the invoice
            amount_cents:
              type: integer
              example: 100
              description: The payment amount in cents
            reference:
              type: string
              example: ref1
              description: Reference for the payment
            paid_at:
              type: string
              format: date
              example: '2025-02-20'
              description: The date the payment was made
    Payment:
      type: object
      required:
        - payment
      properties:
        payment:
          $ref: '#/components/schemas/PaymentObject'
    PaymentObject:
      type: object
      required:
        - lago_id
        - lago_customer_id
        - external_customer_id
        - invoice_ids
        - lago_payable_id
        - payable_type
        - amount_cents
        - amount_currency
        - status
        - payment_status
        - type
        - reference
        - payment_provider_code
        - payment_provider_type
        - external_payment_id
        - provider_payment_id
        - provider_customer_id
        - next_action
        - created_at
      properties:
        lago_id:
          type: string
          format: uuid
          description: The unique identifier of the payment, created by Lago.
          example: 4cf085a7-c196-4f07-a543-97c50ec6e8b2
        lago_customer_id:
          type: string
          format: uuid
          description: Unique identifier of the customer, created by Lago.
          example: 1a901a90-1a90-1a90-1a90-1a901a901a90
        external_customer_id:
          type: string
          description: >-
            The customer external unique identifier (provided by your own
            application)
          example: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba
        invoice_ids:
          type: array
          description: List of invoice IDs associated with the payment.
          items:
            type: string
            format: uuid
            example: 486b147a-02a1-4ccf-8603-f3541fc25e7a
        invoice_numbers:
          type: array
          description: List of invoice numbers associated with the payment.
          items:
            type: string
            example: HOO-202D-005-001
        lago_payable_id:
          type: string
          format: uuid
          description: The unique identifier of the paid resource, created by Lago.
          example: 1a901a90-1a90-1a90-1a90-1a901a901a90
        payable_type:
          type: string
          enum:
            - Invoice
            - PaymentRequest
          description: >-
            The type of the paid resource, associated with the
            `lago_payable_id`.
          example: Invoice
        amount_cents:
          type: integer
          description: The amount of the payment in cents.
          example: 1099
        amount_currency:
          $ref: '#/components/schemas/Currency'
          description: The currency of the payment amount.
          example: USD
        status:
          type: string
          description: >-
            The status of the payment within the payment provider. This can be
            very different from a payment provider to another.
          example: Completed
        payment_status:
          type: string
          description: The normalized payment status by Lago.
          enum:
            - succeeded
            - failed
            - pending
            - processing
          example: succeeded
        type:
          type: string
          description: The type of payment.
          enum:
            - manual
            - provider
          example: manual
        reference:
          type: string
          description: Reference for the payment.
          example: ref1
        payment_provider_code:
          type: string
          description: Code of the payment provider
          example: stripe_prod
        payment_provider_type:
          type: string
          enum:
            - adyen
            - cashfree
            - gocardless
            - stripe
            - flutterwave
            - moneyhash
          description: The type of payment provider
          example: stripe
        external_payment_id:
          type:
            - string
            - 'null'
          description: 'DEPRECATED: use provider_payment_id'
        provider_payment_id:
          type:
            - string
            - 'null'
          description: >-
            Unique identifier of the payment within the payment provider (if
            applicable).
          example: pi_5eb0285741bc6ba
        provider_customer_id:
          type: string
          description: Unique identifier of the customer within the payment provider
          example: cus_5eb0285bcf941bc6ba
        payment_method_id:
          type:
            - string
            - 'null'
          format: uuid
          description: The unique identifier of the payment method used for this payment.
          example: 1a901a90-1a90-1a90-1a90-1a901a901a90
        next_action:
          type: object
          additionalProperties: true
          description: >-
            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.
          example:
            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:
          type: string
          format: date-time
          description: >-
            Timestamp when the payment was created in Lago's database, not on
            the payment provider.
          example: '2025-01-21T00:10:29Z'
    ApiErrorBadRequest:
      type: object
      required:
        - status
        - error
      properties:
        status:
          type: integer
          format: int32
          example: 400
        error:
          type: string
          example: Bad request
    ApiErrorUnauthorized:
      type: object
      required:
        - status
        - error
      properties:
        status:
          type: integer
          format: int32
          example: 401
        error:
          type: string
          example: Unauthorized
    ApiErrorUnprocessableEntity:
      type: object
      required:
        - status
        - error
        - code
        - error_details
      properties:
        status:
          type: integer
          format: int32
          example: 422
        error:
          type: string
          example: Unprocessable entity
        code:
          type: string
          example: validation_errors
        error_details:
          type: object
    Currency:
      type: string
      example: USD
      enum:
        - 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
  responses:
    BadRequest:
      description: Bad Request error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorBadRequest'
    Unauthorized:
      description: Unauthorized error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorUnauthorized'
    UnprocessableEntity:
      description: Unprocessable entity error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorUnprocessableEntity'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````