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

# Redeem and withdraw

> Redeems an existing unused voucher and transfers crypto to the provided wallet address



## OpenAPI

````yaml patch /v1/voucher/redeem-and-withdraw
openapi: 3.0.2
info:
  title: Ventogram merchant API
  version: 1.0.0
  description: Ventogram merchant API
servers:
  - url: https://staging-vouchers.ventogram.com/api
    description: Production
security: []
tags: []
paths:
  /v1/voucher/redeem-and-withdraw:
    patch:
      tags:
        - Voucher
      summary: Redeem and withdraw
      description: >-
        Redeems an existing unused voucher and transfers crypto to the provided
        wallet address
      operationId: redeem-and-withdraw
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: Email that was used to create the voucher
                voucherCode:
                  type: string
                  description: Voucher code to be redeemed
                network:
                  type: string
                  description: Supported crypto network
                currency:
                  type: string
                  enum:
                    - USDC
                    - USDT
                  description: Cryptocurrency to send to the provided wallet details
                merchantFee:
                  type: string
                  description: >-
                    In USD (optional) with a precision of 2 decimal places
                    (max). Can be supplied if the merchant want to withdraw a
                    portion of the voucher amount into their Ventogram balance.
                    This must be a fraction or all of voucher value (ie received
                    amount - voucher fee)
                cryptoAddress:
                  type: string
                  description: >-
                    Must be provided along with newtwork. The crypto wallet
                    address on the provided network, to which crypto equivalent
                    will be sent
                rateKey:
                  type: string
                  description: >-
                    This is a Ventogram-signed rate key. This will be returned
                    in response if the signed rate was used for conversion.
              required:
                - email
                - voucherCode
                - network
                - currency
                - cryptoAddress
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Voucher ID
                      email:
                        type: string
                        description: Email that aws used to create the voucher
                      voucherCode:
                        type: string
                        description: Voucher code to be redeemed
                      merchant:
                        type: string
                        description: username of the merchant that created the voucher
                      fromCurrency:
                        type: string
                        description: voucher payment currency
                      voucherFee:
                        type: number
                        description: >-
                          The fee associated with voucher in the payment
                          currency. This will be deducted from merchant's
                          balance if merchant is the fee bearer.
                      feeBearer:
                        type: string
                        description: The bearer of voucher fee
                        enum:
                          - merchant
                          - client
                      toAmount:
                        type: number
                        description: The amount that was sent to user wallet address.
                      fromAmount:
                        type: number
                        description: Voucher payment amount.
                      toCurrency:
                        type: string
                        description: The currency that was sent to user wallet.
                      rate:
                        type: number
                        description: >-
                          The exchange rate that was used for conversion (if
                          applicable) at the time of redeeming the voucher. If
                          there's no conversion, the value is 1.
                      merchantFee:
                        type: number
                        description: >-
                          This can be optionally provided by the merchant in the
                          request if they want some of the received amount to be
                          added to their Ventogram balance.
                      withdrawalFee:
                        type: number
                        description: >-
                          The processing fee for the crypto transfer that will
                          be deducted from the merchant's account. Merchants
                          must maintain a sufficient balance to utilize the
                          redeem-and-withdraw endpoint.
                      previousBalance:
                        type: number
                        description: Merchant's balance before redeeming voucher
                      convertedVoucherFee:
                        type: number
                        description: Voucher fee in the outgoing currency
                      convertedVoucherFeeCurrency:
                        type: string
                        description: The same as toCurrency
                      toAccount:
                        type: string
                        description: >-
                          The crypto wallet address to which asset was
                          transferred
                      currentBalance:
                        type: number
                        description: Merchant's balance after redeeming voucher
                      reference:
                        type: string
                        description: This is basically a unique id
                      creditCurrency:
                        type: string
                        description: Merchant's balance currency
        '400':
          description: Failed operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
                    example:
                      - voucherCode is required
        '404':
          description: Failed operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  message:
                    type: string
                  errors:
                    type: array
                    example: []
      security:
        - ApiUser: []
          ApiKey: []
components:
  securitySchemes:
    ApiUser:
      type: apiKey
      in: header
      name: X-Api-User
    ApiKey:
      type: apiKey
      in: header
      name: X-Api-Key

````