Private store

A Private Store offers a custom shopping experience with special discounts, product assortment, or merchandising offers. It also limits purchases to authorized shoppers.

A Private Store (also known as Purchase Plan) is an online store that caters exclusively to a known group of customers.

The Private Stores feature allows you to:

  • Tap into new market segments

  • Avoid channel conflicts with the minimum advertised price (MAP)

  • Liquidate overstocked items or items nearing the end of life

  • Strengthen partner relationships by offering discounts to their employees

  • Use purchase limits to prevent abuse of a discounted product price

  • Fast setup of new offering without Digital River involvement

You can create stores for specific audiences, such as B2B stores, VIP stores, employee stores, and so on. A Private Store allows you to provide special pricing on specific products for a select group of shoppers. You can define which products you want to show in the Private Store and the price of those products. You can also control how shoppers access the Private Store.

For more information on Private Stores, see Private Stores in the Global Commerce Help.

The following image shows the anatomy of a Private Store, where:

  • Private Stores are owned by a site

  • Offers, Products, Themes, Styles, etc. can all be used within a Private Store

  • A Private Store Contains 1 or More Product Groups

  • A Private Store Contains 1 or More Microstores

Anatomy of a Private Store

The following information describes how to submit an order to a Public Store, Private Store, or Friends and Family.

Prerequisite: A user with the role of a Private Store Manager in Global Commerce must enable Private Stores in Site Settings. See Private Stores under Configuring site settings in the Global Commerce Help for more information.

Submit an order for a private store

To submit an order for a Private Store

  1. Get a limited access token.

  2. Enable the Private Store.

  3. Buy a product.

  4. Update the billing and shipping address.

  5. Apply a DigitalRiver.js payment source.

  6. Submit the cart.

Step 1. Get a limited access token

Request
Request
POST /oauth20/token?grant_type=password&sessionToken={{session_token}}
Authorization: {{apikey_secret_authr}}

Step 2. Enable the private store

You can apply a Private Store to either a limited access token or a full access token.

An access method determines how a shopper can access the pricing for a purchase plan. The following list describes the available access methods from most restrictive to least restrictive:

  • Email Address—The shopper must use their email address to access the Private Store.

  • Email Domain—The shopper’s email address must use one of the domains you specified entered for the Private Store. A domain is the end of the email address, such as the "digitalriver.com" in "jane.doe@digitalriver.com."

  • Email Invitation—The shopper can join the Private Store through an email forwarded to them from someone they know. The person who sent the invitation has to approve invite if the shopper places an order. A Private Store that uses this access method is also called "friends and family" plan.

  • Generic Identifier—The shopper must enter a name and a PIN created for the Private Store. Private Stores can have multiple names and PIN combinations used to access the plan.

  • IP Address—The shopper must be on a network using a specific IP address or an IP address within a defined range.

  • Referral URL—The shopper must click a link to access the Private Store.

  • Bypass Access Method—Use this option when you don't want to specify the access method parameter. The bypassAccessRuleType can be any within EmailAddress, EmailDomain, EmailInvitation, or IpAddress.

You can use one of the following options as the authorization method in the request body for a Private Store:

Email address example
Email domain example
IP address example
Email invitation example
Return URL example
Bypass access method example
Email address example
{
"purchasePlanAuthorize": {
"id": "126668174",
"targetMarketId": "126690174",
"emailAddress": "chiliu@digitalriver.com"
}
}
Email domain example
{
"purchasePlanAuthorize": {
"id": "101558174",
"targetMarketId": "101580174",
"emailDomain": "digitalriver.com"
}
}
IP address example
{
"purchasePlanAuthorize": {
"id": "101558174",
"targetMarketId": "101580174",
"ipAddress": "1.2.3.4"
}
}
Email invitation example
{
"purchasePlanAuthorize": {
"id": "126668274",
"targetMarketId": "126690274",
"emailInvitationAddress": "chiliu@digitalriver.com",
"emailInvitationPin": "I2wbfVSg"
}
}
Return URL example
{
"purchasePlanAuthorize": {
"id": "101558174",
"targetMarketId": "101580174",
"referralUrl": "http://aaa.bbb.ccc.ddd"
}
}
Bypass access method example
{
"purchasePlanAuthorize": {
"id": "101558174",
"targetMarketId": "101580174",
"bypassAccessRuleType": "EmailAddress"
}
}

If you view the session, you will see the extended attributes for marketID and purchasePlanID.

Step 3. Buy a product

Once you've added a product to a cart, notice the discounts under pricing and the PURCHASEPLAN_INCENTIVE_TOTAL value under extended attributes.

Request
Request
POST /shoppers/me/carts/active?productId=107845474&quantity=2
Authorization: bearer {{access_token}}

Step 4. Update the billing and shipping address

Request
Request body
Request
POST /shoppers/me/carts/active.json
Authorization: bearer {{access_token}}
Request body
{
"cart": {
"billingAddress": {
"firstName": "Anita",
"lastName": "Liu",
"emailAddress":"chiliu@digitalriver.com",
"companyName": null,
"line1": "10380 Bren Rd",
"line2": null,
"line3": null,
"city": "Taipei",
"countrySubdivision": "MN",
"postalCode": "10682",
"country": "US"
},
"shippingAddress": {
"firstName": "Anita",
"lastName": "Liu",
"emailAddress":"chiliu@digitalriver.com",
"companyName": null,
"line1": "10380 Bren Rd",
"line2": null,
"line3": null,
"city": "Taipei",
"countrySubdivision": "MN",
"postalCode": "10682",
"country": "US"
}
}
}

Step 6. Submit the cart

Request
Request
POST /shoppers/me/carts/active/submit-cart.json
Authorization: bearer {{access_token}}

Useful APIs

Get access token by session token

Request
Request
GET /shoppers/token.json?apiKey={{client_id}}&session_token={{session_token}}
Authorization: {{apikey_secret_authr}}

Check if the access token is authenticated

Request
Request
GET /oauth20/access-tokens.json?token={{access_token}}
Authorization: {{apikey_secret_authr}}

Search for a private store

When you search for a Private Store, the id for purchasePlanAuthorize and the targetMarketId appears in the response. When you search for a Private Store, you need to provide id for the purchasePlanAuthorize and the targetMarketId in the request. Unless you frequently create and edit private stores, this step is not required. You should store or cache these attributes on your side.

HTTP
HTTP
"purchasePlanAuthorize":{
"id":"4912758700",
"targetMarketId":"4897371800",
}
}