Using the Expired Card Optimizer

Learn how to use the Expired Card Optimizer (ECO) for a third-party subscription engine renewal orders.

The Expired Card Optimizer (ECO) is a Centralized Payment Gateway (CPG) feature used to optimize the subscription renewal. It is designed to renew orders for the Digital River subscription engine as described in Providing subscription information. However, you can use the ECO to renew subscriptions for a third-party subscription engine (that is, a non-Digital River subscription engine) as described below.

Renewing subscriptions that do not use the Digital River subscription engine

To use ECO to renew a subscription that does not use the Digital River subscription engine, insert both the subscriptionInfo and billingOptimization in the lineItem array when you create a cart using POST /v1/shoppers/me/carts/active.

Only provide the information used in this example to renew orders when you are not using the Digital River subscription engine. An expired credit card generally does not occur during the initial acquisition, so this information is not required during the initial acquisition.

curl --location --request POST '' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{Token}}' \
--data-raw '{
"cart": {
"ipAddress": "{{BrowserIP}}",
"lineItems": {
"lineItem": [
"quantity": 2,
"product": {
"id": "{{productId}}"
"billingOptimization": {
"subscriptionId": "{{SubscriptionId}}",
"segmentId": "12",
"renewalAttemptNumber": "3"
"subscriptionInfo": {
"autoRenewal": true,
"terms": "I agree to have client charge all my future bills on this card",
"freeTrial": false,
"startTime": "2020-08-01T00:00:00.000Z",
"endTime": "2021-08-01T00:00:00.000Z",
"billingAgreementId": "{{BillingAgreementID}}"
"chargeType": "merchant_initiated"




The subscription information should indicate the order uses a third-party subscription engine. Note that Digital River does not validate data from non-Digital River subscription engines.


To trigger an ECO, provide the following subscription information under billing optimization:

  • subscriptionId–The subscription's unique identifier.

  • segmentId–The unique segment identifier for each renewal term. The segment identifier value changes after each renewal attempt. The initial acquisition value could start as 1 (note that the value does not matter much for in initial acquisition), and increments upwards (for example, 2) for each additional renewal.

  • renewalAttemptNumber–The number of billing attempts for the current renewal. Then the value resets to 1 after each successful renewal. At the time of the first renewal attempt, ECO generates an incremented expiration date schedule that lives in a CPG table.

The renewal orders for a Digital River subscription provide all necessary information. Therefore, there is no need for you to manually insert this information.