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

# Create payment

> Creates a generic developer payment request. This endpoint does not create fulfillable product delivery. Use `/dev/v1/orders` when you need product line items and Shoppex fulfillment. If `webhook` is provided, the response includes `webhook_secret` once; use it to verify the `order:paid` callback for this specific payment/invoice after the payment reaches `COMPLETED`. For `gateway=AUTHORIZENET`, Shoppex also creates the provider session and returns `checkout_url` plus `session_id` so the payment can complete automatically through the provider webhook flow. For merchant crypto providers (`OXAPAY`, `CRYPTOMUS`, `NOWPAYMENTS`), pass `crypto_gateway` to return a hosted checkout URL that opens the concrete coin or network directly. Native crypto uses the shop's non-custodial wallet when `crypto_gateway=BITCOIN|LITECOIN|USDT_TRC20|SOLANA|USDT_SOL|USDC_SOL` is requested and a native wallet is active for that chain; send `gateway=NATIVE_CRYPTO` to require that path and fail if it is not configured. Sending `crypto_gateway` without `gateway` starts a crypto session on the shop's active native wallet or connected crypto provider and fails when neither is configured. Unsupported gateway values return a validation error and never fall back to another provider. All crypto payments use the shop's own accounts; Shoppex-managed white-label crypto has been removed.



## OpenAPI

````yaml /openapi.json post /dev/v1/payments
openapi: 3.0.3
info:
  title: Shoppex Developer API
  description: Mintlify-compatible Developer API reference for Shoppex.
  version: 1.0.0
  contact:
    name: Shoppex Support
    email: support@shoppex.io
    url: https://shoppex.io
servers:
  - url: https://api.shoppex.io
security:
  - bearerAuth: []
