LogoLogo
System Status
  • Digital River API
  • Getting started
  • Using our services
    • Local pricing
    • Item classification
    • Subscriptions
    • e-Invoicing
  • Integration options
    • Low-code checkouts
      • Implementing a Prebuilt Checkout
      • Implementing a Components checkout
      • Offering local pricing
      • Using a shipping endpoint
      • Processing subscription acquisitions
      • Adding custom fields
      • Offering store credit
      • Displaying policies and getting consent
      • Collecting e-invoice information
      • Handling completed checkout-sessions
    • Direct integrations
      • Standard flow
      • Building checkouts
        • Checking out guest and registered customers
        • Describing line items
          • Setting the price of an item
          • Managing items with shared SKU identifiers
        • Providing address information
        • Handling shipping choice
        • Tax identifiers
        • Applying a discount
        • Setting the customer type
        • Providing the IP address
        • Selecting a currency
        • Initiating a charge
        • Setting the purchase location
        • Configuring taxes
        • Accessing regulatory fee information
        • Localizing invoices and credit memos
        • Providing an upstream identifier
        • Applying store credit
        • Handling e-invoicing requirements
        • Landed cost
        • Tax calculation inputs
        • Selling entities
        • Payment sessions
        • Applying store credit (legacy)
        • Country specs
      • Building payment workflows
        • Handling redirect payment methods
        • Handling delayed payment methods
      • Subscription acquisitions
        • Handling subscription acquisitions
        • Handling external subscription acquisitions
        • Subscription information
      • Digital River coordinated fulfillments
        • Checking inventory levels
        • Using shipping quotes
        • Reserving inventory items
        • Managing a fulfillment order
        • Cancelling a fulfillment order
    • Connectors
  • Order management
    • Processing orders
    • Handling a rejected order
    • Accessing invoices and credit memos
    • Fulfilling goods and services
    • Capturing and cancelling charges
    • Payment reauthorizations
    • Handling reversals
      • Return basics
        • Digital River coordinated returns
        • Third party coordinated returns
      • Refund basics
        • Issuing refunds
        • Refunding asynchronous payment methods
      • Disputes and chargebacks
    • Customer notifications
    • Responding to events
      • Events
        • Key event types
        • All event types
      • Webhooks
        • Creating a webhook
        • Digital River API safelist
        • Digital River signature
      • Expanding events
      • Preventing webhooks from getting disabled
    • Distributor model
  • Subscription Management
    • Managing a subscription
    • Managing an external subscription
  • Payments
    • Payment solutions
      • Drop-in payments
        • How Drop-in payments work
        • Drop-in payments integration guide
      • DigitalRiver.js with Elements
        • Elements integration guide
        • Configuring payment methods
          • Configuring Afterpay
          • Configuring Alipay+ (cross-border)
          • Configuring Alipay (domestic)
          • Configuring Amazon Pay
          • Configuring Apple Pay
          • Configuring Bancontact
          • Configuring BNP Paribas
          • Configuring BLIK
          • Configuring CCAvenue
          • Configuring Clearpay
          • Configuring Credit Cards
          • Configuring FPX Online Banking
          • Configuring Google Pay
          • Configuring iDEAL
          • Configuring Klarna
          • Configuring Konbini
          • Configuring Online Banking (IBP)
          • Configuring Online Banking (Korea Bank Transfer)
          • Configuring PayCo
          • Configuring PayPal
          • Configuring SEPA Direct Debit
          • Configuring Trustly
          • Configuring Wire Transfer
          • Common payment sources
          • Common payment objects
    • Supported payment methods
      • Afterpay
      • Alipay (domestic)
      • Alipay+ (cross-border)
      • Amazon Pay
      • Apple Pay
      • Bancontact
      • BNP Paribas
      • BLIK
      • CCAvenue
      • Clearpay
      • Credit Cards
      • FPX Online Banking
      • Google Pay
      • iDEAL
      • Klarna
      • Konbini
      • Korea Bank Transfer (Online Banking)
      • Online Banking (IBP)
      • Pay with Installments France
      • PayCo
      • PayPal
      • PayPal Billing Agreement
      • PayPal Credit
      • PayPal Pay in 3
      • PayPal Pay in 4
      • PayPal RatenZahlung (Installment Payment)
      • SEPA Direct Debit
      • Trustly
      • Wire Transfer
    • Source basics
      • Managing sources
      • Handling credit card sources
      • Retrieving sources
    • Authorization declines
    • PSD2 and SCA
      • How to ensure SCA compliance
    • Payment testing scenarios
  • Product management
    • Product basics
    • Managing SKUs
    • Using product details
    • Grouping SKUs
    • SKU-inventory item pairs
    • Managing inventory items
    • Regulatory fees
      • What are regulatory fees?
        • Fees terminology
        • Regulatory fee management
        • European regulatory fees
        • Compliance obligations
        • WEEE directive requirements
        • Copyright directive requirements
        • Compliance challenges
      • Managing regulatory fees
  • Customer management
    • Customer basics
    • Creating and updating customers
    • Setting up tax exemptions
    • Recording a customer's request to be forgotten
  • Financial reporting
    • Financials basics
    • Sales transactions
      • Returning a list of sales transactions
      • Getting a sales transaction by ID
    • Sales summaries
      • Returning a list of sales summaries
      • Getting a sales summary by ID
    • Payouts
      • Returning a list of payouts
      • Getting a payout by ID
      • Get a list of transactions included in payout by ID
  • Developer resources
    • Digital River API reference
    • DigitalRiver.js reference
      • Including DigitalRiver.js
      • Initializing DigitalRiver.js
      • DigitalRiver object
      • Elements
        • Amazon Pay element
        • Apple Pay elements
        • Google Pay elements
        • IBAN element
        • iDEAL element
        • Konbini elements
        • Compliance element
        • Offline Refund elements
        • Online Banking elements
        • Tax Identifier element
        • Invoice attribute element
        • Delayed Payment Instructions element
        • PayPal elements
      • Guidelines for capturing payment details
      • Security
      • Digital River payment objects
      • Error types, codes, and objects
    • DigitalRiverCheckout.js reference
      • Including DigitalRiverCheckout.js
      • Initializing DigitalRiverCheckout.js
        • DigitalRiverCheckout configuration object
      • DigitalRiverCheckout object
        • Configuring Prebuilt Checkout
          • Performing actions
          • Defining experience
        • Components
          • Configuring components
          • Address component
          • Shipping component
          • Tax identifier component
          • Invoice component
          • Wallet component
          • Payment component
          • Compliance component
          • Order summary component
          • Thank you component
        • Rendering a checkout button
          • Performing actions on the checkout button
        • Determining the checkout's status
      • Accessing country and currency
    • DynamicPricing.js reference
    • Postman collection
  • administration
    • Sign in
    • Digital River Dashboard
      • Digital River Dashboard quick start guide
      • Key features
      • Reset your password
      • Test and production environments
      • Account
        • Adding an account
        • Switching accounts
        • Account access
      • Profile settings
        • Viewing your personal information
        • Changing your password
        • Updating your phone number
        • Enabling multi-factor authentication
      • Finance
        • Payouts
          • Viewing your payout details
          • Filtering your payouts
          • Exporting your payouts
        • Sales summaries
          • Viewing your sales summaries details
          • Filtering your sales summaries
          • Exporting your sales summaries
          • Exporting your sales summary details
        • Transactions
          • Viewing your transaction details
          • Filtering your transactions
          • Exporting your transactions
      • Order management
        • Orders
          • Searching for orders
          • Filtering your orders
          • Viewing the order details
          • Cancelling items
          • Fulfilling items
          • Downloading an invoice
          • Downloading a credit memo
          • Creating shipping labels
          • Recording a customer's request to be forgotten
          • Viewing returns and refunds
          • Creating a return
          • Accepting a return
          • Creating a refund
          • Viewing the order's timeline
        • Checkouts
          • Searching for checkouts
          • Filtering your checkouts
          • Viewing the checkout details
        • Prebuilt Checkout links
          • Generate Prebuilt Checkout links
          • View and work with Prebuilt Checkout link details
          • Add a customer during Prebuilt Checkout
          • Add a product during Prebuilt Checkout
      • Customers
        • Viewing customer details
        • Searching for customers
        • Filtering your customers
        • Editing account information
        • Adding a customer
        • Tax IDs and certificates
          • Adding a tax certificate
          • Adding a tax ID
          • Deleting a tax ID
        • Metadata
          • Adding metadata
          • Editing metadata
        • Manage subscriptions from the Customer Details page
        • Disabling a customer
        • Recording a customer's request to be forgotten
        • Deleting a customer
      • Catalog
        • SKUs
          • Viewing the SKU details
          • Searching for SKUs
          • Filtering your SKUs
          • Adding a SKU
          • Editing a SKU
          • Deleting a SKU
          • Adding a fee to a SKU
          • Editing a fee
          • Deleting a fee
          • Viewing product tariff codes
        • Managing customer subscriptions from Digital River Dashboard
      • Developers
        • API keys
          • Updating your API version
          • Getting your API keys
          • Changing the API version for your key
          • Creating a restricted key
          • Editing a restricted key
          • Deleting a restricted key
          • Rotating keys
        • Webhooks
          • Creating a webhook
          • Editing a webhook
          • Deleting a webhook
          • Rotating a webhook's secret
        • API logs
          • Filtering the API log
          • Viewing the API log details
        • Event logs
          • Filtering the events log
          • Viewing the event details
      • Settings
        • Users and roles
          • Roles
          • Searching for a user by name or email
          • Filtering your users and roles
          • Adding a user
          • Editing a user
          • Deleting a user
        • Prebuilt Checkout
        • Payment methods
          • Viewing your payment methods
          • Viewing payment method details
            • Enabling currencies
            • Managing countries
          • Enabling or disabling a payment method
  • General Resources
    • eCompass
    • eCompass documentation
    • Release notes
      • 2024
      • 2023
      • 2022
      • 2021
      • 2020
      • 2019
    • Standards and certifications
      • Certification process
      • Compliance requirements
      • Documentation requirements
      • Integration checklists
        • Admin portal
        • Products and SKUs
        • Customers and tax exemptions
        • Checkouts, payment sources, and orders
        • Disclosures, compliance statements, and emails
        • Fulfillments and cancellations
        • Customer portal
        • Order refund synchronization
        • Reversals
        • Error handling
      • Test and use cases
    • Commerce infrastructure
    • Versioning
    • Glossary
