Gift a Gift Card

Enables a user to gift a gift card to another user

Headers
  • x-pch-digest
    Type: string
    required

    The signature for the API call

  • Authorization
    Type: string
    required

    Used to authorize the request with access_token. It should be supplied as Bearer ACCESS_TOKEN_GOES_HERE.

  • Content-Type
    Type: string
    required

    Set this header to application/json.

  • Accept-Language
    Type: string

    Preferred language

  • Accept
    Type: string
    required

    Advertises which content types the client is able to understand

  • User-Agent
    Type: string
    required

    Used to identify the software, device, and application initiating the request, providing information about the client to the server. For details, see User Agent.

Body
application/json
  • client
    Type: string
    required

    OAuth client ID provided by the business

  • amount
    Type: string

    Monetary value of the gift card

  • cardholder_name
    Type: string

    Name of the person who owns the payment card used to purchase the gift card

  • design_id
    Type: string

    Identification of a particular gift card design selected by the user while gifting a gift card

  • exp_date
    Format: dateenum
    const:  
    YYYY-MM-DD

    Expiration date of the payment card used by the user

    values
    • YYYY-MM-DD
  • payment_type
    Type: string

    This parameter is required when a user makes a payment via saved cards. Send "recurring" as the value of this parameter.

  • recipient_email
    Type: string

    Email address of the user who will receive the gift card. At least one of the three (i.e., recipient_email, recipient_phone, and recipient_fb_uid) should be provided. If more than one are provided as parameters, the system will identify that user for whom all of the provided parameters match.

  • recipient_fb_uid
    Type: string

    Facebook "uid" of the user who will receive the gift card. At least one of the three (i.e., recipient_email, recipient_phone, and recipient_fb_uid) should be provided. If more than one are provided as parameters, the system will identify that user for whom all of the provided parameters match.

  • recipient_phone
    Type: integerFormat: int32

    Phone number of the user who will receive the gift card. At least one of the three (i.e., recipient_email, recipient_phone, and recipient_fb_uid) should be provided. If more than one are provided as parameters, the system will identify that user for whom all of the provided parameters match.

  • transaction_token
    Type: string

    Unique digital identifier/token of the user's payment card, or the UUID of the saved payment card if the value of payment_type is "recurring". The transaction token is issued by a payment processor used by a business.

  • type
    Type: string

    Type of payment card used by the user (e.g., Visa, Mastercard, etc.).

Responses
  • text/plain
Request Example for post/api2/mobile/gift_cards/gift
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/gift_cards/gift \
  --request POST \
  --header 'x-pch-digest: {{$$.env.signature}}' \
  --header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
  --header 'Content-Type: application/json' \
  --header 'Accept-Language: en' \
  --header 'Accept: application/json' \
  --header 'User-Agent: AppName/AppVersion/BuildNumber (OS; Model; MANUFACTURER; MODEL; OS Version)' \
  --data '{
  "recipient_email": "test@example.com",
  "recipient_phone": 1111111111,
  "recipient_fb_uid": "FB_UID_GOES_HERE",
  "client": "CLIENT_GOES_HERE",
  "amount": "28",
  "design_id": "1",
  "transaction_token": "TOKEN_GOES_HERE",
  "cardholder_name": "FIRST_NAME_GOES_HERE LAST_NAME_GOES_HERE",
  "exp_date": 418,
  "type": "VISA"
}'
[
  "Whoa! You are one generous burrito stuffed amigo, with your gift of $28.00 to <user>."
]