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

# Refresh an order

> Re-checks one order. Use it if the order looks stuck. Returns the single order. No request body.



## OpenAPI

````yaml openapi-payouts-v2-0-0.json post /api/v2/payouts/{batchId}/orders/{orderId}/refresh
openapi: 3.0.3
info:
  title: Mansa Payout API — v2
  description: >
    Pay a Beneficiary's bank account in fiat, funded with USDT from your Mansa
    payout vault.


    ## Integration flow

    1. Register a **Sender** (the payer named on the bank transfer).

    2. Upload KYC documents and submit the Sender's payer details. Wait for
    `status: ready`.

    3. Register a **Beneficiary** (who gets paid). Wait for `status: ready`.

    4. Fetch the **purpose codes** accepted for that Sender and Beneficiary.

    5. Create a **batch** of orders. Each order comes back quoted in USDT.

    6. Make sure your payout vault holds enough USDT, then **confirm** the
    batch.

    7. Track the batch until every order is `COMPLETED` or `FAILED`.


    Steps 2 and 3 involve a manual review on our side, so they are asynchronous:
    poll the `refresh` endpoints until `status` is `ready`.


    ## Conventions

    - Your organization must have the Payout product enabled (`GET
    /api/v2/liquidity/onboarding/products` shows `payout` as enabled).

    - All request and response fields are `snake_case`, with two exceptions: the
    `fileType` multipart form field and the `beneficiaryId` query parameter on
    the purposes endpoint.

    - Amounts are decimal strings (for example `"100.00"`), never numbers.

    - Timestamps are ISO-8601 UTC strings.

    - Partner details are never exposed. Statuses and error messages are Mansa's
    own.


    ## Rate Limiting

    - 100 requests per minute per API key

    - Specific endpoints may have additional limits


    ## Error Handling

    This API returns Nest's default error shape rather than a custom envelope.


    - **2xx** — The request succeeded.

    - **4xx** — The request failed due to a problem with the information
    provided.

    - **5xx** — A problem occurred on our servers or with an upstream
    dependency.


    Most errors have the shape:


    ```json

    {
      "statusCode": 400,
      "message": "..."
    }

    ```


    Request-validation failures return `400` with every problem listed in
    `message` as an array, plus `"error": "Bad Request"`. Money-moving calls
    (`confirm`) are checked before any funds move, so a rejected confirm leaves
    the batch unchanged and can be retried after you fix the cause.
  version: v2
  contact:
    name: Mansa API Support
    email: api-support@mansa.io
    url: https://docs.mansa.io
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://api.mansa.xyz
    description: Production server
  - url: https://sandbox-api.mansa.xyz
    description: Sandbox server
security:
  - ApiKeyAuth: []
    BearerAuth: []
tags:
  - name: Organizations
    description: Product entitlement checks
  - name: Senders
    description: Registering and verifying the org's own paying entities
  - name: Beneficiaries
    description: Registering and verifying who gets paid. Not tied to a Sender.
  - name: Funding
    description: The org's USDT funding address and balance
  - name: Payouts
    description: Creating, funding, and tracking payout batches and orders