Powered by GitBook
On this page
  • Converting a checkout to an order
  • Handling the POST /orders response
  • 409 Conflict
  • 201 Created
  • Events early in an order's lifecycle
  • The charge authorization failure event
  • The fraud block event
  • The pending charge authorization event
  • The in-process fraud review event
  • The order accepted event
  • The order cancelled event
  • Handling order state changes
  • Handling pending payment orders
  • Handling in review orders
  • Handling accepted orders
  • Handling the order.cancelled event
  • Reusing the checkout identifier
  1. Order management

Processing orders

Learn the basics of processing an order

PreviousCancelling a fulfillment orderNextHandling a rejected order

Last updated 2 months ago

Once customers are done checking out, how an is created depends on whether you implement a or take the approach.

If you're using , first and then handle the and/or .

If you're using , then Digital River handles creation. You should, however, to listen for with a of , and .

However, no matter which integration option you select, make sure you're set up to process:

  • .

For a list of important that most integrations should subscribe to, refer to .

Converting a checkout to an order

With , once the and requirements are met and customers have reviewed and submitted their orders, you should pass checkoutId in the body of a .

curl --location --request POST 'https://api.digitalriver.com/orders' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_key>' \
--data-raw '{
    "checkoutId": "177452470336"    
}'

This request primarily authorizes payment. Once submitted, your integration should be set up to process the immediate response and .

