> ## 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.

# Reauthorize amount by order

> Reauthorize an amount by order whose initial authorization has expired before payment could be captured. Any attempts to reauthorize before the authorization expires will fail.\
Can be performed after shopper has authorized the transaction by completing checkout with Sezzle


Please note the following when reauthorizing an order.

* A new order will be created
  * The intent will be set to AUTH
  * The reference\_id will be the same as the original order
* The reauthorized amount will be a new installment plan for the customer

<Warning>
  Reauthorizations are not guaranteed to be approved. It is extremely important to note this API will return a 200 success if the request to reauthorize is successful (i.e. no errors) but the customer was not approved.

  Please be sure to check the authorization **approved** value in the response to determine if the reauthorization order was created.
</Warning>


## OpenAPI

````yaml post /v2/order/{order_uuid}/reauthorize
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}/reauthorize:
    post:
      tags:
        - Order
      summary: Reauthorize amount by order
      description: >
        Reauthorize an amount by order whose initial authorization has expired
        before payment could be captured. Any attempts to reauthorize before the
        authorization expires will fail.\

        Can be performed after shopper has authorized the transaction by
        completing checkout with Sezzle
      operationId: HandleReauthorizeAmountByOrder
      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 reauthorize (`order.uuid` from session response)
          required: true
          schema:
            type: string
      requestBody:
        description: The amount to be reauthorized
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReauthorizeRequest'
            example:
              amount_in_cents: 5000
              currency: USD
      responses:
        '200':
          description: Successful Operation
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Response'
                  - $ref: '#/components/schemas/OrderBasic'
                  - type: object
                    properties:
                      authorization:
                        $ref: '#/components/schemas/Authorization'
              example:
                uuid: 6c9db5d4-d09a-4224-860a-b5438ac32ca8
                links:
                  - href: >-
                      https://gateway.sezzle.com/v2/order/6c9db5d4-d09a-4224-860a-b5438ac32ca8
                    method: GET
                    rel: self
                intent: AUTH
                reference_id: original_order_reference_id
                order_amount:
                  amount_in_cents: 5000
                  currency: USD
                authorization:
                  authorization_amount:
                    amount_in_cents: 5000
                    currency: USD
                  approved: true
                  expiration: '2022-04-23T16:13:44Z'
        '400':
          $ref: '#/components/responses/BadRequestV2'
          example:
            code: invalid
            message: Reauthorization window has expired
        '401':
          $ref: '#/components/responses/UnauthorizedV2'
          example:
            code: unauthorized
            message: authorization not accepted
        '404':
          $ref: '#/components/responses/NotFoundV2'
          example:
            code: invalid
            message: Checkout not found
        '422':
          $ref: '#/components/responses/UnprocessableV2'
          example:
            code: invalid_installment_id
            message: UnprocessableV2 entity
components:
  schemas:
    ReauthorizeRequest:
      $ref: '#/components/schemas/Price'
    Response:
      type: object
      properties:
        uuid:
          type: string
          description: The unique identifier for this response
        links:
          type: array
          description: Available API links prefilled with UUID with accompanying method
          items:
            $ref: '#/components/schemas/Link'
    OrderBasic:
      type: object
      properties:
        intent:
          $ref: '#/components/schemas/Intent'
        reference_id:
          type: string
          description: >-
            The checkout or cart ID from the merchant, currently used for
            tracking only (must contain only alphanumeric characters, dashes
            (-), and underscores (_))
        order_amount:
          $ref: '#/components/schemas/Price'
          description: >-
            A Price object containing the total amount in cents of the order,
            which must be at least 100 which is $1.00. Please note your merchant
            configuration might have a higher minimum.
    Authorization:
      type: object
      description: The authorization details for the order
      properties:
        authorization_amount:
          $ref: '#/components/schemas/Price'
          description: The amount that was authorized
        approved:
          type: boolean
          description: Shopper approval status for the order
        expiration:
          type: string
          format: date-time
          description: >-
            The date until which the merchant can capture the order amount. ISO
            8601 date/time format
    Price:
      allOf:
        - $ref: '#/components/schemas/PriceBase'
        - type: object
          required:
            - amount_in_cents
            - currency
    Link:
      type: object
      required:
        - href
      properties:
        href:
          type: string
          description: The fully qualified URL for the API endpoint
        rel:
          type: string
          description: >-
            The relationship type indicating the purpose of this link (e.g.,
            'self' for the current resource, 'create' for creating a new
            resource, 'list' for listing resources)
          enum:
            - self
            - capture
            - checkout
            - create
            - customer
            - list
            - order
            - preapprove
            - refund
            - release
            - session
        method:
          type: string
          description: The HTTP method to use when calling this API endpoint
          enum:
            - GET
            - POST
            - PATCH
            - DELETE
    Intent:
      type: string
      description: >
        If your checkout flow requires the user to confirm their checkout on
        your site after being approved by Sezzle, use AUTH as your intent. If
        you prefer the checkout be captured immediately, use CAPTURE.

        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.
      enum:
        - AUTH
        - CAPTURE
    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
    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
  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

````