paths:
  /api/v2/payouts/{batchId}/orders/{orderId}/refresh:
    post:
      tags:
        - Payouts
      summary: Refresh an order
      description: >-
        Re-checks one order. Use it if the order looks stuck. Returns the single
        order. No request body.
      operationId: refreshOrder
      parameters:
        - name: batchId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: ID of the batch
        - name: orderId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: ID of the order
      responses:
        '200':
          description: The order with its latest status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    Order:
      type: object
      properties:
        id:
          type: string
          format: uuid
        batch_id:
          type: string
          format: uuid
        sender_profile_id:
          type: string
          format: uuid
        beneficiary_profile_id:
          type: string
          format: uuid
        fee_type:
          type: string
          enum:
            - OUR
            - SHA
        purpose_code:
          $ref: '#/components/schemas/PurposeCode'
        beneficiary_amount:
          type: string
        beneficiary_currency:
          $ref: '#/components/schemas/BeneficiaryCurrency'
        fee_amount:
          type: string
          nullable: true
          description: Wire fee for the chosen `fee_type`. Always in USD.
        source_currency:
          type: string
          example: USDT
          description: Always "USDT" today
        source_amount:
          type: string
          nullable: true
          description: >-
            The total USDT the order costs, all fees included. This is the
            figure to size funding against.
        status:
          $ref: '#/components/schemas/OrderStatus'
        failure_message:
          type: string
          nullable: true
          description: >-
            Present only when `status` is `FAILED`. Generic; Mansa follows up
            directly.
        expires_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            Set once the order reaches `AWAITING_DEPOSIT`. An order whose
            deposit hasn't landed within 2 hours of confirmation expires to
            `CANCELLED_EXPIRED`.
        client_reference:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        fee_currency:
          type: string
          nullable: true
          example: USD
          description: Always `USD`.
        uetr:
          type: string
          nullable: true
          description: >-
            SWIFT UETR once the bank network reports one. May stay `null` after
            `COMPLETED`.
      required:
        - id
        - batch_id
        - sender_profile_id
        - beneficiary_profile_id
        - fee_type
        - purpose_code
        - beneficiary_amount
        - beneficiary_currency
        - source_currency
        - status
        - created_at
        - updated_at
    PurposeCode:
      type: string
      description: >-
        A code from Get purpose codes for this Sender and Beneficiary (for
        example `006-26`). Do not hard-code it. `OTHR` ("other") is not
        supported yet.
      example: 006-26
    BeneficiaryCurrency:
      type: string
      enum:
        - USD
        - EUR
        - CNH
        - AUD
        - CAD
        - HKD
        - JPY
        - NZD
        - SGD
        - GBP
        - AED
      description: Every order in a batch must use the same currency.
    OrderStatus:
      type: string
      enum:
        - DRAFT
        - AWAITING_DEPOSIT
        - DEPOSIT_RECEIVED
        - PAYING_BENEFICIARY
        - COMPLETED
        - FAILED
        - CANCELLED_EXPIRED
      description: >-
        DRAFT: quoted, not confirmed; can be edited or cancelled ·
        AWAITING_DEPOSIT: confirmed, USDT is moving out of your payout vault ·
        DEPOSIT_RECEIVED: USDT received · PAYING_BENEFICIARY: the bank transfer
        is in progress · COMPLETED: paid · FAILED: not completed ·
        CANCELLED_EXPIRED: cancelled by you, or the deposit never landed.
    NestErrorResponse:
      type: object
      description: >-
        Error body. Branch on the HTTP status; treat `message` as human-readable
        text, not a stable code.
      properties:
        statusCode:
          type: integer
          example: 400
        message:
          type: string
          example: sender not found
      required:
        - statusCode
        - message
      example:
        statusCode: 400
        message: sender not found
  responses:
    Unauthorized:
      description: Authentication required or invalid credentials
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NestErrorResponse'
          examples:
            default:
              value:
                statusCode: 401
                message: Unauthorized
    Forbidden:
      description: Payout product not enabled for your organization
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NestErrorResponse'
          examples:
            default:
              value:
                statusCode: 403
                message: Forbidden resource
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NestErrorResponse'
          examples:
            default:
              value:
                statusCode: 404
                message: Sender not found
    RateLimited:
      description: Rate limit exceeded
      headers:
        X-RateLimit-Limit:
          description: Request limit per window
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: Remaining requests in window
          schema:
            type: integer
        X-RateLimit-Reset:
          description: UNIX epoch seconds when the rate limit resets
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NestErrorResponse'
          examples:
            default:
              value:
                statusCode: 429
                message: Too many requests
    ServerError:
      description: Internal server or upstream error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NestErrorResponse'
          examples:
            default:
              value:
                statusCode: 500
                message: Internal server error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        ES256 JWT signed by the private key registered to the API key above.
        Claims: sub (=API key), uri, nbf, iat, exp, and bodyHash (HMAC-SHA512 of
        uri + rawBody + nbf using a shared secret, base64).

````

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