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

# Purchase Gift Card



## OpenAPI

````yaml /novacrust-open-api-v2.yaml post /api/v1/business/open/gift-card/purchase
openapi: 3.0.0
info:
  title: Open-API
  description: The http Integration API description
  version: '1.0'
  contact: {}
servers:
  - url: http://localhost:3050
    description: Local environment
  - url: https://api-staging.novacrust.com
    description: Staging environment
  - url: https://api-dev.novacrust.com
    description: Develop environment
security:
  - api-key: []
tags:
  - name: Customer
    description: ''
  - name: Payout Methods
    description: ''
  - name: Beneficiary
    description: ''
  - name: Payout
    description: ''
  - name: Transactions
    description: ''
  - name: Buy Gift Card
    description: ''
  - name: Sell Gift Card
    description: ''
  - name: Miscellaneous
    description: ''
paths:
  /api/v1/business/open/gift-card/purchase:
    post:
      tags:
        - Buy Gift Card
      summary: Purchase Gift Card
      operationId: purchaseGiftCard
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OpenApiPurchaseGiftCardDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchaseGiftCardResponseDTO'
      security:
        - access-token: []
components:
  schemas:
    OpenApiPurchaseGiftCardDto:
      type: object
      properties:
        product_id:
          type: string
          description: Product uuid
        amount:
          type: number
          description: Amount
          example: 50
        quantity:
          type: number
          description: Quantity
          example: 1
        recipient_email:
          type: string
          description: Recipient email
          example: johndoe@example.com
        from_name:
          type: string
          description: From name
          example: John Doe
        recipient_phone_number:
          type: string
          description: Recipient phone number
          example: '+2348062964137'
        agree_to_terms:
          type: boolean
          description: Agree to terms and conditions
          example: true
      required:
        - product_id
        - amount
        - quantity
        - recipient_email
        - agree_to_terms
    PurchaseGiftCardResponseDTO:
      type: object
      properties:
        message:
          type: string
          example: Gift card purchased successfully
        status:
          type: boolean
          example: true
        data:
          $ref: '#/components/schemas/GiftCardOrderDetailDTO'
      required:
        - message
        - status
        - data
    GiftCardOrderDetailDTO:
      type: object
      properties:
        uuid:
          type: string
        amount:
          type: number
        quantity:
          type: number
        totalAmount:
          type: number
        totalFee:
          type: number
        platformFee:
          type: number
        providerFee:
          type: number
        currencyCode:
          type: string
        recipientEmail:
          type: string
        reference:
          type: string
        status:
          type: string
        providerTransactionId:
          type: string
          nullable: true
        productName:
          type: string
        createdAt:
          format: date-time
          type: string
        redemptionCodes:
          type: array
          items:
            $ref: '#/components/schemas/GiftCardRedemptionCodeDTO'
      required:
        - uuid
        - amount
        - quantity
        - totalAmount
        - totalFee
        - platformFee
        - providerFee
        - currencyCode
        - recipientEmail
        - reference
        - status
        - productName
        - createdAt
        - redemptionCodes
    GiftCardRedemptionCodeDTO:
      type: object
      properties:
        cardNumber:
          type: string
        pinCode:
          type: string
          nullable: true
        redemptionUrl:
          type: string
          nullable: true
      required:
        - cardNumber
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: authorization

````

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