LogoLogo
  • Digital River commercetools 1.0
    • System Requirements
    • Upgrade path
  • Understand the Digital River commercetools integration
    • Understand the integration workflow
    • Features
    • What’s new for Digital River's commercetools integration 1.0
  • Install and configure the Digital River commercetools integration
  • Create integration access keys
  • Configure the integration
    • Configure Digital River in Dashboard
    • Configure commercetools
    • Map shared data used in the integration
  • Deploy the integration
    • Understand integration environment variables
  • Use the commercetools Merchant Center custom application
    • Install and deploy the Merchant Center custom application
    • Configure the Merchant Center custom application
    • Integrate with a store for payments
    • Configure shipping methods
    • Enable customer management options
    • Understand integration logs
    • Merchant Center custom application user guide
      • Authorize a payment
      • Cancel an authorization
      • Capture a payment
      • Use the demo store custom application
      • Refund a payment
  • Support
Powered by GitBook
On this page
  • Call the Digital River fulfillments API
  • Use the Convenience API
  • Understand the cancellation outcome
  1. Use the commercetools Merchant Center custom application
  2. Merchant Center custom application user guide

Cancel an authorization

Learn to cancel an authorization.

PreviousAuthorize a paymentNextCapture a payment

Last updated 2 years ago

In Digital River, authorizations are cancelled by marking items in the order as cancelled. Therefore, it is not possible to cancel an authorization by adding a CancelAuthorization transaction. Also, while partial cancels are supported, it is not possible to specify the amount to be cancelled. The amount calculated for you by Digital River, based on the items you cancel.

Items can be marked as cancelled in the following ways:

  • Via the Digital River dashboard

  • By calling the

  • By using the convenience API in the connector

The next sections provide more details.

Call the Digital River fulfillments API

To use the Digital River API directly, you need your Digital River secret API key and the Digital River order and line item ids. The Digital River order ID is available in the custom field drOrderId on the commercetools order. The Digital River line item ID is available in the custom field drLineItemId in each commercetools order line item.

Use the Convenience API

The convenience API is similar to the Digital River API above but it lets you use the commercetools resource ids to look up your configured secret API key for you. The following is an example:

Method: POST

Path: /api/v1/fulfillments/create

Payload:

{
  "orderId": "<commercetools order id>",
  "items": [
    {
      "itemId": "<commercetools line item id>",
      "quantity": 0,
      "cancelQuantity": <quantity to cancel>
    }
  ],
  "metadata": {
    <any key value pairs>
  }
}

You can also provide optional metadata.

Note: The endpoint should be secured, even if you use the convenience API.

Understand the cancellation outcome

Digital River calculates the amount to be cancelled for you. When this is available, a CancelAuthorization transaction with the amount is added to the commercetools payment. The state of the transaction will be either Success or Failure depending on the outcome of the cancellation in Digital River.

The interactionId of the CancelAuthorization transaction is set to the ID of the Digital River cancellation so that you can reconcile these two if needed.

Digital River fulfillments API