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

# Montant du supplément par commande

> Use this endpoint to upcharge an amount on an existing order. Can be performed after payment authorization.
Upon success, a new separate order is created for the upcharge amount only. The original order is not released and remains in its current state.
The upcharge amount is charged to the shopper as a single payment. The cumulative total of all upcharges on a given order must not exceed 15% of the original order amount.
The currency of the upcharge must match the currency of the original order.
The relationship between the upcharge order and the original order is queryable via Get Order: the upcharge order returns `is_upcharge: true` and `parent_order_uuid`, and the original order returns an `upcharges` array listing each upcharge.


<Warning>Cette API est en cours de développement et n'est pas encore disponible pour une utilisation en production. Les détails de cette page sont susceptibles de changer.</Warning>

## Aperçu

Le endpoint de supplément vous permet de facturer un montant supplémentaire sur une commande autorisée existante. Cela est utile lorsque le total final de la commande dépasse le montant initialement autorisé (par exemple, en raison d'ajustements de prix basés sur le poids, de services ajoutés ou de modifications des frais d'expédition).

### Comportement clé

* Une **nouvelle commande distincte** est créée pour le montant du supplément uniquement. La commande originale n'est **pas** libérée ni modifiée.
* Le montant du supplément est facturé à l'acheteur en un **paiement unique** (Pay In Full).
* Le **total cumulé** de tous les suppléments sur une commande donnée ne doit pas dépasser **15 %** du montant autorisé initial.
* La devise du supplément **doit correspondre** à la devise de la commande originale.
* L'UUID retourné est l'UUID de la nouvelle commande de supplément et peut être utilisé avec d'autres endpoints de l'API Order (par exemple, capture, remboursement).
* Les deux commandes restent associées -- vous pouvez interroger la relation via le [Get Order](/api/core/orders/getv2order) endpoint:
  * Sur la **commande de supplément**, la réponse inclut `is_upcharge: true` et `parent_order_uuid` faisant référence à la commande originale.
  * Sur la **commande originale**, la réponse inclut un tableau `upcharges` répertoriant l'UUID et le montant de chaque commande de supplément.

### Exigences de validation

* La commande originale doit avoir une autorisation approuvée.
* `intent` doit être soit `AUTH` soit `CAPTURE`.
* `upcharge_amount` doit inclure un `amount_in_cents` et `currency` valides.

### Exemple

Pour une commande originale de 100,00 USD :

* Supplément cumulé maximum autorisé : **15,00 USD** (15 % de 100,00)
* Un supplément unique de 10,00 est accepté, laissant une capacité de supplément restante de 5,00.
* Un supplément ultérieur de 6,00 serait rejeté (le cumul de 16,00 dépasse la limite de 15 %).


## OpenAPI

````yaml post /v2/order/{order_uuid}/upcharge
openapi: 3.1.0
info:
  title: Sezzle API v2
  description: >-
    This Sezzle API is for merchants who want to accept Sezzle as a payment
    option
  termsOfService: https://legal.sezzle.com
  version: 2.0.0
  x-logo:
    url: https://media.sezzle.com/branding/2.0/png/Logo_WhiteWordmark_500x126.png
    backgroundColor: '#392558'
servers:
  - url: https://sandbox.gateway.sezzle.com
    description: development server, usa, ca
  - url: https://gateway.sezzle.com
    description: production server, usa, ca
security:
  - Bearer: []
externalDocs:
  description: Sezzle API guides and tutorials
  url: https://docs.sezzle.com/sezzle-integration
