Giftcard Requested Webhook
If you are using a third party gift card provider, this webhook is triggered when a return with a store credit outcome is processed. This webhook is also triggered if you have configured Loop to automatically create a gift card when a new exchange item is out of stock.
| Response Header | Description |
|---|---|
| X-Loop-Signature | Hashed Webhook Secret Key |
The X-Loop-Signature is a base-64, HMAC hash of body payload using the Webhook Secret provided by Loop.
Note: Before attempting to create your hash of the POST request body, make sure slashes have been escaped & newlines have been removed from the JSON.
| Field | Description |
|---|---|
| topic | Webhook type (giftcard) |
| trigger | Event that triggered the webhook (requested) |
| id | Loop gift card ID, null in the case of auto out-of-stock gift cards |
| total_credit_issued | Total gift card value |
| gift_card_subtotal | Gift card value minus taxes and bonus |
| gift_card_tax | Gift card tax applied, "0.00" if no taxes applied |
| gift_card_bonus_credit | Gift card bonus credit applied, "0.00" if no bonus applied |
| currency | Currency of the gift card values |
| return_id | Loop return ID |
| Customer email address | |
| first_name | Customer first name |
| last_name | Customer last name |
| external_order_id | Order ID from the eCommerce provider (Shopify) |
| external_order_name | Order name from the eCommerce provider |
| external_order_number | Order number from the eCommerce provider |
Response
{
"topic": "giftcard",
"trigger": "giftcard.requested",
"id": 12345,
"total_credit_issued": "23.50",
"gift_card_subtotal": "25.00",
"gift_card_bonus_credit": "1.00",
"gift_card_tax": "0.50",
"currency": "USD",
"return_id": 23456,
"email": "[email protected]",
"first_name": "Eliza",
"last_name": "Strawberry",
"external_order_id": 1234567890,
"external_order_name": "#2234",
"external_order_number": 1234,
}
