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

# Validate gift card

> Use the Validate Gift Card API call to send gift card data to the platform. In return, the Platform sends the card amount and approves that the card is valid.

<Note>
  Part of the [Gift Cards](/gift-cards-281937) integration guide — see it for when and how to use this endpoint.
</Note>


## OpenAPI

````yaml api-reference/specs/giftcards.yaml POST /ValidateGiftCard
openapi: 3.0.3
info:
  title: Gift Cards
  version: 1.0.0
  description: >-
    Customers with a gift card can use the card to pay for their purchases just
    as they would use other payment methods.
servers: []
security: []
paths:
  /ValidateGiftCard:
    post:
      summary: Validate gift card
      description: >-
        Use the Validate Gift Card API call to send gift card data to the
        platform. In return, the Platform sends the card amount and approves
        that the card is valid.
      operationId: validateGiftCard
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidateGiftCardRequest'
            example:
              MerchantGUID: ' '
              ShippingCountryCode: UA
              CardFields:
                CardId: card10
                CardPin: '111'
      responses:
        '200':
          description: Validation result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateGiftCardResponse'
              examples:
                success:
                  summary: Card is valid
                  value:
                    IsValid: true
                    Balance: 1000
                    CurrencyCode: GBP
                    IsGlobalEGiftCard: false
                successGlobalE:
                  summary: Valid card purchased through Global-e checkout
                  value:
                    IsValid: true
                    Balance: 1000
                    CurrencyCode: USD
                    IsGlobalEGiftCard: true
                error:
                  summary: Validation error
                  value:
                    IsValid: false
                    Balance: 1000
                    CurrencyCode: USD
                    IsGlobalEGiftCard: false
                    ErrorCode: Validation failed
                    ErrorText: Card not found
components:
  schemas:
    ValidateGiftCardRequest:
      type: object
      title: ValidateGiftCardRequest
      properties:
        MerchantGUID:
          type: string
          description: Merchant unique identifier.
        ShippingCountryCode:
          type: string
          description: Code of country selected in Shipping country dropdown.
        CardFields:
          type: object
          additionalProperties:
            type: string
          description: >-
            Values of each fields defined in configuration. Key – defined field
            name. Value – user input data.
    ValidateGiftCardResponse:
      type: object
      title: ValidateGiftCardResponse
      properties:
        IsValid:
          type: boolean
          description: Flag which approves that the user entered the correct card data.
        Balance:
          type: number
          description: Available amount of money on the gift card.
        CurrencyCode:
          type: string
          description: Code of card currency.
        IsGlobalEGiftCard:
          type: boolean
          description: If the card was bought from Global-e, should be true.
        ErrorCode:
          type: string
          description: Code of platform error.
        ErrorText:
          type: string
          description: Message of platform error.

````