paths:
  /v2/order/{order_uuid}/upcharge:
    post:
      tags:
        - Order
      summary: Upcharge amount by order
      description: >
        Use this endpoint to upcharge an amount on an existing order. Can be
        performed after payment authorization.

        Upon success, a new separate order is created for the upcharge amount
        only. The original order is not released and remains in its current
        state.

        The upcharge amount is charged to the shopper as a single payment. The
        cumulative total of all upcharges on a given order must not exceed 15%
        of the original order amount.

        The currency of the upcharge must match the currency of the original
        order.

        The relationship between the upcharge order and the original order is
        queryable via Get Order: the upcharge order returns `is_upcharge: true`
        and `parent_order_uuid`, and the original order returns an `upcharges`
        array listing each upcharge.
      operationId: HandleUpchargeAmountByOrder
      parameters:
        - name: Sezzle-Request-Id
          in: header
          description: Unique client-generated ID to enforce idempotency
          required: false
          schema:
            type: string
        - name: order_uuid
          in: path
          description: The Order UUID to upcharge (`order.uuid` from session response)
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                intent:
                  $ref: '#/components/schemas/Intent'
                upcharge_amount:
                  $ref: '#/components/schemas/Price'
                  description: >-
                    The amount to upcharge. The cumulative total of all
                    upcharges on a given order must not exceed 15% of the
                    original order amount. Currency must match the original
                    order.
              required:
                - intent
                - upcharge_amount
            example:
              intent: AUTH
              upcharge_amount:
                amount_in_cents: 5000
                currency: USD
      responses:
        '200':
          description: Successful Operation
          content:
            application/json:
              schema:
                properties:
                  uuid:
                    type: string
                    description: >-
                      The UUID of the new upcharge order. This UUID can be used
                      with other Order API endpoints (e.g., capture, refund).
              example:
                uuid: 6c9db5d4-d09a-4224-860a-b5438ac32ca8
        '400':
          $ref: '#/components/responses/BadRequestV2'
          example:
            code: bad_request
            message: bad request
        '401':
          $ref: '#/components/responses/UnauthorizedV2'
          example:
            code: unauthorized
            message: authorization not accepted
        '404':
          $ref: '#/components/responses/NotFoundV2'
          example:
            code: record_not_found
            message: not found
        '422':
          $ref: '#/components/responses/UnprocessableV2'
          example:
            code: invalid
            message: UnprocessableV2 entity
components:
  schemas:
    Intent:
      type: string
      description: >
        - Use CAPTURE if payment should be captured immediately upon shopper
        authorization

        - Use AUTH if there is any post-authorization validation needed prior to
        capture, such as inventory validation or regulatory requirements, or if
        merchant policy is to charge the payment method at time of shipment
          - Submit a capture request via the API or your Merchant Dashboard before the authorization expires.
          - The authorization expiration window can be set from 30 minutes up to 7 days in your Merchant Dashboard Settings.  
        - If not specified, the value will default to CAPTURE
      enum:
        - AUTH
        - CAPTURE
    Price:
      allOf:
        - $ref: '#/components/schemas/PriceBase'
        - type: object
          required:
            - amount_in_cents
            - currency
    PriceBase:
      type: object
      properties:
        amount_in_cents:
          type: integer
          description: The amount in cents
        currency:
          type: string
          description: The 3 character currency code as defined by ISO 4217
    ErrorV2:
      type: object
      properties:
        code:
          type: string
          description: The general error type
        message:
          type: string
          description: A more specific error message, if available
        location:
          type: string
          description: Where the error occurred
        debug_uuid:
          type: string
          description: The unique identifier assigned to this error for troubleshooting
  responses:
    BadRequestV2:
      description: Invalid request
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/ErrorV2'
          example:
            - code: bad_request
              message: bad request
    UnauthorizedV2:
      description: >-
        Unauthorized. Returned for any failed bearer or basic auth, including
        expired bearer tokens.
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/ErrorV2'
          example:
            - code: unauthorized
              message: authorization not accepted
    NotFoundV2:
      description: The specified resource was not found
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/ErrorV2'
          example:
            - code: record_not_found
              message: not found
    UnprocessableV2:
      description: Unable to process the request entity
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/ErrorV2'
          example:
            - code: invalid
              message: Unprocessable entity
  securitySchemes:
    Bearer:
      type: apiKey
      name: Authorization
      in: header
      description: >-
        The authentication token generated from providing API Keys to Sezzle
        Gateway

````