The Order object

The Order object contains information about the order.

Attributes

Description

id string

Unique identifier of the order.

createdTime datetime

The time when the customer created the order.

customerId string

The ID of a customer.

currency string

Three-letter ISO currency code, in lowercase.

email string

The customer's email address.

browserIp string

The IP address of the browser used by the customer when placing the order.

shipTo object

Contains the shipping information.

shipTo[].address object

Contains the shipping address.

shipTo[].address.line1 string

The first line of the shipping address.

shipTo[].address.line2 string

The second line of the shipping address.

shipTo[].address.city string

City or town.

shipTo[].address.postalCode string

ZIP or postal code.

shipTo[].address.state string

State/County/Province/Region.

shipTo[].address.country string

Two-letter country code.

shipTo[].name string

The customer's name.

shipTo[].phone string

The customer's phone number.

shipTo[].email string

The customer's email.

shipTo[].organization string

The customer's organization.

shipTo[].additionalAddressInfo object

Contains additional shipping address information.

shipTo[].additionalAddressInfo.neighborhood string

Used for Brazilian bairros.

subtotal string

Represents the total order amount exclusive of tax.

totalTax string

Represents the total tax amount.

totalFees string

Represents the total fee amount.

totalDuty string

Represents the total duty amount.

totalDiscount string

Represents the total discount amount.

totalShipping string

Represents the total shipping amount.

totalAmount string

Represents the total charge amount.

refundAmount string

Represents the total payment amount refunded.

items object

Contains the item information.

items[].skuId string

The unique identifier of the SKU.

items[].price string

The price of the item.

items[].amount number

Represents the total charge amount for the item.

items[].discount

Represents the total discount amount for the item.

items[].quantity

The number of items.

shippingChoice object

Contains shipping choice information.

shippingChoice[].amount number

Represents the shipping choice amount.

shippingChoice[].description string

A string that describes the shipping choice.

shippingChoice[].serviceLevel string

The service level for the shipping choice.

state string

Current order state. The states are as follows: created, submitted, blocked, cancelled, fulfilled, returned.

stateTransitions

string

The timestamps at which the order or item status was updated.

fraudState

string

Current order state. The states are as follows: blocked, review_opened, passed

fraudStateTransitions

string

The timestamps at which the order or item status was updated.

charges object

The charge, or charges, used to pay for the order.

charges[].id string

Unique identifier of the charge.

charges[].createdTime string

Time when the charge was created.

charges[].currency string

Three-letter ISO currency code.

charges[].amount numbe

Amount representing how much to charge. The minimum amount is $0.50 US or equivalent in charge currency.

charges[].state string

The status of the charge, one of pending, succeeded or failed.

charges[].customerId

ID of the customer for this charge if one exists.

charges[].orderId string

ID of the order this charge is for if one exists.

charges[].sourceId string

ID of the source used to create this charge.

charges[].failureCode string

Error code identifying the reason for charge failure.

charges[].failureMessage string

Error message describing the reason for charge failure.

charges[].cancels object

Contains the cancel information.

charges[].cancels.id string

Unique identifier of the cancel.

charges[].cancels.createdTime string

Time when the cancel was created

charges[].cancels.updatedTime string

Time when the cancel was updated.

charges[].cancels.amount string

Amount representing how much was cancelled.

charges[].cancels.state string

The status of the cancel, one of pending, succeeded or failed. The possible values are: pending, succeeded, or failed.

charges[].cancels.failureCode string

Error code identifying the reason for cancel failure.

charges[].cancels.failureMessage string

Error message describing the reason for cancel failure.

charges[].captures object

Contains the capture information.

charges[].captures.id string

Unique identifier of the capture.

charges[].captures.createdTime string

The time when the capture was created.

charges[].captures.updatedTime string

The time when the capture was created.

charges[].captures.amount string

The amount representing how much was captured.

charges[].captures.state string

The status of the capture, one of pending, succeeded or failed. The possible values are: pending, complete, or failed.

charges[].captures.failureCode string

Error code identifying the reason for capture failure.

charges[].captures.failureMessage string

Error message describing the reason for capture failure.

charges[].refunds object

Contains the refund information.

charges[].refunds.id* string

Unique identifier of the refund.

charges[].refunds.createdTime string

The time when the refund was created.

charges[].refunds.updatedTime string

The time when the refund was updated.

charges[].refunds.amount string

Amount representing how much was refunded.

