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

# Withdraw stablecoin

> Withdraw USDT from your Mavapay stablecoin wallet to an external address. The amount is specified in USDT cents (2 decimal places). For example, `100` = 1 USDT.



## OpenAPI

````yaml post /withdraw/stablecoin
openapi: 3.0.1
info:
  title: Mavapay API
  description: API documentation for Mavapay
  license:
    name: MIT
  version: 1.0.0
  contact:
    name: Mavapay
    url: https://mavapay.co
    email: info@mavapay.co
servers:
  - url: https://staging.api.mavapay.co/api/v1
    description: Staging server
  - url: https://api.mavapay.co/api/v1
    description: Live server
security:
  - ApiKeyAuth: []
    bearerAuth: []
tags:
  - name: Price
    description: Price related endpoints
  - name: Payment Link
    description: Payment Link endpoints for creating and managing hosted payment pages
  - name: Collection
    description: >-
      Stablecoin collection endpoints for generating and listing USDT deposit
      addresses
  - name: Withdraw
    description: Withdraw funds from Mavapay wallets to external accounts or addresses
paths:
  /withdraw/stablecoin:
    post:
      tags:
        - Withdraw
      summary: Withdraw stablecoin
      description: >-
        Withdraw USDT from your Mavapay stablecoin wallet to an external
        address. The amount is specified in USDT cents (2 decimal places). For
        example, `100` = 1 USDT.
      operationId: withdrawStablecoin
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - amount
                - network
                - currency
                - address
              properties:
                amount:
                  type: string
                  description: >-
                    The amount to withdraw in USDT cents (2 decimal places). For
                    example, `100` = 1 USDT, `500` = 5 USDT.
                  example: '500000'
                network:
                  type: string
                  description: >-
                    The blockchain network to withdraw on. Use lowercase values
                    in the request.
                  enum:
                    - trc20
                    - erc20
                    - plasma
                    - solana
                    - polygon
                  example: trc20
                currency:
                  type: string
                  description: >-
                    The stablecoin to withdraw. Currently only USDT is
                    supported.
                  enum:
                    - USDT
                  example: USDT
                address:
                  type: string
                  description: >-
                    The destination wallet address on the selected network. Must
                    be a valid address for that chain (e.g. a Tron address for
                    `trc20`, an Ethereum address for `erc20`).
                  example: TLt6fwdcdD18S36L9oiikn4Z8hebgwbzwS
                customerReference:
                  type: string
                  description: >-
                    Optional identifier you supply to correlate this withdrawal
                    in webhooks
                    (`stablecoinTransactionMetadata.customerReference`).
                  example: customer-provided-reference
            examples:
              withdrawTrc20:
                summary: Withdraw USDT on Tron (TRC20)
                value:
                  amount: '500000'
                  network: trc20
                  currency: USDT
                  address: TLt6fwdcdD18S36L9oiikn4Z8hebgwbzwS
              withdrawErc20:
                summary: Withdraw USDT on Ethereum (ERC20)
                value:
                  amount: '500000'
                  network: erc20
                  currency: USDT
                  address: '0x220303f911dbC38F09d13f8cC3ba8700f0Ca8C99'
                  customerReference: customer-provided-reference
        required: true
      responses:
        '200':
          description: Withdraw response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: ok
                  data:
                    $ref: '#/components/schemas/Transaction'
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
        - bearerAuth: []
components:
  schemas:
    Transaction:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: d1614a76-9c7f-4111-98a7-43199f307e5b
          description: The unique identifier for the transaction
        walletId:
          type: string
          format: uuid
          example: d1614a76-9c7f-4111-98a7-43199f307e5b
          description: The unique identifier for the wallet
        ref:
          type: string
          format: string
          example: 99eeff854ffd345fffs67890
          description: The reference for the transaction
        hash:
          type: string
          format: string
          example: 189727ef2e0f35921af7858b96e27cbad960b0ec2bb2a4ab73b6a231f9ce8727
          description: >-
            The payment hash for the lightning invoice attached to the quote
            related to the transaction
        amount:
          type: number
          format: number
          example: 1000
          description: The amount of the transaction in its lowest denomination
        fees:
          type: number
          format: number
          example: 0
          description: The fees for the transaction in its lowest denomination
        currency:
          type: string
          format: string
          enum:
            - NGN
            - KES
            - BTC
            - ZAR
            - GHS
            - USDT
          description: The currency of the transaction
        type:
          type: string
          format: string
          enum:
            - WITHDRAWAL
            - DEPOSIT
          description: The type of the transaction
        status:
          type: string
          format: string
          enum:
            - SUCCESS
            - PENDING
            - FAILED
          description: The status of the transaction
        autopayout:
          type: boolean
          format: boolean
          example: true
          description: Whether the transaction is an instant payout
        createdAt:
          type: string
          format: date-time
          example: '2021-07-01T12:00:00Z'
          description: The date and time the transaction was created
        updatedAt:
          type: string
          format: date-time
          example: '2021-07-01T12:00:00Z'
          description: The date and time the transaction was last updated
        metadata:
          $ref: '#/components/schemas/TransactionMetadata'
    Error:
      required:
        - error
        - message
      type: object
      properties:
        status:
          type: string
          format: string
          example: error
        message:
          type: string
    TransactionMetadata:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: d1614a76-9c7f-4111-98a7-43199f307e5b
        orderId:
          type: string
          format: string
          example: 99854-2345
        bankCode:
          type: string
          format: string
          example: '090267'
        bankAccountName:
          type: string
          format: string
          example: Satoshi Nakamoto
        bankAccountNumber:
          type: string
          format: string
          example: '0123456789'
        customerInternalFee:
          type: number
          format: number
          example: 0
        createdAt:
          type: string
          format: date-time
          example: '2021-07-01T12:00:00Z'
        updatedAt:
          type: string
          format: date-time
          example: '2021-07-01T12:00:00Z'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
    bearerAuth:
      type: http
      scheme: bearer

````