Purchase Plan Workflow

This topic describes the Purchase Plan workflow. When setting up a Purchase Plan workflow, follow these steps.

  1. Search for a private store (optional).
  2. Get an access token.
  3. Authorize the shopper into the private store.

Scenario assumptions

This purchase plan scenario assumes:

  • The site uses a public API key.
  • The site has multiple purchase plans to choose from, and the purchase plan ID and its corresponding target market ID are unknown. If you know the purchase plan ID and target market ID information, the search step is optional.
  • Only one access rule is configured for authorizing shoppers by email domain.
  • Shopper authentication is required to browse within a purchase plan. Authentication is a prerequisite if isAuthenticationRequiredToBrowse is set to true.

Step 1. Search for a Private Store

Send a GET request with the access rules search criteria for the private store to the Purchase Plan Search API. The example request searches for available private stores matching the email domain. The search matches criteria based on OR logic, so if multiple access rules are configured for a private store, the search can locate private stores based on one valid configured access rule. For instance, if a private store restricts access by both email domain and IP address, searching by only the email domain finds the associated private store.


GET https://api.digitalriver.com/v1/shoppers/me/purchase-plan/search?emailDomain=university.edu&apiKey=apiKey HTTP/1.1


      <purchaseplanname>Student Discounts</purchaseplanname>

Step 2. Get an Access Token

Send a GET request to the Shoppers Token API under Shopper APIs. The following request passes in a public API key and overrides the response format as xml.


GET https://api.digitalriver.com/v1/shoppers/token?apiKey=yourAPIkey&format=xml HTTP/1.1



Step 3. Authorize the Shopper into the Private Store

Send a POST request with the access rule criteria in the payload to the Purchase Plan Authorize API. You must pass the private store id, targetMarketId, and emailDomain access rule in the request body.


POST https://api.digitalriver.com/v1/shoppers/me/purchase-plan/authorize HTTP/1.1




The service returns an empty document with an HTTP Status 204.

HTTP/1.1 204 No Content

If the request was successful, the shopper can browse and purchase products from the purchase plan on the private store. If the private store provides an overall discount for products in the private store, the Products API reflects discounted prices, as well as any associated offers. The Carts API also reflects discount prices. If the request was unsuccessful, an error message indicates the issue.

Continue the Workflow

Subsequent calls in the workflow could include:

  1. Add a product to a cart.
  2. Redirect a shopper to the Checkout page.