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

# Send a payment request

> Send an order details message with a **Review and pay** button. Amounts are paise. See the [payments guide](/guides/payments-india).

**Required scope:** `messages:send`



## OpenAPI

````yaml /api-reference/openapi.json post /v1/payments
openapi: 3.1.0
info:
  title: LazyApp API
  version: v1
  description: >-
    One WhatsApp API for developers, SaaS platforms and businesses.


    Every endpoint is Bearer-authenticated with a LazyApp API key, returns JSON,
    and is scoped to the workspace and mode (`live` or `test`) the key belongs
    to.


    Live keys need the Pro plan. A live key on a workspace below Pro gets `402`
    with `code: plan_limit_reached` on every request. Test keys work on every
    plan, so you can build against the test number before you upgrade.


    LazyApp adds 0% to Meta's message rates. Meta bills each message to the
    business's own Meta payment method; your LazyApp plan is billed separately.
  contact:
    name: LazyApp support
    url: https://lazyapp.in
servers:
  - url: https://lazyapp.in
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Messages
    description: Send and schedule WhatsApp messages.
  - name: Contacts
    description: The people you message, and their identifiers.
  - name: Conversations
    description: Threads and their message history.
  - name: Calls
    description: WhatsApp call history for the workspace.
  - name: Templates
    description: Create, submit and sync message templates.
  - name: Media
    description: Upload, retrieve and delete media.
  - name: Broadcasts
    description: Template sends to many contacts at once.
  - name: Events
    description: Say what happened; LazyApp picks the template.
  - name: Flows
    description: WhatsApp Flows and their responses.
  - name: Webhooks
    description: Register endpoints and inspect deliveries.
  - name: Workflows
    description: Automations and their executions.
  - name: Verify
    description: One-time passcodes over WhatsApp.
  - name: Capabilities
    description: What each connected number supports.
  - name: Catalog
    description: Proxy Meta Commerce catalog products for a connection.
  - name: Platform
    description: Manage customers if you run a platform on LazyApp.
  - name: Meta-compatible proxy
    description: Drop-in endpoints for existing Cloud API integrations.
  - name: Connections
    description: >-
      Your WhatsApp numbers and the account behind them: health, limits,
      registration, display name, blue tick, QR codes, conversation starters,
      opt-in links, business profile and blocked users.
  - name: Billing
    description: >-
      Meta's message rates, which LazyApp passes on with 0% added, and the
      billing facts behind them.
  - name: Analytics
    description: Workspace messaging aggregates.
  - name: Groups
    description: WhatsApp group chats on a connection Meta has enabled.
  - name: Funding
    description: Local funding status and recorded WhatsApp charges.
  - name: Connections
    description: 'WhatsApp connections: block users, business profile, insights.'
  - name: Payments
    description: >-
      WhatsApp payments in India: ask for payment, follow it, update the order
      and refund.
paths:
  /v1/payments:
    post:
      tags:
        - Payments
      summary: Send a payment request
      description: >-
        Send an order details message with a **Review and pay** button. Amounts
        are paise. See the [payments guide](/guides/payments-india).


        **Required scope:** `messages:send`
      parameters:
        - name: Idempotency-Key
          in: header
          description: >-
            Optional. Makes this write safe to retry: the same key replays the
            first response instead of acting twice.
          schema:
            type: string
            maxLength: 255
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendPaymentRequest'
      responses:
        '201':
          description: The payment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentOrder'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: >-
            Payment required. Branch on `code`:


            - `plan_limit_reached`: a live key on a workspace below Pro. Test
            keys never get this.

            - `insufficient_credits`: the workspace's monthly spending limit is
            reached, or the number is one LazyApp pays Meta for and its credit
            cannot cover a send Meta charges for.

            - `service_credits_exhausted`: the number is one LazyApp pays Meta
            for, and service replies are paused until credit is added.


            On a number you fund yourself, Meta bills your own Meta payment
            method and LazyApp adds nothing, so only `plan_limit_reached` and
            the spending limit apply.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommerceError'
        '403':
          description: >-
            The key lacks the required scope, or is restricted from this phone
            number.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            Validation failed, or WhatsApp refused the request. WhatsApp
            refusals carry `code` and `retryable`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommerceError'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: WhatsApp or the payment gateway failed in a way worth retrying.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommerceError'
