Orders handle customers' purchases. When you create an order, you instruct Digital River, the authorized reseller, to send an authorization request to start the collection process.
The data of an order persist, acting as a permanent record of the sale, which Digital River must maintain for auditing purposes.
An order maintains an enduring record of when it was placed, a charge is created and captured, a is processed, and other key events in the order lifecycle occur. More specifically, an order persists:
The following diagram depicts the relationship between an order and other resources in the Digital River APIs.
The orders resource
In the following section, you'll find information on some of an order's attributes and how you might use them in downstream requests. For a complete list, refer to the Orders API reference documentation.
The total amount, fees, taxes, and other order costs are the same as those presented to customers when they confirm the purchase. You can retrieve these values and display them on the customer's order confirmation page.
In addition, these items[] store detailed price, tax, and quantity information that you can display to customers on order confirmation and order detail pages.
An order's requestToBeForgotten indicates whether an order's data is scheduled for deletion. It is the only attribute (other than metadata) that you can modify in an update order request.
...
"requestToBeForgotten": false,
...
}
The order lifecycle
An order has a defined lifecycle. Each stage of that lifecycle is represented by state. When an order's state changes, an event is created that represents that change. For example, when an order's state transitions from accepted to fulfilled an order.fulfilled event is created.
Order states and events
The following lists an order's enumerated state values and the events associated with each state change. These state transitions are listed in the approximate sequence they might occur in an order's lifecycle:
The state values for a successful order (i.e. the happy path) are pending_payment > in_review > accepted > fulfilled > complete . As the order moves from one state to another, that event is recorded with a timestamp in stateTransitions.
Fraud review
To ensure that your integration is functioning properly, you can create test orders using the information on the page.
An order contains a unique id. You can use this identifier when , , , , , and .
An order's shipTo values are displayed on .
Digital River assigns each of an order'sitems[] a unique id. You need this identifier when , , and .
Depending on how you , each of an order's items[] also contains either a or a object.
For more information on subscriptionInfo, refer to the page.
In most cases, Digital River populates an order'sinvoicePDFs and creditMemoPDFs with information that you can use to .
Orders with contain an array of .
An order's charges[] contains one or more elements, each representing a charge created from a . Each charge contains a unique identifier, an amount, a state, and the identifier of the used to create the charge.
charge is , but the order requires further fraud review, and, as a result, is still not ready to fulfill
is completely or partially fulfilled and the remaining items[] are cancelled
is and the charge is fully captured or partially fulfilled with a partially captured charge and the remaining items[] are or
is fully returned or partially returned and its remaining items[] are cancelled or partially/fully
An order must also pass through a fraud review. When exactly this review occurs in an order's lifecycle depends on the used by the customer. The different stages of the review are represented by fraudState, whose enumerated values are review_opened, blocked, and passed. When fraudState changes, an is created.