Skip to main content
You can enable new subscribers to purchase a Subscription as a gift for another user.
  • Use Case Number: 2-2-17
  • Completed By: Merchant Developer
  • Estimated Completion Time: <5 days

Basic Scenario

A new customer wants to purchase a gift subscription from the merchant storefront and get a coupon code that can be redeemed for a free subscription.

Design Approach

As shown in the following diagram, you must use Payment Method Tokenization to add the credit card as the payment method and then get the payment method VID. Then use the transactions endpoint to create the account, associate the credit card payment method and perform a one-time transaction to purchase the gift code. When the transaction has been completed you must 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 illustrates how to incorporate the giftee as an email recipient of the gift coupon code. When the Coupon Code is supplied, the local data store is updated to mark the coupon as sold and the account is updated with metadata for the gift purchase (such as the Transaction ID, recipient email address and the Coupon Code).

References

Parent topic:Gift Subscriptions

Set Up One Time Gift Transaction

  • Set up an account with your payment processor of choice.
  • Ensure Vindicia has been authorized as a presenter on the payment processor account.
  • Configure gift Subscription Product SKU and generate gift Coupon Codes (see Offer Gift Subscriptions).
  1. Use the local data store for Products to GET the gift subscription product.
    • From the response, extract the product amount to use for the gift purchase.
    • Extract the tax classification (if applicable).
  2. Collect the user account information.
  3. Use PMT to create a credit card payment method and get the payment method VID.
  4. Use the transactions endpoint to POST a new transaction to be authorized and captured (create the account, associate the payment method, generate the Transaction). Sample Code https://github.com/Vindicia/SubscribeRESTCodeSamples/blob/master/Transactions/Transaction_authCapture_gift_purchase.txt
  5. Retrieve and mark the Coupon Code as sold in the local data store.
  6. 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
  7. Provide the gift Coupon Code to the customer (optional: send communication to the gift recipient).
  • The Account and Payment Method objects are created in Subscribe representing the new customer who purchased the gift.
  • A one-time Transaction is generated if applicable, including any applicable taxation, and charged to the customer’s on-file payment method.
  • The customer is issued a valid Coupon Code that is redeemable for a Subscription.
Parent topic:Enable New Customers to Purchase a Gift Subscription for Another User