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

# Create payment

> Creates a payment link. You need to provide the amount and the currency of the payment in the request.



## OpenAPI

````yaml POST /v1/payment
openapi: 3.0.2
info:
  title: Bitnbox API
  version: 0.1.0
  contact:
    name: Bitnbox
    url: https://bitnbox.io
    email: support@bitnbox.com
servers:
  - url: https://api.bitnbox.io
security:
  - ApiKeyAuth: []
paths:
  /v1/payment:
    post:
      tags:
        - v1
      summary: Create payment
      description: >-
        Creates a payment link. You need to provide the amount and the currency
        of the payment in the request.
      operationId: apiCreatePayment
      parameters: []
      requestBody:
        description: Body
        content:
          application/json:
            schema:
              type: object
              properties:
                amount:
                  type: number
                  minimum: 0
                  exclusiveMinimum: false
                  description: Amount in cryptocurrency
                platformFeeByUser:
                  type: boolean
                currency:
                  type: string
                  minLength: 1
                  description: Cryptocurrency type (btc, usdt, eth, etc)
                network:
                  type: string
                  description: Cryptocurrency network
                customerId:
                  type: string
                  minLength: 1
                  description: Customer ID (for security)
                customerIp:
                  type: string
                  minLength: 1
                  description: Customer IP address (for security)
                orderId:
                  type: string
                  description: Order id
                additionalData:
                  type: string
                  description: Additional data
                webhookUrl:
                  type: string
                  description: Webhook address
              required:
                - amount
                - platformFeeByUser
                - currency
                - network
                - customerId
                - customerIp
                - orderId
              description: Payment creation request body
      responses:
        '201':
          description: '201'
          content:
            application/json:
              schema:
                type: object
                properties:
                  paymentId:
                    type: string
                    format: uuid
                    description: Unique payment identifier
                  status:
                    type: string
                    enum:
                      - waiting
                      - confirming
                      - failed
                      - locked
                      - rejected
                      - expired
                      - paid
                      - paid_over
                      - paid_partial
                    description: Payment status
                  payAmount:
                    type: number
                    description: Crypto AMOUNT+PERCENT
                  payAddress:
                    type: string
                    description: Payment address
                  payQrCodeUri:
                    type: string
                    description: URI for payment QR code
                  currency:
                    type: string
                    minLength: 1
                    description: Cryptocurrency type (btc, usdt, eth, etc)
                  network:
                    type: string
                    description: Cryptocurrency network (e.g., erc20)
                  customerId:
                    type: string
                    minLength: 1
                    description: Customer ID (for security)
                  customerIp:
                    type: string
                    minLength: 1
                    description: Customer IP address (for security)
                  orderId:
                    type: string
                    description: Order id
                  additionalData:
                    type: string
                    description: Additional data
                  platformFeeByUser:
                    type: boolean
                    description: Fee by user/merchant
                  createdAt:
                    type: string
                    format: date-time
                    description: Date of creation
                  updatedAt:
                    type: string
                    format: date-time
                    description: Date of update
                  expiredAt:
                    type: string
                    format: date-time
                    description: Date of expire
                  webhookUrl:
                    type: string
                    format: uri
                    description: Webhook url
                required:
                  - paymentId
                  - status
                  - payAmount
                  - payAddress
                  - payQrCodeUri
                  - currency
                  - network
                  - customerId
                  - customerIp
                  - orderId
                  - platformFeeByUser
                  - createdAt
                  - updatedAt
                  - expiredAt
                  - webhookUrl
                description: Payment link creation successful
        '500':
          description: '500'
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Error code
                  message:
                    type: string
                    description: Error message
                required:
                  - code
                  - message
                description: Server error response
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````