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

# Expire checkout

Expires a checkout that should no longer be used.

* A successful response returns the checkout in its current state together with `expiredAt`.
* When the expiration is applied, the checkout status will be `EXPIRED`.
* After expiry, the customer can no longer make new payment attempts on that checkout.
* If the checkout does not exist, the endpoint returns `NOT_FOUND`.


## OpenAPI

````yaml openapi_v2 post /v2/checkouts/{checkoutId}/expire
openapi: 3.0.0
info:
  title: PawaPay Merchant API V2
  description: Please find complete documentation from https://docs.pawapay.io/.
  version: v2
  x-logo:
    url: >-
      https://global-uploads.webflow.com/62824591015aa314fd308df1/6411b26596e3de3f52551c00_Logopawapay-p-500.png
    href: https://docs.pawapay.io/
    altText: PawaPay logo
servers:
  - url: https://api.sandbox.pawapay.io
    description: PawaPay Merchant API sandbox
  - url: https://api.pawapay.io
    description: PawaPay Merchant API production
security:
  - bearerAuth: []
tags:
  - name: deposits
    x-displayName: Deposits
  - name: split-payments
    x-displayName: Split Payments
  - name: checkouts
    x-displayName: Checkouts
  - name: payouts
    x-displayName: Payouts
  - name: refunds
    x-displayName: Refunds
  - name: remittances
    x-displayName: Remittances
  - name: payment-page
    x-displayName: Payment Page
  - name: toolkit
    x-displayName: Toolkit
  - name: finances
    x-displayName: Finances
paths:
  /v2/checkouts/{checkoutId}/expire:
    post:
      tags:
        - checkouts
      summary: Expire checkout
      operationId: expireCheckout
      parameters:
        - $ref: '#/components/parameters/CheckoutId'
      responses:
        '200':
          description: Request has been processed by PawaPay.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutExpirationResponse'
              examples:
                EXPIRED:
                  value:
                    checkoutId: afb57b93-7849-49aa-babb-4c3ccbfe3d79
                    status: EXPIRED
                    expiredAt: '2026-03-27T10:45:00Z'
                    reason: MANUAL_EXPIRY
                    expiredBy: API
        '401':
          description: >-
            Authentication failed. Make sure you have added the API token into
            the header.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: >-
                        The API token in the request is not authorised for this
                        endpoint.
        '404':
          description: The specified checkout was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutFailureResponse'
              examples:
                NOT_FOUND:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: NOT_FOUND
                      failureMessage: >-
                        Checkout with ID afb57b93-7849-49aa-babb-4c3ccbfe3d79
                        not found.
        '500':
          description: An unknown failure has occured.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.
