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

# Create a payment intent



## OpenAPI

````yaml /openapi.json post /v1/payments
openapi: 3.0.3
info:
  title: Modem Pay API
  description: Modem Pay public API for payments, transfers, customers, and transactions.
  version: 1.0.0
servers:
  - url: https://api.modempay.com
security:
  - BearerAuth: []
paths:
  /v1/payments:
    post:
      summary: Create a payment intent
      operationId: createPaymentIntent
      parameters:
        - name: X-No-Effect
          in: header
          schema:
            type: boolean
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - data
              properties:
                data:
                  type: object
                  required:
                    - amount
                  properties:
                    amount:
                      type: number
                      example: 450
                    currency:
                      type: string
                      example: GMD
                    return_url:
                      type: string
                      format: uri
                    cancel_url:
                      type: string
                      format: uri
                    callback_url:
                      type: string
                      format: uri
                    network:
                      type: string
                      example: afrimoney
                    account_number:
                      type: string
                    skip_url_validation:
                      type: boolean
                      default: false
                    metadata:
                      type: object
                      additionalProperties: true
      responses:
        '201':
          description: Payment intent created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentIntent'
components:
  schemas:
    PaymentIntent:
      type: object
      properties:
        payment_intent_id:
          type: string
          format: uuid
        intent_secret:
          type: string
        payment_link:
          type: string
          format: uri
        amount:
          type: number
        transaction_fee:
          type: number
        transaction_fee_type:
          type: string
        currency:
          type: string
        expires_at:
          type: string
          format: date-time
        status:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Use your Modem Pay secret key.

        - **Test environment:** Use your `sk_test_...` key.

        - **Production environment:** Only use `sk_live_...` on your personal,
        secure machine. Do NOT share or commit your production keys.

````