You can submit a POST /orders that payload contains checkoutId plus additional parameters (provided they adhere to the request's data contract). But, when processing the request, Digital River ignores this additional data. So, if you'd like to , you must do so before submitting a POST /orders.

{
    "id": "856adaff-0176-4bdb-91cb-7304dfd1e7a9",
    ...
    "email": "johndoe@digitalriver.com",
    ...
}

If you submit a POST /orders that contains the checkout's identifier, an updated email, and also adds an upstreamId that identifies the order in your system; then the response contains a 201 Created status code. However, email is not updated and upstreamId is not populated.

curl --location --request POST 'https://api.digitalriver.com/orders' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_key>' \
...
--data-raw '{
    "checkoutId": "856adaff-0176-4bdb-91cb-7304dfd1e7a9",
    "email": "janedoe@digitalriver.com",
    "upstreamId": "1J9F17710A6"
}'
{
    "id": "189917880336",
    ...
    "email": "johndoe@digitalriver.com",
    ...
    "checkoutId": "856adaff-0176-4bdb-91cb-7304dfd1e7a9"
}

Handling the POST /orders response

When handling this immediate response, you need to capture specific data from its payload and use it to update the status of your commerce system. This ensures that downstream fulfillment operations are correctly handled.

409 Conflict

Error
{
    "type": "conflict",
    "errors": [
        {
            "code": "failed-request",
            "message": "Failed to charge source."
        }
    ]
}