charges[].refunds.state string

The status of the refund, one of pending, succeeded or failed. The possible values are: pending, complete, or failed.

charges[].refunds.failureCode string

Error code identifying the reason for refund failure.

charges[].refunds.failureMessage string

Error message describing the reason for refund failure.

charges[].type string

Error message describing the reason for refund failure.

charges[].type string

The type of charge. The possible values are: customer_initiated, merchant_initiated, or moto.

charges[].liveMode boolean

Has the value true if the object exists in live mode and the value false it the object exists in test mode.

requestToBeForgotten boolean

If true indicates a customer placing the order requested this order be forgotten.

paymentSessionId string

Tracks the process of collecting a payment.

liveMode boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

purchaseLocation object

Contains information on the purchase location.

purchaseLocation[].country

2-letter country code.

purchaseLocation[].state

State/County/Province/Region.

purchaseLocation[].postCode

ZIP or postal code.

metadata

The metadata parameter supports up to 20 keys. Each key name can be up to 40 characters long, and the values can be up to 500 characters long.

upstreamId string

The user order ID if it is different from the Digital River order ID (external reference ID).

updatedTime string

The time when the order was created.

The Order object
{
"id": "ord_5823594809",
"createdTime": "2018-04-25T20:36:00Z",
"customerId": "cus_5774321009",
"currency": "usd",
"email": "jsmith@digitalriver.com",
"browserIp": "111.111.111.111",
"shipTo": {
"address": {
"line1": "10380 Bren Rd W",
"line2": "string",
"city": "Minnetonka",
"postalCode": "55129",
"state": "MN",
"country": "US"
},
"name": "John Smith",
"phone": "952-111-1111",
"email": "jsmith@digitalriver.com",
"organization": "Digital River",
"additionalAddressInfo": {
"neighborhood": "Centro"
}
},
"subtotal": 1094.5,
"totalTax": 82.76,
"totalFees": 0,
"totalDuty": 0,
"totalDiscount": 0,
"totalShipping": 5.76,
"totalAmount": 1180.26,
"refundedAmount": 0,
"items": [
[
{
"skuId": "sku_5823594809",
"price": 9.99,
"amount": 18.58,
"discount": {
"percentOff": 10
}
},
{
"skuId": "sku_9234276173",
"price": 9.99,
"amount": 18.58,
"quantity": 2
}
]
],
"shippingChoice": {
"amount": 5.95,
"description": "USPS: Priority (1 day delivery)",
"serviceLevel": "SG"
},
"state": "created",
"stateTransitions": null,
"fraudState": "passed",
"fraudStateTransitions": null,
"charges": [
{
"id": "a6809a63-e6a9-4016-abbc-f33d19fccb5b",
"createdTime": "2018-04-25T20:36:00Z",
"currency": "USD",
"amount": 1180.26,
"state": "pending",
"customerId": 8760945562,
"orderId": 9986340012,
"sourceId": 9986340012,
"failureCode": "string",
"failureMessage": "string",
"cancels": [
{
"id": "a6809a63-e6a9-4016-abbc-f33d19fccb5b",
"createdTime": "2018-04-25T20:36:00Z",
"updatedTime": "2018-04-25T20:36:00Z",
"amount": 1180.26,
"state": "pending",
"failureCode": "string",
"failureMessage": "string"
}
],
"captures": [
{
"id": "a6809a63-e6a9-4016-abbc-f33d19fccb5b",
"createdTime": "2018-04-25T20:36:00Z",
"updatedTime": "2018-04-25T20:36:00Z",
"amount": 1180.26,
"state": "pending",
"failureCode": "string",
"failureMessage": "string"
}
],
"refunds": [
{
"id": "a6809a63-e6a9-4016-abbc-f33d19fccb5b",
"createdTime": "2018-04-25T20:36:00Z",
"updatedTime": "2018-04-25T20:36:00Z",
"amount": 1180.26,
"state": "pending",
"failureCode": "string",
"failureMessage": "string"
}
],
"type": "customer_initiated",
"liveMode": true
}
],
"requestToBeForgotten": false,
"paymentSessionId": "ps_8cecaa32-f692-44cc-b103-4cf24dc93913",
"liveMode": false,
"purchaseLocation": {
"country": "US",
"state": "MN",
"postCode": "55364"
},
"upstreamId": "0916805858",
"updatedTime": "2018-04-25T20:38:00Z"
}