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

# Create a payment session

> Initialise a payment session for onramp, offramp, or payout. Returns a reference the customer can use to complete payment.



## OpenAPI

````yaml /openapi.json post /api/v1/payment-sessions
openapi: 3.0.0
info:
  title: Dexxify API
  description: >-
    Crypto Infrastructure API for Africa (Wallets, Payouts, Offramp, Onramp,
    KYC, KYB)
  version: '1.0'
  contact:
    name: Dexxify
    url: https://www.dexxify.com
    email: dexxifyhq@gmail.com
servers: []
security: []
tags: []
paths:
  /api/v1/payment-sessions:
    post:
      tags:
        - Payment Sessions
      summary: Create a payment session
      description: >-
        Initialise a payment session for onramp, offramp, or payout. Returns a
        reference the customer can use to complete payment.
      operationId: PaymentSessionsController_create
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePaymentSessionDto'
      responses:
        '201':
          description: Payment session created successfully.
        '400':
          description: Validation failed or the request body/params were malformed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '401':
          description: Missing, invalid, or expired authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
      security:
        - api-key: []
components:
  schemas:
    CreatePaymentSessionDto:
      type: object
      properties:
        amount:
          type: number
          description: Amount in the given currency
          example: 50000
        currency:
          type: string
          description: ISO currency code
          example: NGN
        title:
          type: string
          description: Session title shown on the checkout page
          example: 'Payment for Order #1234'
        description:
          type: string
          description: Session description shown on the checkout page
          example: Complete your order payment
        crypto_asset:
          type: string
          description: Crypto asset (locks asset for this session)
          enum:
            - BTC
            - TRX
            - BNB
            - TON
            - USDT
            - ETH
            - USDC
            - SOL
        network:
          type: string
          description: Blockchain network (locks chain for this session)
          enum:
            - Bitcoin
            - Binance_Smart_Chain
            - Ethereum
            - Solana
            - Tron
            - Base
            - Arbitrum
            - TON
        customer_email:
          type: string
          description: Customer email to link this session to
          example: hansen@gmail.com
        first_name:
          type: string
          description: Customer first name
          example: Billy
        last_name:
          type: string
          description: Customer last name
          example: James
        expires_in_minutes:
          type: number
          description: 'Minutes until this session expires (default: 30)'
          example: 30
        success_url:
          type: string
          description: Redirect URL on successful payment
        cancel_url:
          type: string
          description: Redirect URL on cancelled payment
        metadata:
          type: object
          description: Arbitrary key-value data
          example:
            order_id: ord_xyz
      required:
        - amount
        - currency
    ErrorResponseDto:
      type: object
      properties:
        success:
          type: boolean
          example: false
        status:
          type: number
          example: 400
        message:
          type: string
          example: Validation failed.
        errors:
          type: object
          example:
            - amount must not be less than 0
        timestamp:
          type: string
          example: '2026-09-17T12:00:00.000Z'
      required:
        - success
        - status
        - message
        - timestamp
  securitySchemes:
    api-key:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: API key for /api/v1/* endpoints

````