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

# Pay Existing Order

> Start a FRESH payment attempt for an order that was created but never
paid, without touching its contents, price or number.

Same money-safety rules as the gateway confirm endpoints: the order is
row-locked, must still be unpaid/not cancelled, must belong to the caller,
and its stock is re-verified. Everything the gateways need is rebuilt from
the ORDER (never from the cart or the request), so the customer pays exactly
what was quoted.



## OpenAPI

````yaml https://api.vellaro.io/openapi.json post /api/v1/orders/{order_id}/pay
openapi: 3.1.0
info:
  title: Vellaro API
  description: Vellaro 2026 — E-commerce API
  version: 0.1.0
servers:
  - url: https://api.vellaro.io
    description: Produzione
security: []
tags: []
paths:
  /api/v1/orders/{order_id}/pay:
    post:
      tags:
        - orders
        - orders
      summary: Pay Existing Order
      description: >-
        Start a FRESH payment attempt for an order that was created but never

        paid, without touching its contents, price or number.


        Same money-safety rules as the gateway confirm endpoints: the order is

        row-locked, must still be unpaid/not cancelled, must belong to the
        caller,

        and its stock is re-verified. Everything the gateways need is rebuilt
        from

        the ORDER (never from the cart or the request), so the customer pays
        exactly

        what was quoted.
      operationId: pay_existing_order_api_v1_orders__order_id__pay_post
      parameters:
        - name: order_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Order Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_CheckoutResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    ApiResponse_CheckoutResponse_:
      properties:
        data:
          anyOf:
            - $ref: '#/components/schemas/CheckoutResponse'
            - type: 'null'
        meta:
          anyOf:
            - $ref: '#/components/schemas/PaginationMeta'
            - type: 'null'
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
      type: object
      title: ApiResponse[CheckoutResponse]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CheckoutResponse:
      properties:
        order_id:
          type: string
          format: uuid
          title: Order Id
        payment_method:
          type: string
          title: Payment Method
        client_secret:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Secret
        stripe_publishable_key:
          type: string
          title: Stripe Publishable Key
          default: ''
        paypal_order_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Paypal Order Id
        paypal_client_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Paypal Client Id
        pok_order_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Pok Order Id
        pok_env:
          anyOf:
            - type: string
            - type: 'null'
          title: Pok Env
        paysera_redirect_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Paysera Redirect Url
        bank_details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Bank Details
        subtotal:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Subtotal
        shipping_cost:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Shipping Cost
        tax:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Tax
        tax_rate:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Tax Rate
        prices_include_tax:
          type: boolean
          title: Prices Include Tax
          default: false
        discount_amount:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Discount Amount
        total:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Total
        currency:
          type: string
          title: Currency
      type: object
      required:
        - order_id
        - payment_method
        - subtotal
        - shipping_cost
        - tax
        - discount_amount
        - total
        - currency
      title: CheckoutResponse
      description: Response from POST /checkout — contains everything the frontend needs.
    PaginationMeta:
      properties:
        page:
          type: integer
          title: Page
        page_size:
          type: integer
          title: Page Size
        total:
          type: integer
          title: Total
        total_pages:
          type: integer
          title: Total Pages
      type: object
      required:
        - page
        - page_size
        - total
        - total_pages
      title: PaginationMeta
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.