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

# GiftCard.statusInquiry

The `statusInquiry` method causes Subscribe to check with the gift card processor to learn the latest status of an input `GiftCard`. Subscribe populates the `status` attribute in the `GiftCard` object it returns in response. Call this method before redeeming a gift card. If the status is `Active`, the gift card is redeemable.

## Input

*srd*: sparse response description, a SOAP string (which must be a JSON object), in which you specify the elements you want returned.This parameter enables the calling system to constrain a `method` call to return only components you specify. This gives you greater control over returned content, and improves response time within the Vindicia platform by reducing the processing needed for the call.

Some fields are required, either practically or in the WSDL, and will be returned regardless of the *srd*. A null *srd* returns the complete response.

*giftCard*: the `GiftCard` object for which you want a status check. If this is a new gift card, be certain to specify the `pin` attribute. If this is an existing `GiftCard` object, you may specify only the `VID` attribute.

## Output

*return*: an object of type `Return` that indicates the success or failure of the call.

*giftcard*: the `GiftCard` object requested, with an updated status.

## Returns

In addition to those listed in [The Return Object](The_Return_Object), this call returns:

| Return Code | Return String |
| - | - |
| `400` | `Gift Card could not be saved prior to status. Status Inquiry attempt failed *error-description*.` |

## Example

```

$gc = new GiftCard(); 

   // set the PIN provided by the customer
$gc->setPin('683092298403'); 
$gc->setPaymentProvider('your gift card processor');

// Now make API call to check the status of the gift card

$response = $gc->statusInquiry(); 
if($response['returnCode'] == 200) { 
   // The API call is successful. Now check the
   // status in the updated GiftCard object returned by this call

   $updatedGc = $response['data']->giftcard; 
   $status = $updatedGc->getStatus(); 

   // the status thus obtained is an object of type GiftCardStatus
   // Now check if it indicates gift card is redeemable

   if ($status->getStatus() == 'Active') {

      // The gift card is redeemable, so retrieve its VID
      // so that we can reference it just by VID when we redeem it

      $gcVID = $updatedGc->getVID();
   }
   else {
      // Gift card is not redeemable. Inform the customer here
      // You may want to include the response received from the gift
      // card processor

      $responseCode = $status->getProviderResponseCode();
      $responseMsg = $status->getProviderResponseMessage();
   }
}
```

**Parent topic:**[GiftCard Methods](../topics/GiftCard_Methods)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.