Purchase

Use the Purchase API to purchase a product instantly. See Transparent Commerce Purchase Flow for more information.

Methods


					Host: api.digitalriver.com
User-Agent: API Client/1.0
Accept: */*
Authorization: bearer your_access_token
			
					The request body should be empty.
			
					HTTP/1.1 201 Created
Server: Apache
X-Server-Name: <server_name>
Location: https://api.digitalriver.com/shoppers/me/orders/order_ID
Content-Length: 0
Accept-Ranges: bytes
Date: Fri, 17 Jan 2014 16:46:30 GMT
Age: 0
Access-Control-Allow-Origin: *
			
					<order uri="https://api.digitalriver.com/shop-ci/shoppers/me/orders/1234567890">
   <id>1234567890</id>
   <submissionDate>2016-01-14T20:03:28.558Z</submissionDate>
   <displayName>New Order</displayName>
   <locale>en_US</locale>
   <optIn>false</optIn>
   <testOrder>false</testOrder>
   <taxExempt>false</taxExempt>
   <pricing>
      <subtotal currency="USD">17.99</subtotal>
      <incentive currency="USD">5.00</incentive>
      <shipping currency="USD">0.00</shipping>
      <tax currency="USD">0.95</tax>
      <total currency="USD">13.94</total>
      <formattedSubtotal>$17.99</formattedSubtotal>
      <formattedIncentive>$5.00</formattedIncentive>
      <formattedShipping>$0.00</formattedShipping>
      <formattedTax>$0.95</formattedTax>
      <formattedTotal>$13.94</formattedTotal>
   </pricing>
   <payment>
      <customerLastName>Doe</customerLastName>
      <customerFirstName>John</customerFirstName>
      <paymentAmount currency="USD">13.94</paymentAmount>
      <paymentMethodName>visa</paymentMethodName>
   </payment>
   <orderState>Complete</orderState>
   <billingAddress uri="https://api.digitalriver.com/shop-ci/shoppers/me/orders/order_ID/billing-address">
      <id>billingAddress</id>
      <firstName>John</firstName>
      <lastName>Doe</lastName>
      <companyName>Digital River</companyName>
      <line1>1234 West 76th St</line1>
      <line2>Ste 1</line2>
      <line3/>
      <city>Eden Prairie</city>
      <countrySubdivision>MN</countrySubdivision>
      <postalCode>55344-3765</postalCode>
      <country>US</country>
      <countryName>United States</countryName>
      <phoneNumber>952-253-000 x132</phoneNumber>
      <emailAddress>98019080@digitalriver.com</emailAddress>
   </billingAddress>
   <shippingAddress uri="https://api.digitalriver.com/shop-ci/shoppers/me/orders/order_ID/shipping-address">
      <id>shippingAddress</id>
      <firstName>John</firstName>
      <lastName>Doe</lastName>
      <companyName>Digital River</companyName>
      <line1>1234 West 76th St</line1>
      <line2>Ste 1</line2>
      <line3/>
      <city>Eden Prairie</city>
      <countrySubdivision>MN</countrySubdivision>
      <postalCode>55344-3765</postalCode>
      <country>US</country>
      <countryName>United States</countryName>
      <phoneNumber>952-253-0000 x132</phoneNumber>
      <emailAddress>98019080@digitalriver.com</emailAddress>
   </shippingAddress>
   <lineItems uri="https://api.digitalriver.com/shop-ci/shoppers/me/orders/order_ID/line-items">
      <lineItem relation="https://developers.digitalriver.com/v1/shoppers/LineItemsResource" uri="https://api.digitalriver.com/shop-ci/shoppers/me/orders/order_ID/line-items/line_item_ID">
         <id>29628516380</id>
         <quantity>1</quantity>
         <product uri="https://api.digitalriver.com/shop-ci/shoppers/me/products/product_ID">
            <parentProduct relation="https://developers.digitalriver.com/v1/shoppers/ProductsResource" uri="https://api.digitalriver.com/shop-ci/shoppers/me/products/product_ID"/>
            <id>645785001</id>
            <name>Class I</name>
            <displayName>Class I</displayName>
            <shortDescription>Class I is the perfect GPS waypoint and route manager for the beginning or occasional GPS user.</shortDescription>
            <longDescription>Class I is the fast and easy way to create, edit, and transfer waypoints and routes between your computer and your Garmin, Magellan, or Lowrance GPS. Using Class I, you can manage all of your waypoints and routes, and display them in lists sorted by name, elevation, or distance. Class I connects your GPS to the best mapping and information sites on the Internet, giving you one-click access to street and topo maps, aerial photos, weather forecasts, and nearby attractions.</longDescription>
            <productType>DOWNLOAD</productType>
            <sku>Class I</sku>
            <externalReferenceId>Test External Reference Number</externalReferenceId>
            <companyId>demosft1</companyId>
            <displayableProduct>true</displayableProduct>
            <purchasable>true</purchasable>
            <manufacturerName>Test Manufacturer Name</manufacturerName>
            <manufacturerPartNumber>Test Manufacturer Part Number</manufacturerPartNumber>
            <thumbnailImage>https://classIThumb.jpg</thumbnailImage>
            <productImage>https://classIBox.jpg</productImage>
            <keywords>testKeyword</keywords>
            <customAttributes>
               <attribute name="platform" type="String">1 User License</attribute>
               <attribute name="applicationFile" type="String">WaterLilies.jpg</attribute>
               <attribute name="originalIsOrderable" type="Boolean">true</attribute>
               <attribute name="fileSizeValidatedDate" type="Date">Tue Sep 25 11:00:19 CDT 2007</attribute>
               <attribute name="numberOfDownloads" type="Integer">5</attribute>
               <attribute name="numberOfIPAddresses" type="Integer">10</attribute>
               <attribute name="eula" type="String">test</attribute>
               <attribute name="gameRating" type="String">Adults Only</attribute>
               <attribute name="timeFrame" type="Integer">30</attribute>
               <attribute name="fileSize" type="Integer">82</attribute>
               <attribute name="downloadDisplayNames" type="List">[]</attribute>
               <attribute name="downloadType" type="String">HTTP</attribute>
               <attribute name="fileOnBackupMedia" type="Boolean">true</attribute>
               <attribute name="downloadDisplayName" type="String">WaterLilies.jpg</attribute>
               <attribute name="originalIsViewable" type="Boolean">true</attribute>
               <attribute name="nonSolr" type="Boolean">false</attribute>
               <attribute name="downloadAdapter" type="String">com.digitalriver.downloads.adapters.DRHDownloadAdapter</attribute>
               <attribute name="downloadDisplayed" type="Boolean">true</attribute>
            </customAttributes>
         </product>
         <pricing>
            <listPrice currency="USD">19.99</listPrice>
            <listPriceWithQuantity currency="USD">19.99</listPriceWithQuantity>
            <salePriceWithQuantity currency="USD">17.99</salePriceWithQuantity>
            <formattedListPrice>$19.99</formattedListPrice>
            <formattedListPriceWithQuantity>$19.99</formattedListPriceWithQuantity>
            <formattedSalePriceWithQuantity>$17.99</formattedSalePriceWithQuantity>
         </pricing>
         <downloads>
            <downloadUri>http://some.jpg</downloadUri>
         </downloads>
         <digitalRights/>
      </lineItem>
   </lineItems>
</order>
			

Response Body Parameters

Field
Data Type
Visibility
Description
billingAddress
link
default
The billing address for the order. See the Addresses API and Fields Used as Keys for more information.
digitalRights
structured
default
Digital rights manage the serial numbers and unlock codes that control shopper access to purchased software and other digital products.
displayName
string
default
The name of the order
downloads
link
default
Contains links that a shopper can user to download purchased digital products.
id
string
default
The order information for the submitted cart. For more information, see the Orders API.
lineItems
collection
default
A collection of line items. For more information, see the Line Items API.
locale
string
default
The preferred locale.
name
string
default
The name of the order.
orderState
string
default
The state of the order. The order state is a combination of order state, payment settlement state, refund state.
Payment settlement state:
  • Settled
  • Not Settled
  • Partially Settled
Refund state:
  • Refund – Completed
  • Refund – Failed
  • Refund – Pending
  • Partial Refund – Completed
  • Partial Refund – Failed
  • Partial Refund – Pending
optIn
Boolean
default

payment
structured
default
The payment information for an order.
payment.customerFirstName
string
default
The customer's first name. See Fields Used as Keys for more information.
payment.customerLastName
string
default
The customer's last name. See Fields Used as Keys for more information.
payment.paymentAmount
decimal
default
The payment amount for the order.  
payment.paymentMethodName
string
default
The payment method name for the order. Possible values include the following: Visa, Mastercard, Americanexpress, JCB, Invoice, Lite, or Purchaseorder.
pricing
structured
default
The pricing for the purchase. For more information, see the Pricing API.
shippingAddress
link
default
The shipping address for the order. See the Addresses API for more information
submissionDate
Date
Default
The date the order was submitted.
taxExempt
Boolean
default
When true, the order is tax exempt.
testOrder
Boolean
hidden
When true, the order is a test order. Visibility must be set to true for non-test orders.  

Related APIs

Related APIs Methods
Purchase Plan Authorize POST /shoppers/me/purchase-plan/authorize
Purchase Plan Search GET /shoppers/me/purchase-plan/search