components:
  schemas:
    SendPaymentRequest:
      type: object
      required:
        - to
        - body
        - items
        - payment
      properties:
        to:
          type: string
          examples:
            - '+919812345670'
        phone_number_id:
          type: string
        reference_id:
          type: string
          maxLength: 35
          pattern: ^[A-Za-z0-9_.\-]+$
        body:
          type: string
          maxLength: 1024
        footer:
          type: string
          maxLength: 60
        header_image_url:
          type: string
          format: uri
        goods_type:
          type: string
          enum:
            - digital-goods
            - physical-goods
        catalog_id:
          type: string
        expires_in_minutes:
          type: integer
          minimum: 5
          maximum: 43200
        expiry_description:
          type: string
          maxLength: 120
        items:
          type: array
          minItems: 1
          maxItems: 999
          items:
            type: object
            required:
              - name
              - amount
              - quantity
            properties:
              name:
                type: string
                maxLength: 60
              amount:
                type: integer
                description: Paise.
                minimum: 1
              sale_amount:
                type: integer
                description: Paise.
                minimum: 1
              quantity:
                type: integer
                minimum: 1
                maximum: 10000
              retailer_id:
                type: string
                maxLength: 100
              image_url:
                type: string
                format: uri
              country_of_origin:
                type: string
              importer_name:
                type: string
              importer_address:
                type: object
        importer:
          type: object
          description: Required by WhatsApp for physical goods that are not from a catalog.
          properties:
            name:
              type: string
            country_of_origin:
              type: string
            address:
              type: object
              properties:
                address_line1:
                  type: string
                address_line2:
                  type: string
                city:
                  type: string
                zone_code:
                  type: string
                postal_code:
                  type: string
                country_code:
                  type: string
        beneficiary:
          type: object
          properties:
            name:
              type: string
            address_line1:
              type: string
            address_line2:
              type: string
            city:
              type: string
            state:
              type: string
            postal_code:
              type: string
        tax:
          type: object
          properties:
            amount:
              type: integer
              description: Paise.
            description:
              type: string
              maxLength: 60
        shipping:
          type: object
          properties:
            amount:
              type: integer
              description: Paise.
            description:
              type: string
              maxLength: 60
        discount:
          type: object
          properties:
            amount:
              type: integer
              description: Paise.
            description:
              type: string
              maxLength: 60
            program_name:
              type: string
        payment:
          type: object
          required:
            - method
          properties:
            method:
              type: string
              enum:
                - payment_gateway
                - upi_intent_link
                - payment_link
            configuration:
              type: string
              description: Payment setup name.
            gateway_account:
              type: string
              format: uuid
              description: LazyApp creates the UPI intent or payment link with these keys.
            upi_intent_link:
              type: string
              description: Your own `upi://pay?…` link.
            payment_link:
              type: string
              format: uri
            success_url:
              type: string
              format: uri
            cancel_url:
              type: string
              format: uri
            preferred_upi_app:
              type: string
              enum:
                - gpay
                - phonepe
                - paytm
                - bhim
                - amazonpay
                - cred
                - mobikwik
            enabled_payment_options:
              type: array
              items:
                type: string
                enum:
                  - upi
                  - web
            gateway_fields:
              type: object
              description: >-
                Gateway extras: `receipt`, `notes`, `udf1`–`udf4`,
                `extra1`–`extra2`, `additional_info1`–`7`.
        template:
          type: object
          description: Send as a template, to reach contacts outside the 24-hour window.
          properties:
            name:
              type: string
            language:
              type: string
            category:
              type: string
              enum:
                - utility
                - marketing
            button_index:
              type: integer
            style:
              type: string
              enum:
                - order_details
                - link_button
              description: >-
                `link_button` fills a dynamic URL button with the payment link
                (Enhanced Payment Links).
            components:
              type: array
              items:
                type: object
        metadata:
          type: object
    PaymentOrder:
      type: object
      properties:
        id:
          type: string
          format: uuid
        reference_id:
          type: string
        to:
          type: string
        status:
          type: string
          enum:
            - pending
            - processing
            - partially_shipped
            - shipped
            - completed
            - canceled
        status_label:
          type: string
        payment_status:
          type: string
          enum:
            - pending
            - captured
            - failed
            - partially_refunded
            - refunded
        payment_status_label:
          type: string
        payment_method:
          type: string
          enum:
            - payment_gateway
            - upi_intent_link
            - payment_link
        gateway:
          type:
            - string
            - 'null'
        payment_configuration:
          type:
            - string
            - 'null'
        payment_link:
          type:
            - string
            - 'null'
        currency:
          type: string
          examples:
            - INR
        total_amount:
          type: integer
          description: Paise.
        amount_paid:
          type: integer
          description: Paise.
        amount_refunded:
          type: integer
          description: Paise.
        paid_with:
          type:
            - string
            - 'null'
          description: How the contact paid, e.g. `upi`.
        goods_type:
          type: string
        order:
          type: object
          description: The items and totals as sent to WhatsApp.
        transactions:
          type: array
          items:
            type: object
        refunds:
          type: array
          items:
            type: object
        last_error:
          type:
            - string
            - 'null'
        message_id:
          type:
            - string
            - 'null'
          format: uuid
        phone_number_id:
          type:
            - string
            - 'null'
        metadata:
          type:
            - object
            - 'null'
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
        paid_at:
          type:
            - string
            - 'null'
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        message:
          type: string
          description: Human-readable description of what went wrong.
        code:
          type: string
          description: >-
            Stable machine-readable reason, when the failure is one a client can
            branch on.
      required:
        - message
    CommerceError:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          description: One plain sentence to show to a person.
        code:
          type: string
          description: WhatsApp's error code as `provider_<code>`, when it sent one.
          examples:
            - provider_134011
        retryable:
          type: boolean
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Your API key, e.g. `sk_live_...` or `sk_test_...`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.