Use this error information to update the upstream order's overall status, payment status, and fraud status.

You can also use the error's message to inform end customers of the problem. Do not, however, share code. Doing so may aid parties attempting to carry out fraudulent or malicious activities.

201 Created

Pending payment

In review

Accepted

Events early in an order's lifecycle

These events notify you of:

The charge authorization failure event

Do not display the failureCode to end customers. Doing so potentially aids malicious and fraudulent actors.

The fraud block event

The pending charge authorization event

The in-process fraud review event

The order accepted event

The order cancelled event

Handling order state changes

Handling pending payment orders

Handling in review orders

Handling accepted orders

Handling the order.cancelled event

  • Update the master order record in your system

  • Notify customers (typically by email) that their order has been successfully cancelled and no payment was collected. In the email, we suggest you provide:

    • The order number

    • The order cancellation date (you can retrieve this information from the order's stateTransitions.cancelled attribute)

    • An itemization of the cancelled goods

    • The payment method used by the customer

    • The total amount cancelled

    • The customer’s billing address

    • Your contact information

Reusing the checkout identifier

If you attempt to pass a checkoutId in a POST /orders request, and that Checkout has already been consumed by a different POST /orders request, you'll get back a response with a 404 Not Found status:

{
    "type": "not_found",
    "errors": [
        {
            "code": "not_found",
            "parameter": "orderId",
            "message": "Order 180139250336 not found"
        }
    ]
}

For example, the following email address is johndoe@digitalriver.com.

If you're using , after you submit a (assuming all upstream requirements have been met), the response will contain a or status code.

A 409 Conflict status code indicates that Digital River did not create an , either due to a payment authorization failure or suspected fraud. The error's code and message contain more specific information about what triggered the failure.

For more details on processing responses with a 409 Conflict status code, refer to the page.

A 201 Created status code indicates an state is , , or .

From the response's payload, retrieve the id, state, fraudState, and charges[].state. Use these values to update the corresponding attributes in the upstream commerce platform's order.

If an state is pending_payment, the fraud review process has been successfully completed but the is not yet authorized. For more details, refer to .

If an state is in_review, this indicates that Digital River is conducting a secondary fraud review. For more information, refer to .

If an state is accepted, then the transaction has successfully passed fraud review and the is authorized. For more information, refer to .

Whether you're using , , or , you'll need to to listen for some key that occur early in an .

and

.

Each time you're notified of one of these events, retrieve the state, fraudState, and charges[].state (if available) from its payload and use this data to update the corresponding attributes in the upstream commerce system's order.

An asynchronous failure triggers an order.charge.failed event.

If you receive this event, you can iterate over the payment.charges[] and inspect them for a . The failureMessage, however, is not always available. But when it is, you can use it to provide customers with more specific payment failure information.

When Digital River detects an anomaly during its or we determine that the customer is on the , we create an order.blocked event. The payload of this event consists of an whose is blocked. The order's is also blocked. Since these are both terminal states, you should inform end customers that the transaction has failed.

An order.pending_payment event indicates that Digital River detected no fraudulent activity during its . However, don't use this event as a trigger to initiate fulfillment operations. This is because the payment.charges[] are not yet fully authorized.

For more information, refer to .

An order.review_opened event indicates that Digital River is conducting a secondary fraud review and has moved the state to . Since the fraud review process is not yet complete, don't use this event as a trigger to initiate fulfillment operations.

For more information, refer to .

When all of an order's are authorized, and no irregularities are detected during the , Digital River creates an event. Respond to this event by moving the commerce platform's order into a ready to fulfill state.

Unless you , your integration should wait until it receives order.accepted before initiating . Doing so reduces the risk of fraud and the frequency of .

In the of the of order.accepted, you can use physical in each items[].productDetails to determine whether that product is classified as physical or digital. If physical is true, then the product needs to be shipped to the customer. As a result, you should pass its details in a ship request to your fulfillment service. Otherwise, if false, then the product is a digital item and should be delivered to the customer via email or some other digital channel.

For more information, refer to .

When an moves to cancelled, Digital River creates an whose is and whose contains that .

If you decide to build your integration so that customers can submit line-item level cancellation requests (as opposed to the more standard full-order cancellations), then you can’t always use order.cancelled to trigger . This is because an state doesn't move to cancelled until the of all of its is also cancelled.

You should also be aware that order.cancelled is often created when customers fail to transfer payment by a designated date and time. This applies to , , and other (s) of that have a of receiver.

For example, after an with a of wireTransfer is created, that order's typically becomes pending_payment. As a result, customers are provided instructions on how to authorize payment. For details, refer to .

If these instructions aren't followed (i.e., the funds aren't pushed within the allotted time), then the expires, no is created, and Digital River creates order.cancelled.

