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

# Apply Credits To Order

> Apply Credits to Order



## OpenAPI

````yaml openapi/ecommerce.yaml post /public/{user_id}/orders/{publicOrder}/credits/apply
openapi: 3.0.1
info:
  title: Ecommerce API
  description: ''
  version: '1.0'
servers:
  - url: https://apigw.ipxo.com/ecommerce
security:
  - bearerAuth: []
tags:
  - name: User
    description: ''
  - name: Cart
    description: ''
  - name: Stripe
    description: ''
  - name: Address
    description: ''
  - name: Gateway
    description: ''
  - name: Invoice
    description: ''
  - name: Order
    description: ''
  - name: Payment
    description: ''
  - name: Product
    description: ''
  - name: Subscription
    description: ''
  - name: Customer
    description: ''
  - name: Projection
    description: ''
  - name: Stripe EU
    description: ''
  - name: Vat
    description: ''
  - name: Legal
    description: ''
paths:
  /public/{user_id}/orders/{publicOrder}/credits/apply:
    post:
      tags:
        - Order
      summary: Apply Credits To Order
      description: Apply Credits to Order
      operationId: applyCreditsToOrder
      parameters:
        - name: user_id
          in: path
          description: The ID of the user.
          required: true
          schema:
            type: string
          example: aut
        - name: publicOrder
          in: path
          description: ''
          required: true
          schema:
            type: string
          example: dignissimos
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                amount:
                  type: number
                  description: Must be at least 0.
                  example: 63
            example:
              amount: 63
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      uuid:
                        type: string
                        example: 6ef85076-4519-3e5b-8402-b642a4bebe76
                      status:
                        type: string
                        example: draft
                      placed_at:
                        type: string
                        example: '2025-11-21T07:55:20+00:00'
                      expires_at:
                        type: string
                        example: '2026-03-11T14:05:31+00:00'
                      sub_total:
                        type: object
                        properties:
                          currency:
                            type: string
                            example: USD
                          amount:
                            type: string
                            example: '9187.00'
                          amount_minor:
                            type: integer
                            example: 918700
                      discount_total:
                        type: object
                        properties:
                          currency:
                            type: string
                            example: USD
                          amount:
                            type: string
                            example: '0.00'
                          amount_minor:
                            type: integer
                            example: 0
                      tax_total:
                        type: object
                        properties:
                          currency:
                            type: string
                            example: USD
                          amount:
                            type: string
                            example: '0.00'
                          amount_minor:
                            type: integer
                            example: 0
                      credits_total:
                        type: object
                        properties:
                          currency:
                            type: string
                            example: USD
                          amount:
                            type: string
                            example: '0.00'
                          amount_minor:
                            type: integer
                            example: 0
                      total:
                        type: object
                        properties:
                          currency:
                            type: string
                            example: USD
                          amount:
                            type: string
                            example: '9187.00'
                          amount_minor:
                            type: integer
                            example: 918700
                      remaining_total:
                        type: object
                        properties:
                          currency:
                            type: string
                            example: USD
                          amount:
                            type: string
                            example: '9187.00'
                          amount_minor:
                            type: integer
                            example: 918700
                      total_before_tax:
                        type: object
                        properties:
                          currency:
                            type: string
                            example: USD
                          amount:
                            type: string
                            example: '9187.00'
                          amount_minor:
                            type: integer
                            example: 918700
                      tax_breakdown:
                        type: array
                        items:
                          type: object
                          properties:
                            amount:
                              type: object
                              properties:
                                currency:
                                  type: string
                                  example: USD
                                amount:
                                  type: string
                                  example: '0.00'
                                amount_minor:
                                  type: integer
                                  example: 0
                            code:
                              type: string
                              example: Test Tax
                            name:
                              type: string
                              example: some-tax
                            rate:
                              type: integer
                              example: 10
                            calculator_type:
                              type: string
                              example: percent
                        example:
                          - amount:
                              currency: USD
                              amount: '0.00'
                              amount_minor: 0
                            code: Test Tax
                            name: some-tax
                            rate: 10
                            calculator_type: percent
                      discount_breakdown:
                        type: array
                        items:
                          type: object
                          properties:
                            amount:
                              type: object
                              properties:
                                currency:
                                  type: string
                                  example: USD
                                amount:
                                  type: string
                                  example: '0.00'
                                amount_minor:
                                  type: integer
                                  example: 0
                            code:
                              type: string
                              example: Test Discount
                            name:
                              type: string
                              example: some-discount
                            rate:
                              type: integer
                              example: 10
                            calculator_type:
                              type: string
                              example: percent
                        example:
                          - amount:
                              currency: USD
                              amount: '0.00'
                              amount_minor: 0
                            code: Test Discount
                            name: some-discount
                            rate: 10
                            calculator_type: percent
                example:
                  data:
                    uuid: 6ef85076-4519-3e5b-8402-b642a4bebe76
                    status: draft
                    placed_at: '2025-11-21T07:55:20+00:00'
                    expires_at: '2026-03-11T14:05:31+00:00'
                    sub_total:
                      currency: USD
                      amount: '9187.00'
                      amount_minor: 918700
                    discount_total:
                      currency: USD
                      amount: '0.00'
                      amount_minor: 0
                    tax_total:
                      currency: USD
                      amount: '0.00'
                      amount_minor: 0
                    credits_total:
                      currency: USD
                      amount: '0.00'
                      amount_minor: 0
                    total:
                      currency: USD
                      amount: '9187.00'
                      amount_minor: 918700
                    remaining_total:
                      currency: USD
                      amount: '9187.00'
                      amount_minor: 918700
                    total_before_tax:
                      currency: USD
                      amount: '9187.00'
                      amount_minor: 918700
                    tax_breakdown:
                      - amount:
                          currency: USD
                          amount: '0.00'
                          amount_minor: 0
                        code: Test Tax
                        name: some-tax
                        rate: 10
                        calculator_type: percent
                    discount_breakdown:
                      - amount:
                          currency: USD
                          amount: '0.00'
                          amount_minor: 0
                        code: Test Discount
                        name: some-discount
                        rate: 10
                        calculator_type: percent
              example:
                data:
                  uuid: 6ef85076-4519-3e5b-8402-b642a4bebe76
                  status: draft
                  placed_at: '2025-11-21T07:55:20.0000000+00:00'
                  expires_at: '2026-03-11T14:05:31.0000000+00:00'
                  sub_total:
                    currency: USD
                    amount: '9187.00'
                    amount_minor: 918700
                  discount_total:
                    currency: USD
                    amount: '0.00'
                    amount_minor: 0
                  tax_total:
                    currency: USD
                    amount: '0.00'
                    amount_minor: 0
                  credits_total:
                    currency: USD
                    amount: '0.00'
                    amount_minor: 0
                  total:
                    currency: USD
                    amount: '9187.00'
                    amount_minor: 918700
                  remaining_total:
                    currency: USD
                    amount: '9187.00'
                    amount_minor: 918700
                  total_before_tax:
                    currency: USD
                    amount: '9187.00'
                    amount_minor: 918700
                  tax_breakdown:
                    - amount:
                        currency: USD
                        amount: '0.00'
                        amount_minor: 0
                      code: Test Tax
                      name: some-tax
                      rate: 10
                      calculator_type: percent
                  discount_breakdown:
                    - amount:
                        currency: USD
                        amount: '0.00'
                        amount_minor: 0
                      code: Test Discount
                      name: some-discount
                      rate: 10
                      calculator_type: percent
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````