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

# Create Gift Card

> Create a new gift card with specified title, template, currency and amount.

## Overview

This page documents the `POST /payment/open/institution/v1/pay/gift/create` endpoint. The full schema, parameters, and examples are rendered from the linked OpenAPI definition above.

## Notes

* Authentication uses the standard GatePay signed headers.
* This page documents the standard merchant endpoint.
* For shared signing rules, see [/api-reference/version/100/en/common/securityAndSignature](/api-reference/version/100/en/common/securityAndSignature).


## OpenAPI

````yaml /api-reference/version/100/en/openapi/institution/gift-card-openapi.json POST /payment/open/institution/v1/pay/gift/create
openapi: 3.1.0
info:
  title: GatePay API
  description: >-
    The gift card API solution provided by Gate Pay is designed to facilitate
    the instant creation and value checking of gift cards.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://openplatform.gateapi.io
security: []
paths:
  /payment/open/institution/v1/pay/gift/create:
    post:
      summary: Create Gift Card
      description: >-
        Create a new gift card with specified title, template, currency and
        amount.
      parameters:
        - $ref: '#/components/parameters/X-GatePay-Certificate-ClientId'
        - $ref: '#/components/parameters/X-GatePay-Signature'
        - $ref: '#/components/parameters/X-GatePay-Timestamp'
        - $ref: '#/components/parameters/X-GatePay-Nonce'
        - $ref: '#/components/parameters/X-GatePay-On-Behalf-Of'
      requestBody:
        description: Create gift card request parameters
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GiftCardCreateRequest'
            examples:
              basicExample:
                summary: Basic Example
                value:
                  title: api create gift card1
                  templateId: '255267012439183360'
                  currency: USDT
                  amount: '0.99'
        required: true
      responses:
        '200':
          description: Created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GiftCardCreateResponse'
              examples:
                successResponse:
                  summary: Success Response
                  value:
                    status: SUCCESS
                    code: '000000'
                    errorMessage: ''
                    data:
                      card_num: '2002356433468640'
                      card_key: yJgkiqAVCwS0tC8W5D+t9iFqwtxp9CUSHGBFYDDJ608=
                      amount: '0.99'
                      currency: USDT
                      status: 1
                      card_temp_id: '255267012439183360'
                      creator: 10002
                      creator_name: GateUser-8118f6f8
                      exchange_uid: 0
                      owner: 10002
                      give_count: 0
                      last_give_time: 0
                      create_time: 1737942105582
components:
  parameters:
    X-GatePay-Certificate-ClientId:
      name: X-GatePay-Certificate-ClientId
      in: header
      required: true
      description: Merchant client ID
      schema:
        type: string
        example: mZ96D37oKk-HrWJc
    X-GatePay-Signature:
      name: X-GatePay-Signature
      in: header
      required: true
      description: Signature
      schema:
        type: string
        example: >-
          b8c4705ff4c1357f2a27925dd180c1e1f4a244148f312a2dee5afbcc6f4b150e9ffceee455c5a298f895d43a64ee829eebdfd262539d45c41f7aee4336fd8c8c
    X-GatePay-Timestamp:
      name: X-GatePay-Timestamp
      in: header
      required: true
      description: Timestamp (milliseconds)
      schema:
        type: string
        example: '1738934053475'
    X-GatePay-Nonce:
      name: X-GatePay-Nonce
      in: header
      required: true
      description: Nonce
      schema:
        type: string
        example: '5417061546'
    X-GatePay-On-Behalf-Of:
      name: X-GatePay-On-Behalf-Of
      in: header
      required: true
      schema:
        type: string
      description: >-
        Required delegated-subject header. Provide the initiating account ID for
        this request. For institution merchant APIs, this is typically the
        target sub-account ID; for institution charge and transfer APIs, it can
        be either an institution account ID or a sub-account ID.
  schemas:
    GiftCardCreateRequest:
      type: object
      required:
        - title
        - templateId
        - currency
        - amount
      properties:
        title:
          type: string
          description: Gift card title
          example: api create gift card1
        templateId:
          type: string
          description: Gift card template ID
          example: '255267012439183360'
        currency:
          type: string
          description: Currency of gift card
          example: USDT
        amount:
          type: string
          description: Amount of gift card
          example: '0.99'
    GiftCardCreateResponse:
      type: object
      properties:
        status:
          type: string
          description: Response status
          example: SUCCESS
        code:
          type: string
          description: Response code, 000000 indicates success
          example: '000000'
        errorMessage:
          type: string
          description: Error message, empty on success
          example: ''
        data:
          $ref: '#/components/schemas/GiftCardCreateData'
    GiftCardCreateData:
      type: object
      properties:
        card_num:
          type: string
          description: Card number
          example: '2002356433468640'
        card_key:
          type: string
          description: Redemption code of gift card
          example: yJgkiqAVCwS0tC8W5D+t9iFqwtxp9CUSHGBFYDDJ608=
        amount:
          type: string
          description: Amount of gift card
          example: '0.99'
        currency:
          type: string
          description: Currency of gift card
          example: USDT
        status:
          type: integer
          description: >-
            Gift card status: 0=Unknown, 1=Pending Payment, 2=Not Redeemed,
            3=Redeemed, 4=Frozen, 5=Payment Failed, 6=Manual Review, 7=Review
            Rejected, 8=Review Payment Failed
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
          example: 1
        card_temp_id:
          type: string
          description: Gift card template ID
          example: '255267012439183360'
        creator:
          type: integer
          description: Creator ID
          example: 10002
        creator_name:
          type: string
          description: Name of the gift card creator
          example: GateUser-8118f6f8
        exchange_uid:
          type: integer
          description: Redeemer ID
          example: 0
        owner:
          type: integer
          description: Owner ID
          example: 10002
        give_count:
          type: integer
          description: Number of times gifted
          example: 0
        last_give_time:
          type: integer
          description: Last gift time
          example: 0
        create_time:
          type: integer
          format: int64
          description: Create time (millisecond timestamp)
          example: 1737942105582

````