For more details, refer to .

The following provides information on handling , , , orders.

If an state is pending_payment, then the on the is not yet authorized, and the goods should not be fulfilled.

To handle this state change event, determine the value of the order's .

If it's redirect, refer to .

If it's show_payment_instructions, refer to .

that are in_review should not be fulfilled. After an order transitions out of this , Digital River creates either or . So, ensure your integration is set up to handle both events.

When an becomes accepted, move the order in your system into a ready to fulfill state.

Depending on whether the order is or accepted, you should redirect customers to an order confirmation page and/or send them an .

At this point, can be initiated.

Upon receiving the with a of , we recommend that you:

Handling rejected orders
Handling redirect payment methods
Handling delayed payment methods
fulfillment operations
charge authorization failures
fraud blocks
pending charge authorizations
ongoing fraud reviews
accepted orders
cancelled orders
handling pending payment orders
handling in review orders
fulfillment operations
disputes and chargebacks
synchronously receive an order in an accepted state
handling accepted orders
Handling cancelled orders
pending payment
in review
accepted
cancelled
Low-code checkout
Direct integrations
Direct Integrations
Prebuilt Checkout
configure a webhook(s)
webhook events
Key event types
Direct Integrations
convert the checkout to an order
immediate response
key events early in an order's lifecycle
Events early in an order's lifecycle
respond to key events
Direct Integrations
POST /orders
409 Conflict
201 Created
Drop-in Checkout
Low-code components
Direct integrations
configure webhooks
events
Denied Persons List
order
order's
wire transfers
Konibini
pending_payment
in_review
accepted
handling pending payment orders
handling in review orders
handling accepted orders
Handling pending payments
order.accepted
order.blocked
synchronously
asynchronously
order.cancelled
data.object
expanded version
type
type
data.object
type
address
Fulfillment-related events
type
flow
type
order confirmation notification
checkout's
checkout
order
order's
order's
order's
payment charge
order's
order's
payment charge
order's lifecycle
order's
charge authorization
order's
failure code or message
fraud review
order
state
fraudState
fraud review
order's
order's
in_review
notifications that inform customers their request was successfully processed
state
payment.charges[]
sources
source
charge authorization
Orders
state
order's
state
event
order
order
events
checkout's
POST /orders
update the checkout
payment.charges[]
fraud review
order's
state
event
order
state
order's
charge
order's
primary source
primary payment sources[]
order.accepted
order.cancelled
checkout_session.order.created
order.accepted
order.cancelled
payment
payment.session.nextAction.action