> ## 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.

# Enable Existing Subscribers to Purchase a Gift Subscription for Another User

You can enable existing subscribers to purchase a Subscription as a gift for another user. To support this functionality, you must use the Subscribe APIs.

* **Use Case Number:** 2-4-16
* **Completed By:** Software Developer
* **Estimated Completion Time:** \<5 days

## Basic Scenario

An existing subscriber wants to purchase a gift Subscription from your self-care portal and receives a Coupon Code that can be redeemed for a free Subscription.

## Design Approach

Use the Product ID for the gift Subscription Product to get the gift Subscription amount and tax classification (if applicable) from the local product data store.

Use the transactions endpoint to create the one-time Transaction to purchase the gift code.

As shown in the following diagram, when the Transaction has been completed you can provide a valid Coupon Code to the customer from your local data store. This coupon code can be redeemed for a gift subscription. The sequence diagram demonstrates how to incorporate the giftee as an email recipient of the gift coupon code. When the Coupon Code is supplied, update your local data store to mark the coupon as sold and update the Account in Subscribe with metadata for the gift purchase (such as the Transaction ID, recipient email address and the Coupon Code).

<img src="https://mintcdn.com/amdocs-slm/1oldXCwQTdTzs3GW/portal/vindiciaSubscribeAndNewRetain/subscribeUseCases/images/SubG_4_001_existingCustomerGiftSubscriptionPurchase.png?fit=max&auto=format&n=1oldXCwQTdTzs3GW&q=85&s=46b77daca51140c1f5cff3af6fa1efb1" alt="" width="1032" height="718" data-path="portal/vindiciaSubscribeAndNewRetain/subscribeUseCases/images/SubG_4_001_existingCustomerGiftSubscriptionPurchase.png" />

* **[Enable Existing Subscribers to Purchase Gift Subscriptions](../topics/2416_r_enableExistingUserGiftSubscription#)**

**Parent topic:**[Gift Subscriptions](../topics/r_giftSubscriptions)

## Enable Existing Subscribers to Purchase Gift Subscriptions

* Set up an account with your payment processor of choice.
* Ensure Vindicia has been authorized as a presenter on the payment processor account.

1. Use the local data store for Products to GET the gift Subscription Product.

   * Extract the product amount to use for the gift purchase from the response
   * Extract the tax classification (if applicable)

2. Use the transactions endpoint to POST a new "Gift Purchase" Transaction to be authorized and captured.

   **Sample Code:**

   [https://github.com/Vindicia/SubscribeRESTCodeSamples/blob/master/Transactions/Transaction\_authCapture\_gift\_purchase\_existing\_customer.txt](https://github.com/Vindicia/CashBoxRESTCodeSamples/blob/master/Transactions/Transaction_authCapture_gift_purchase_existing_customer.txt)

3. Retrieve and mark the Coupon Code as sold in the local data store.

4. Update the accounts endpoint to POST the Coupon Code metadata for the gift purchase to the account.

   **Sample Code:**

   [https://github.com/Vindicia/SubscribeRESTCodeSamples/blob/master/Account/Account\_update\_metadata\_gift\_purchase.txt](https://github.com/Vindicia/CashBoxRESTCodeSamples/blob/master/Account/Account_update_metadata_gift_purchase.txt)

5. Provide the gift coupon code to the customer (optional: send communication to the gift recipient).

* The one-time transaction is generated if applicable, including any applicable taxation, and charged to the subscriber's on-file payment information.

* Giftee is issued a valid Coupon Code that is redeemable for a Subscription.

**Parent topic:**[Enable Existing Subscribers to Purchase a Gift Subscription for Another User](../topics/2416_r_enableExistingUserGiftSubscription#)


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