components:
  parameters:
    CheckoutId:
      in: path
      name: checkoutId
      required: true
      description: The id of the checkout that you are performing this operation on.
      schema:
        minLength: 36
        maxLength: 36
        type: string
        format: uuid
      example: f4401bd2-1568-4140-bf2d-eb77d2b2b639
  schemas:
    CheckoutExpirationResponse:
      required:
        - checkoutId
        - status
      type: object
      properties:
        checkoutId:
          $ref: '#/components/schemas/ResponsePaymentId'
        status:
          $ref: '#/components/schemas/CheckoutStatus'
        expiredAt:
          type: string
          format: date-time
          description: Timestamp when the checkout was expired.
          example: '2026-03-27T10:45:00Z'
        reason:
          type: string
          description: Reason reported for the expiration.
          example: MANUAL_EXPIRY
        expiredBy:
          type: string
          description: Actor that expired the checkout.
          example: API
    AuthenticationFailureResponse:
      required:
        - failureCode
        - failureMessage
      type: object
      properties:
        status:
          type: string
          enum:
            - REJECTED
          description: The status of the response will always be `REJECTED`
          example: REJECTED
        failureReason:
          $ref: '#/components/schemas/AuthenticationFailureReason'
    AuthorizationFailureResponse:
      required:
        - failureCode
        - failureMessage
      type: object
      properties:
        status:
          type: string
          enum:
            - REJECTED
          description: The status of the response will always be `REJECTED`
          example: REJECTED
        failureReason:
          $ref: '#/components/schemas/AuthorizationFailureReason'
    CheckoutFailureResponse:
      required:
        - status
        - failureReason
      type: object
      properties:
        status:
          type: string
          enum:
            - REJECTED
          description: The status of the response will always be `REJECTED`
          example: REJECTED
        failureReason:
          $ref: '#/components/schemas/CheckoutFailureReason'
    UnknownFailureResponse:
      required:
        - failureCode
        - failureMessage
      type: object
      properties:
        failureReason:
          type: object
          properties:
            failureCode:
              type: string
              description: >
                Reason for the failure:

                * `UNKNOWN_ERROR` - Unable to process request due to an unknown
                problem.
              example: UNKNOWN_ERROR
            failureMessage:
              type: string
              description: A description of the failure
              example: Unable to process request due to an unknown problem.
    ResponsePaymentId:
      minLength: 36
      maxLength: 36
      type: string
      format: uuid
      description: >-
        The unique ID for this payment in PawaPay as specified by you during
        initiation.
      example: f4401bd2-1568-4140-bf2d-eb77d2b2b639
    CheckoutStatus:
      type: string
      description: >
        Possible checkout lifecycle statuses. This is distinct from the
        initiation status (`CheckoutCreationStatus`) returned when the checkout
        is created.

        * `WAITING_PAYMENT` - The checkout and its hosted payment page have been
        created and are waiting for the customer to pay.

        * `PROCESSING` - A payment attempt is in progress and the checkout is
        still being processed.

        * `COMPLETED` - The checkout has completed successfully. This is a
        **final status.**

        * `FAILED` - The checkout has failed. Inspect `deposit` or
        `depositsHistory` for the latest attempt result when available. This is
        a **final status.**

        * `EXPIRED` - The checkout has expired and can no longer be used. This
        is a **final status.**

        * `CANCELLED` - The customer cancelled the payment on the hosted payment
        page. This is a **final status.**
      enum:
        - WAITING_PAYMENT
        - PROCESSING
        - COMPLETED
        - FAILED
        - EXPIRED
        - CANCELLED
    AuthenticationFailureReason:
      required:
        - failureReason
      type: object
      properties:
        failureCode:
          type: string
          description: >
            Reason for the failure:

            * `NO_AUTHENTICATION` - The API token was not found in the request
            headers.

            * `AUTHENTICATION_ERROR` - The API token in the request headers is
            not valid.

            * `HTTP_SIGNATURE_ERROR` - The signature you have passed with the
            request did not pass verification.
          enum:
            - NO_AUTHENTICATION
            - AUTHENTICATION_ERROR
            - HTTP_SIGNATURE_ERROR
        failureMessage:
          type: string
          description: A description of the failure
    AuthorizationFailureReason:
      required:
        - failureReason
      type: object
      properties:
        failureCode:
          type: string
          description: >
            Reason for the failure:

            * `AUTHORISATION_ERROR` - The API Token in the request header is not
            authorised to make this request.

            * `DEPOSITS_NOT_ALLOWED` - Deposits are not enabled with the
            provider on your PawaPay account.

            * `PAYOUTS_NOT_ALLOWED` - Payouts are not enabled with the provider
            on your PawaPay account.

            * `REMITTANCES_NOT_ALLOWED` - Remittances are not enabled with the
            provider on your PawaPay account.

            * `REFUNDS_NOT_ALLOWED` - Refunds are not enabled with the provider
            on your PawaPay account.
          enum:
            - AUTHORISATION_ERROR
            - DEPOSITS_NOT_ALLOWED
            - PAYOUTS_NOT_ALLOWED
            - REMITTANCES_NOT_ALLOWED
            - REFUNDS_NOT_ALLOWED
        failureMessage:
          type: string
          description: A description of the failure
    CheckoutFailureReason:
      required:
        - failureCode
      type: object
      properties:
        failureCode:
          type: string
          description: >
            Reason for the failure:

            * `INVALID_INPUT` - We were unable to parse the payload of the
            request.

            * `MISSING_PARAMETER` - A mandatory parameter was missing from the
            request body.

            * `UNSUPPORTED_PARAMETER` - An unsupported parameter was found in
            the request body.

            * `INVALID_PARAMETER` - A parameter had an incorrect value.

            * `NOT_FOUND` - The specified checkout was not found.
          enum:
            - INVALID_INPUT
            - MISSING_PARAMETER
            - UNSUPPORTED_PARAMETER
            - INVALID_PARAMETER
            - NOT_FOUND
        failureMessage:
          type: string
          description: A description of the failure
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        See
        [Authentication](/v2/docs/how_to_start#how-to-authenticate-calls-to-the-merchant-api).
      scheme: bearer
      bearerFormat: JWT

````