Gift a Gift Card
Enables a user to gift a gift card to another user
- Type: stringx
-pch -digest requiredThe signature for the API call
- Type: stringAuthorizationrequired
Used to authorize the request with access_token. It should be supplied as
Bearer ACCESS_TOKEN_GOES_HERE. - Type: stringContent
- Type requiredSet this header to application/json.
- Type: stringAccept
- Language Preferred language
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
- Type: stringUser
- Agent requiredUsed to identify the software, device, and application initiating the request, providing information about the client to the server. For details, see User Agent.
- Type: stringclientrequired
OAuth client ID provided by the business
- Type: stringamount
Monetary value of the gift card
- Type: stringcardholder
_name Name of the person who owns the payment card used to purchase the gift card
- Type: stringdesign
_id Identification of a particular gift card design selected by the user while gifting a gift card
- Format: dateenumexp
_date const:YYYY-MM-DDExpiration date of the payment card used by the user
values- Y
Y Y Y - M M - D D
- Type: stringpayment
_type This parameter is required when a user makes a payment via saved cards. Send "recurring" as the value of this parameter.
- Type: stringrecipient
_email 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.
- Type: stringrecipient
_fb _uid 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.
- Type: integerFormat: int32recipient
_phone 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.
- Type: stringtransaction
_token Unique digital identifier/token of the user's payment card, or the UUID of the saved payment card if the value of
payment_typeis "recurring". The transaction token is issued by a payment processor used by a business. - Type: stringtype
Type of payment card used by the user (e.g., Visa, Mastercard, etc.).
- text/plain
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>."
]