paths:
  /dev/v1/payments:
    post:
      tags:
        - Payments
      summary: Create payment
      description: >-
        Creates a generic developer payment request. This endpoint does not
        create fulfillable product delivery. Use `/dev/v1/orders` when you need
        product line items and Shoppex fulfillment. If `webhook` is provided,
        the response includes `webhook_secret` once; use it to verify the
        `order:paid` callback for this specific payment/invoice after the
        payment reaches `COMPLETED`. For `gateway=AUTHORIZENET`, Shoppex also
        creates the provider session and returns `checkout_url` plus
        `session_id` so the payment can complete automatically through the
        provider webhook flow. For merchant crypto providers (`OXAPAY`,
        `CRYPTOMUS`, `NOWPAYMENTS`), pass `crypto_gateway` to return a hosted
        checkout URL that opens the concrete coin or network directly. Native
        crypto uses the shop's non-custodial wallet when
        `crypto_gateway=BITCOIN|LITECOIN|USDT_TRC20|SOLANA|USDT_SOL|USDC_SOL` is
        requested and a native wallet is active for that chain; send
        `gateway=NATIVE_CRYPTO` to require that path and fail if it is not
        configured. Sending `crypto_gateway` without `gateway` starts a crypto
        session on the shop's active native wallet or connected crypto provider
        and fails when neither is configured. Unsupported gateway values return
        a validation error and never fall back to another provider. All crypto
        payments use the shop's own accounts; Shoppex-managed white-label crypto
        has been removed.
      operationId: postDevV1Payments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - title
                - email
                - value
                - currency
              properties:
                title:
                  type: string
                  minLength: 1
                  maxLength: 128
                email:
                  type: string
                  format: email
                value:
                  type: number
                  minimum: 0.01
                currency:
                  type: string
                  minLength: 3
                  maxLength: 3
                quantity:
                  type: number
                  minimum: 1
                gateway:
                  type: string
                crypto_gateway:
                  type: string
                cryptoGateway:
                  type: string
                gateways:
                  type: array
                  items:
                    type: string
                confirmations:
                  type: number
                  minimum: 1
                webhook:
                  type: string
                return_url:
                  type: string
                cancel_url:
                  type: string
                custom_fields:
                  type: array
                  items:
                    type: object
                    additionalProperties:
                      type: object
                      additionalProperties: true
                customFields:
                  type: array
                  items:
                    type: object
                    additionalProperties:
                      type: object
                      additionalProperties: true
                product_id:
                  type: string
                productId:
                  type: string
                items:
                  type: array
                  items:
                    type: object
                    additionalProperties:
                      type: object
                      additionalProperties: true
                cart:
                  type: string
                products:
                  type: array
                  items:
                    type: object
                    additionalProperties:
                      type: object
                      additionalProperties: true
                customer_id:
                  type: string
                fraud_shield:
                  type: object
                  properties:
                    ip:
                      type: string
                    user_agent:
                      type: string
                    user_language:
                      type: string
              example:
                title: Card Payment
                email: buyer@example.com
                value: 24.99
                currency: USD
                gateway: STRIPE
                return_url: https://app.example.com/payments/success
                cancel_url: https://app.example.com/payments/cancelled
                webhook: https://app.example.com/webhooks/payments
                white_label: false
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - title
                - email
                - value
                - currency
              properties:
                title:
                  type: string
                  minLength: 1
                  maxLength: 128
                email:
                  type: string
                  format: email
                value:
                  type: number
                  minimum: 0.01
                currency:
                  type: string
                  minLength: 3
                  maxLength: 3
                quantity:
                  type: number
                  minimum: 1
                gateway:
                  type: string
                crypto_gateway:
                  type: string
                cryptoGateway:
                  type: string
                gateways:
                  type: array
                  items:
                    type: string
                confirmations:
                  type: number
                  minimum: 1
                webhook:
                  type: string
                return_url:
                  type: string
                cancel_url:
                  type: string
                custom_fields:
                  type: array
                  items:
                    type: object
                    additionalProperties:
                      type: object
                      additionalProperties: true
                customFields:
                  type: array
                  items:
                    type: object
                    additionalProperties:
                      type: object
                      additionalProperties: true
                product_id:
                  type: string
                productId:
                  type: string
                items:
                  type: array
                  items:
                    type: object
                    additionalProperties:
                      type: object
                      additionalProperties: true
                cart:
                  type: string
                products:
                  type: array
                  items:
                    type: object
                    additionalProperties:
                      type: object
                      additionalProperties: true
                customer_id:
                  type: string
                fraud_shield:
                  type: object
                  properties:
                    ip:
                      type: string
                    user_agent:
                      type: string
                    user_language:
                      type: string
              example:
                title: Card Payment
                email: buyer@example.com
                value: 24.99
                currency: USD
                gateway: STRIPE
                return_url: https://app.example.com/payments/success
                cancel_url: https://app.example.com/payments/cancelled
                webhook: https://app.example.com/webhooks/payments
                white_label: false
          multipart/form-data:
            schema:
              type: object
              required:
                - title
                - email
                - value
                - currency
              properties:
                title:
                  type: string
                  minLength: 1
                  maxLength: 128
                email:
                  type: string
                  format: email
                value:
                  type: number
                  minimum: 0.01
                currency:
                  type: string
                  minLength: 3
                  maxLength: 3
                quantity:
                  type: number
                  minimum: 1
                gateway:
                  type: string
                crypto_gateway:
                  type: string
                cryptoGateway:
                  type: string
                gateways:
                  type: array
                  items:
                    type: string
                confirmations:
                  type: number
                  minimum: 1
                webhook:
                  type: string
                return_url:
                  type: string
                cancel_url:
                  type: string
                custom_fields:
                  type: array
                  items:
                    type: object
                    additionalProperties:
                      type: object
                      additionalProperties: true
                customFields:
                  type: array
                  items:
                    type: object
                    additionalProperties:
                      type: object
                      additionalProperties: true
                product_id:
                  type: string
                productId:
                  type: string
                items:
                  type: array
                  items:
                    type: object
                    additionalProperties:
                      type: object
                      additionalProperties: true
                cart:
                  type: string
                products:
                  type: array
                  items:
                    type: object
                    additionalProperties:
                      type: object
                      additionalProperties: true
                customer_id:
                  type: string
                fraud_shield:
                  type: object
                  properties:
                    ip:
                      type: string
                    user_agent:
                      type: string
                    user_language:
                      type: string
              example:
                title: Card Payment
                email: buyer@example.com
                value: 24.99
                currency: USD
                gateway: STRIPE
                return_url: https://app.example.com/payments/success
                cancel_url: https://app.example.com/payments/cancelled
                webhook: https://app.example.com/webhooks/payments
                white_label: false
      responses:
        '201':
          description: Response for status 201
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: object
                    required:
                      - id
                      - uniqid
                      - type
                      - shop_id
                      - customer_id
                      - currency
                      - gateway
                      - flow_type
                      - provider_reference
                      - provider_reference_type
                      - blockchain
                      - apm_method
                      - crypto_address
                      - crypto_amount
                      - crypto_received
                      - crypto_uri
                      - crypto_confirmations_needed
                      - crypto_payment_txid
                      - product_id
                      - product_title
                      - product_type
                      - variant_title
                      - quantity
                      - total
                      - total_display
                      - balance_paid_amount
                      - exchange_rate
                      - crypto_exchange_rate
                      - customer_email
                      - custom_fields
                      - is_developer_invoice
                      - developer_title
                      - developer_webhook
                      - developer_return_url
                      - developer_cancel_url
                      - status
                      - items
                      - created_at
                      - updated_at
                      - url
                      - url_branded
                    properties:
                      id:
                        type: string
                      uniqid:
                        type: string
                      type:
                        type: string
                      shop_id:
                        type: string
                      customer_id:
                        type: string
                        nullable: true
                      currency:
                        type: string
                      gateway:
                        type: string
                        nullable: true
                      flow_type:
                        type: string
                        nullable: true
                      provider_reference:
                        type: string
                        nullable: true
                      provider_reference_type:
                        type: string
                        nullable: true
                      blockchain:
                        type: string
                        nullable: true
                      apm_method:
                        type: string
                        nullable: true
                      crypto_gateway:
                        type: string
                      crypto_address:
                        type: string
                        nullable: true
                      crypto_amount:
                        type: number
                      crypto_received:
                        type: number
                      crypto_uri:
                        type: string
                        nullable: true
                      crypto_confirmations_needed:
                        type: number
                      crypto_payment_txid:
                        type: string
                        nullable: true
                      payment_id:
                        type: string
                      expires_at:
                        type: string
                      product_id:
                        type: string
                        nullable: true
                      product_title:
                        type: string
                        nullable: true
                      product_type:
                        type: string
                        nullable: true
                      variant_title:
                        type: string
                        nullable: true
                      quantity:
                        type: number
                      total:
                        type: number
                      total_display:
                        type: number
                      balance_paid_amount:
                        type: number
                      exchange_rate:
                        type: number
                      crypto_exchange_rate:
                        type: number
                      customer_email:
                        type: string
                        nullable: true
                      custom_fields:
                        type: object
                        nullable: true
                        additionalProperties:
                          type: object
                          additionalProperties: true
                      is_developer_invoice:
                        type: boolean
                      developer_title:
                        type: string
                        nullable: true
                      developer_webhook:
                        type: string
                        nullable: true
                      developer_return_url:
                        type: string
                        nullable: true
                      developer_cancel_url:
                        type: string
                        nullable: true
                      status:
                        type: string
                      items:
                        type: array
                        items:
                          type: object
                          required:
                            - product_id
                            - product_title
                            - product_type
                            - variant_title
                            - quantity
                            - unit_price
                            - total
                          properties:
                            product_id:
                              type: string
                              nullable: true
                            product_title:
                              type: string
                            product_type:
                              type: string
                            variant_title:
                              type: string
                              nullable: true
                            quantity:
                              type: number
                            unit_price:
                              type: number
                            total:
                              type: number
                          additionalProperties: true
                      created_at:
                        type: number
                      updated_at:
                        type: number
                      gateways:
                        type: array
                        items:
                          type: string
                      checkout_url:
                        type: string
                      session_id:
                        type: string
                      url:
                        type: string
                      url_branded:
                        type: string
                      webhook_secret:
                        type: string
                      warnings:
                        type: array
                        items:
                          type: object
                          required:
                            - code
                            - field
                            - message
                          properties:
                            code:
                              type: string
                              enum:
                                - subscription_checkout_mismatch
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                    additionalProperties: true
                additionalProperties: true
                example:
                  data:
                    uniqid: 33333333-3333-4333-8333-333333333333
                    url: >-
                      https://checkout.shoppex.io/invoice/33333333-3333-4333-8333-333333333333
                    url_branded: >-
                      https://pay.example.com/invoice/33333333-3333-4333-8333-333333333333
                    total: 24.99
                    currency: USD
                    status: PENDING
                    created_at: 1711510800
        '401':
          description: Response for status 401
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '403':
          description: Response for status 403
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '422':
          description: Response for status 422
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '429':
          description: Response for status 429
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '500':
          description: Response for status 500
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    required:
                      - error
                    properties:
                      error:
                        type: object
                        required:
                          - code
                          - message
                          - doc_url
                        properties:
                          code:
                            type: string
                          message:
                            type: string
                          doc_url:
                            type: string
                          details:
                            type: array
                            items:
                              type: object
                              required:
                                - field
                                - message
                              properties:
                                field:
                                  type: string
                                message:
                                  type: string
                              additionalProperties: true
                          subcode:
                            type: string
                        additionalProperties: true
                    additionalProperties: true
                  - type: object
                    required:
                      - status
                      - data
                      - error
                      - message
                      - log
                      - env
                    properties:
                      status:
                        type: integer
                      data:
                        nullable: true
                      error:
                        type: string
                      message:
                        type: string
                        nullable: true
                      log:
                        nullable: true
                      env:
                        type: string
                    additionalProperties: true
      deprecated: false
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Use your Shoppex API key in the Authorization header.

````