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

# Create a payment

> Open a new payment for the given amount and currency. The response includes a hosted checkout URL you can redirect your customer to.



## OpenAPI

````yaml https://prod-payments-api.forebit.io/openapi.json post /v1/businesses/{businessId}/payments
openapi: 3.0.1
info:
  title: Forebit API
  description: >-
    Accept crypto payments across Bitcoin, Ethereum, Tron, and other networks.
    Create payments, manage businesses, and track transactions through a single
    unified interface.
  termsOfService: https://forebit.io/terms
  contact:
    name: Forebit Team
    email: support@forebit.io
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: v1.0.0
servers:
  - url: https://prod-payments-api.forebit.io/
security:
  - Bearer: []
tags:
  - name: Payments
    description: Create, list, and inspect crypto payments for a business.
  - name: Payments
    description: Payments
paths:
  /v1/businesses/{businessId}/payments:
    post:
      tags:
        - Payments
      summary: Create a payment
      description: >-
        Open a new payment for the given amount and currency. The response
        includes a hosted checkout URL you can redirect your customer to.
      operationId: CreatePayment
      parameters:
        - name: businessId
          in: path
          description: The target business ID.
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: Amount, currency, payment methods, and optional metadata.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePaymentRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/CreatePaymentRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CreatePaymentRequest'
      responses:
        '200':
          description: Payment created. Redirect the customer to the returned URL.
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/BaseResponseOfCreatePaymentResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponseOfCreatePaymentResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/BaseResponseOfCreatePaymentResponse'
        '400':
          description: Request body failed validation.
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Missing or invalid authentication token.
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Insufficient permissions for this business.
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    CreatePaymentRequest:
      required:
        - amount
        - currency
      type: object
      properties:
        name:
          type: string
          description: Display name shown to the customer on the checkout page.
          nullable: true
        description:
          type: string
          description: Internal description. Not visible to customers.
          nullable: true
        currency:
          minLength: 1
          type: string
          description: ISO 4217 currency code (e.g. `USD`, `EUR`).
        amount:
          minimum: 0.5
          type: number
          description: Payment amount in the specified currency. Minimum 0.50.
          format: double
        paymentMethods:
          type: object
          properties:
            FOREBIT_CRYPTO:
              type: array
              items:
                type: string
            CONTRACT_CRYPTO:
              type: array
              items:
                type: string
            CONTRACT_TRX:
              type: array
              items:
                type: string
            NONE:
              type: array
              items:
                type: string
          additionalProperties: false
          description: >-
            Restrict which payment methods the customer can choose. Omit to
            allow every method enabled on your business.
          nullable: true
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Arbitrary key-value pairs stored with the payment. Use this for your
            own order IDs or reference data.
          nullable: true
        customerEmail:
          type: string
          description: >-
            Customer email for receipts and status updates. When omitted, the
            checkout page collects it.
          format: email
          nullable: true
        customerIp:
          type: string
          description: >-
            Customer IP address. Auto-detected from the first checkout page
            visit when omitted.
          nullable: true
        customerUserAgent:
          type: string
          description: >-
            Customer user-agent string. Auto-detected from the first checkout
            page visit when omitted.
          nullable: true
        redirectUrl:
          type: string
          description: >-
            Post-payment redirect URL. Falls back to the default URL configured
            on your business.
          format: uri
          nullable: true
        notifyUrl:
          type: string
          description: >-
            Webhook URL for this payment. Delivers events independently of your
            global webhook settings.
          nullable: true
        feeTransfers:
          type: array
          items:
            $ref: '#/components/schemas/FeeTransferRequest'
          nullable: true
      additionalProperties: false
    BaseResponseOfCreatePaymentResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/CreatePaymentResponse'
        message:
          type: string
          nullable: true
        errors:
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    FeeTransferRequest:
      type: object
      properties:
        businessId:
          type: integer
          format: int64
        baseAmount:
          type: number
          format: double
        includeInCustomerCoverProcessingFees:
          type: boolean
        overrideAmounts:
          type: object
          properties:
            FOREBIT_CRYPTO:
              type: object
              additionalProperties:
                type: number
                format: double
            CONTRACT_CRYPTO:
              type: object
              additionalProperties:
                type: number
                format: double
            CONTRACT_TRX:
              type: object
              additionalProperties:
                type: number
                format: double
            NONE:
              type: object
              additionalProperties:
                type: number
                format: double
          additionalProperties: false
          nullable: true
      additionalProperties: false
    CreatePaymentResponse:
      type: object
      properties:
        url:
          type: string
          nullable: true
        id:
          type: string
          format: uuid
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: http
      description: Pass your JWT token in the Authorization header as a Bearer token.
      scheme: bearer
      bearerFormat: JWT

````