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

# Repay outstanding credit

> Request repayment of outstanding USD or NGN credit from available funds in the same currency. The amount is a maximum. Retain the original Idempotency-Key when retrying and poll the receipt until completed; processing does not confirm payment.



## OpenAPI

````yaml /openapi/openapi.json post /partner/wallets/credit/repayments
openapi: 3.1.0
info:
  title: Stabyl API
  description: >-
    REST API for approved Stabyl accounts to automate exchange, wallet, and
    non-production simulation workflows.
  contact:
    name: Stabyl Support
    email: support@stabyl.com
  license:
    name: Proprietary
  version: 1.0.0
servers:
  - url: https://api.stabyl.com/v1
    description: Production
  - url: https://api-staging.stabyl.com/v1
    description: Staging
security: []
tags:
  - name: Exchange
    description: Trading market data and order management for account automation.
  - name: Wallets
    description: >-
      Supported routes, deposit destinations, balances, transactions, and saved
      recipients.
  - name: Webhooks
    description: >-
      Outbound event delivery configuration and eventually consistent delivery
      history. Verify Standard Webhooks webhook-id, webhook-timestamp, and
      webhook-signature headers against the unchanged raw request body before
      parsing JSON.
  - name: Simulation
    description: Non-production endpoints for testing integration behavior.
paths:
  /partner/wallets/credit/repayments:
    post:
      tags:
        - Wallets
      summary: Repay outstanding credit
      description: >-
        Request repayment of outstanding USD or NGN credit from available funds
        in the same currency. The amount is a maximum. Retain the original
        Idempotency-Key when retrying and poll the receipt until completed;
        processing does not confirm payment.
      operationId: post_partner_wallets_credit_repayments
      parameters:
        - name: Idempotency-Key
          in: header
          description: >-
            Unique key for this exact write intent. Store it before sending the
            request and reuse it for retries after timeouts or transient errors.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreditRepaymentRequest'
        required: true
      responses:
        '200':
          description: Repayment accepted or replayed; inspect status
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/CreditRepaymentResponse'
                  status:
                    type: string
                    enum:
                      - success
              example:
                data:
                  created_at: '2026-09-19T10:00:00Z'
                  currency: NGN
                  id: 01980d95-5537-76aa-88a8-ad59117632ef
                  repaid_amount: '1000.00'
                  requested_amount: '1000.00'
                  status: completed
                status: success
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: string
                        example: VALIDATION_FAILED
                      message:
                        type: string
                        example: invalid request parameters
                  status:
                    type: string
                    enum:
                      - error
              example:
                error:
                  code: VALIDATION_FAILED
                  message: invalid request parameters
                status: error
        '409':
          description: Idempotency conflict
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: string
                        example: CONFLICT
                      message:
                        type: string
                        example: idempotency key already used
                  status:
                    type: string
                    enum:
                      - error
              example:
                error:
                  code: CONFLICT
                  message: idempotency key already used
                status: error
      security:
        - api_key: []
components:
  schemas:
    CreditRepaymentRequest:
      type: object
      description: Maximum same-currency repayment from available owned wallet funds.
      required:
        - currency
        - amount
      properties:
        amount:
          type: string
          example: '1000.00'
        currency:
          type: string
          example: NGN
      additionalProperties: false
    CreditRepaymentResponse:
      type: object
      description: >-
        Public repayment receipt. Processing is not proof of a completed
        payment.
      required:
        - id
        - currency
        - requested_amount
        - repaid_amount
        - status
        - created_at
      properties:
        created_at:
          type: string
        currency:
          type: string
        id:
          type: string
          format: uuid
        repaid_amount:
          type: string
        requested_amount:
          type: string
        status:
          type: string
          description: '`processing` or `completed`; a confirmed zero is completed too.'
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        API credential. Withdrawal quote and submit operations additionally
        require the documented Ed25519 timestamp, nonce, and signature headers.
      x-default: sb_test_your_key

````