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

# Initiate payment

> Initiate a payment transaction with the provided details.



## OpenAPI

````yaml POST /initiate-payment
openapi: 3.0.3
info:
  title: Tili Mothership
  description: This is the API documentation for the Tili Payment Gateway service.
  contact:
    name: Support Team
    email: support@tilipayments.com
  version: 1.0.0
servers:
  - url: https://staging.tilipayments.com/api
    description: Tili Payments Staging
security: []
tags:
  - name: Languages
    description: Operations related to supported languages
  - name: Payments
    description: Operations related to payment transactions
paths:
  /initiate-payment:
    post:
      tags:
        - Payments
      summary: Initiate Payment
      description: Initiate a payment transaction with the provided details.
      operationId: initiatePayment
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/initiatepayment_body'
            examples:
              Initiate Payment Example:
                value:
                  amount: 10
                  currency_code: EUR
                  customer:
                    name: John Doe
                    email: john@doe.com
                    address: 123 Main Street
                    city: Metropolis
                    country_code: USA
                    zip_code: '10001'
                  language: en
                  line_items:
                    - price: 10
                      product_name: Wireless Bluetooth Headphones
                      quantity: 1
                  order_reference: ORDER-1
                  settings:
                    cancel_url_override: https://yourpage.com/cancel_url
                    language: en
                    success_url_override: https://yourpage.com/success_url
        required: true
      responses:
        '200':
          description: Payment link generated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_200_1'
              examples:
                Payment Link Example:
                  value:
                    reference: pmt-48f2ab76ee3db579
                    redirect_url: >-
                      https://staging.tilipayments.com/payment/pmt-48f2ab76ee3db579
        '400':
          description: Bad request, validation error.
        '500':
          description: Internal server error
      security:
        - bearerAuth: []
components:
  schemas:
    initiatepayment_body:
      required:
        - amount
        - currency_code
        - customer
        - line_items
        - order_reference
      type: object
      properties:
        amount:
          type: number
          example: 10
        currency_code:
          type: string
          example: EUR
        customer:
          $ref: '#/components/schemas/initiatepayment_customer'
        language:
          type: string
          example: en
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/initiatepayment_line_items'
        order_reference:
          type: string
          example: ORDER-1
        settings:
          $ref: '#/components/schemas/initiatepayment_settings'
    inline_response_200_1:
      type: object
      properties:
        reference:
          type: string
          example: pmt-48f2ab76ee3db579
        redirect_url:
          type: string
          example: https://staging.tilipayments.com/payment/pmt-48f2ab76ee3db579
    initiatepayment_customer:
      required:
        - address
        - city
        - country_code
        - email
        - name
        - zip_code
      type: object
      properties:
        name:
          type: string
          example: John Doe
        email:
          type: string
          example: john@doe.com
        address:
          type: string
          example: 123 Main Street
        city:
          type: string
          example: Metropolis
        country_code:
          type: string
          example: USA
        zip_code:
          type: string
          example: '10001'
    initiatepayment_line_items:
      required:
        - price
        - product_name
        - quantity
      type: object
      properties:
        price:
          type: number
          example: 10
        product_name:
          type: string
          example: Wireless Bluetooth Headphones
        quantity:
          type: number
          example: 1
    initiatepayment_settings:
      type: object
      properties:
        cancel_url_override:
          type: string
          example: https://yourpage.com/cancel_url
        language:
          type: string
          example: en
        success_url_override:
          type: string
          example: https://yourpage.com/success_url
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````